Create

ParameterMandatoryDescriptionExamplesMore Info
APIYesThe API areaexpenselines.json
GeneralYesParameters described in overviewuser=user&password=userStructure of an API call
ActionYesThe action to performaction=create
InputYesJSON stringSee below
JSON InputMandatoryDescriptionExamples
expenselineSheetInternalYesExpense sheet internal ID to add expense line to"expenselineSheetInternal":2117
expenselineTotalYesTotal amount"expenselineTotal":100
expensesheetSupplierCodeYesSupplier code"expensesheetSupplierCode": "1/U"
expenselineJobAndPhaseYesJob and phase number"expenselineJobAndPhase":"1/00003091.001"
expenselineSupplyTypeYesSupply type"expenselineSupplyType":"1/3D"
expenselineDescriptionYesDescription"expenselineDescription":"this is a description"
expenselineDateYesDate"expenselineDate":"2018-08-08"

Example request:

http://SERVER>/jsonapi/expenselines.json?user=user&password=user&version=3.9&action=create&input={
  "data": [
    {
      "expenselineSheetInternal": 2117,
      "expenselineTotal": 100,
      "expensesheetSupplierCode": "1/U",
      "expenselineJobAndPhase": "1/00003091.001",
      "expenselineSupplyType": "1/COU",
      "expenselineDescription": "My Expenses",
      "expenselineDate": "2020-11-13"
    }
  ]
}

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"synapiversion": 3.8,
"data": [
{
"expenselineRate": 0,
"expenselineSheetCurrencyUnitCost": 0,
"expenselineTotal": 0,
"expenselineSheetCurrencyGross": 100,
"expenselineCurrencyRate": 0,
"expenselineCurrencyTotal": 0,
"expenselineTaxCode": 0,
"expenselineTaxAmount": 0,
"expenselineSheetCurrencyTax": 0,
"expenselineDescription": "My Expenses",
"expenselineExchangeRate": 1,
"expenselineUuid": "3274EBF8B5685F458C89526D460E20BB",
"expenselineInternal": 4047,
"expenselineTimestampModified": 1605284678,
"expenselineRecordVersionNumber": 0
}
]
}