Pending timesheets list

List pending timesheets

If you wish to access multiple tspending records you would normally use the tspendingslist model

For more details about using models see Using data models

For tspending two models are available:

  • tspendingslist
  • tspendingdetails

Retrieve a list of pending timesheets

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
To dateDate filterdateto=2015-07-01
ModelstructureName of model requiredModelstructure=tspendingslist
FiltersFilter by a key field

Multi-value filters
It's possible to include multiple values for companies & Resources (see examples below)

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=tspendingslist

Example using a multiple resource filter

http://[SERVER]/jsonAPI/tspending.json?user=user&password=user&version=3.3&company=1&resource=["1/JON","1/KAT","1/PR"]&modelstructure=tspendingslist

Example using a multiple company filter
http://[SERVER]/jsonAPI/tspending.json?user=user&password=user&version=3.3&company=[1,5,8]&modelstructure=tspendingslist

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 145,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"tspUuid": "71E8D950EC3F48DCBAC30C03D768B8BD",
"tspTimeStampModified": 1490360812,
"tspRecordVersionNumber": 11,
"tspEntryNo": 686,
"tspJobAndPhase": "1/00000772.001",
"tspStageCode": "",
"tspStageDescription": "",
"tspTaskDescription": "",
"tspChargeCode": "1/MAC",
"tspChargeCodeDescription": "MAC Work",
"tspResourceCode": "1/USER",
"tspResourceName": "User",
"tspMaterialCode": "1/A2CC",
"tspMatQuantity": 1,
"tspHoursNormal": 0,
"tspHoursOtime1": 0,
"tspHoursOtime2": 0,
"tspTimeDate": "2011-11-01"
},etc ...