Parameter | Mandatory | Description | Examples | More Info |
---|---|---|---|---|
API | Yes | The API area | expenselines.json | |
General | Yes | Parameters described in overview | user=user&password=user | Structure of an API call |
Action | Yes | The action to perform | action=create | |
Input | Yes | JSON string | See below |
JSON Input | Mandatory | Description | Examples |
---|---|---|---|
expenselineSheetInternal | Yes | Expense sheet internal ID to add expense line to | "expenselineSheetInternal":2117 |
expenselineTotal | Yes | Total amount | "expenselineTotal":100 |
expensesheetSupplierCode | Yes | Supplier code | "expensesheetSupplierCode": "1/U" |
expenselineJobAndPhase | Yes | Job and phase number | "expenselineJobAndPhase":"1/00003091.001" |
expenselineSupplyType | Yes | Supply type | "expenselineSupplyType":"1/3D" |
expenselineDescription | Yes | Description | "expenselineDescription":"this is a description" |
expenselineDate | Yes | Date | "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
}
]
}