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

Parameter

Description

Examples

API

The API area

tspending.json

Action

Defines the API

no action required

General

Parameters described in overview

user=user&password=user&version=3.3

Resource

Filter by resource

resource=1/jon

From date

Date filter

datefrom=2015-07-01

TSP entry no

Record ID

tspending=2008

To date

Date filter

dateto=2015-07-01

Modelstructure

Name of model required

Modelstructure=tspendingdetails

Using data models

Filters

Filter by a key field

Filters

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"
}
]
}