Update

Updates an existing expense sheet.

Update

ParameterMandatoryDescriptionExamplesMore Info
APIYesThe API areaexpensesheets.json
GeneralYesParameters described in overviewAuthorization: Bearer <access_token> header — see Synergist API AuthenticationStructure of an API call
CompanyYesCompany numbercompany=1
ActionYesThe action to performaction=update
InputYesJSON stringSee below
JSON InputMandatoryDescriptionExamples
IdentifierYesData identifying expense sheet to update"expensesheetInternalRef":687
Update dataYesData to update on expense sheet"expensesheetDescription":"My expense sheet 2"

Example request (OAuth 2.0):

Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/expensesheets.json?&version=6&company=1&action=update&input={
  "data": [
    {
      "expensesheetInternalRef": 687,
      "expensesheetDescription": "My expense sheet  2"
    }
  ]
}

Example request (legacy username/password):

http://<SERVER>/jsonapi/expensesheets.json?&version=6&company=1&action=update&input={
  "data": [
    {
      "expensesheetInternalRef": 687,
      "expensesheetDescription": "My expense sheet  2"
    }
  ]
}&user=<username>&password=<password>

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expensesheetInternalRef": 687,
      "expensesheetUuid": "0356E3479C70BD47B8A26B06E04DD450",
      "expensesheetTimestampModified": 1533201346,
      "expensesheetRecordVersionNumber": 14
    }
  ]
}