Pending timesheets details

Returns a single tspending record

If you wish to access a single tspending record you would normally use the tspendingdetails model since it returns more fields than the 'list' model

For more details about using models see Using data models

For tspending two models are available:

  • tspendingslist
  • tspendingdetails

To return a single record the ‘tspending’ parameter should be passed

Retrieve a pending timesheet / or multiple records

ParameterDescriptionExamples
APIThe API areatspending.json
ActionDefines the APIno action required
GeneralParameters described in overviewuser=user&password=user&version=3.3
ResourceFilter by resourceresource=1/jon
From dateDate filterdatefrom=2015-07-01
TSP entry noRecord IDtspending=2008
To dateDate filterdateto=2015-07-01
ModelstructureName of model requiredModelstructure=tspendingdetails
FiltersFilter by a key field

Filtering the list
Key field filters

Example request:
Request to list pending timesheets

Statuses
P – Posted … (if in process of being posted)
A - Approved
Q - Queried
R - rejected
H - held
W – web/pending/default status (not included in this API return data)

Example using a date and resource filter

http://<SERVER>/jsonAPI/tspending.json?user=user&password=user&version=3.3&company=1&resource=1/jon&datefrom=2015-07-01&dateto=2015-07-01&modelstructure=tspendingdetails

And to query for a single record

http://<SERVER>/jsonAPI/tspending.json?user=user&password=user&version=3.3&company=1&tspending=2008&modelstructure=tspendingdetails

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 1,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"tspUuid": "F857AEE722B14941BADE61689C8167F7",
"tspTimeStampModified": 1490360812,
"tspRecordVersionNumber": 4,
"tspEntryNo": 2008,
"tspJobAndPhase": "1/10252.001",
"tspStageCode": "",
"tspStageDescription": "",
"tspTaskDescription": "",
"tspChargeCode": "1/ALT",
"tspChargeCodeDescription": "Amends New",
"tspResourceCode": "1/JON",
"tspResourceName": "SYN_Jon",
"tspMaterialCode": "",
"tspMatQuantity": 0,
"tspHoursNormal": 1,
"tspHoursOtime1": 1,
"tspHoursOtime2": 1,
"tspApprovalStatus": "W",
"tspApprovalNotes": "",
"tspApprovalNotesReSubmit": "",
"tspWorkDone": "",
"tspTimeDate": "2015-09-28"
}
]
}