Update

Updates an existing timesheet.

Update

ParameterMandatoryDescriptionExamplesMore Info
APIYesThe API areatspending.json
GeneralYesParameters described in overviewsee overviewStructure of an API call
ActionYesThe action to performaction=update
InputYesJSON stringSee below
JSON InputMandatoryDescriptionExamples
IdentifierYesData to identify the timesheet"tspEntryNo":14822
DataNoData to update"tspHoursNormal":1

Example request (OAuth 2.0):

Authorization: Bearer <access_token>
http://&lt;SERVER&gt;/jsonapi/tspending.json?&version=6&action=update&input={
  "data": [
    {
      "tspEntryNo": 14822,
      "tspHoursNormal": 1
    }
  ]
}

Example request (legacy username/password):

http://&lt;SERVER&gt;/jsonapi/tspending.json?&version=6&action=update&input={
  "data": [
    {
      "tspEntryNo": 14822,
      "tspHoursNormal": 1
    }
  ]
}&user=<username>&password=<password>

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "tspTimerStatusNormal": "",
      "tspEntryNo": 14822,
      "tspUuid": "F9896E8E3EBAD047A0C346C8929BA0DD",
      "tspTimeStampModified": 0,
      "tspRecordVersionNumber": 0
    }
  ]
}

Note: To discover which fields are editable make a call to the "Pending Timesheets Details" endpoint and specify '&style=modelstructure' see Meta-data