Create

Create

Parameter

Description

Examples

API

The API area

tspending.json

Action

The action to perform

action=create

<General>

Parameters described in overview

user=user&password=user&version=3.3

Company

The company context

company=1

input

JSON string

input="data": ...

<input mandatory>tspJobAndPhase

Job and phase number

"tspJobAndPhase":"1/00000001.001"

<input mandatory>tspTimeDate

Time and date

"tspTimeDate": "2018-07-18"

<input mandatory>tspResourceCode

Resource code

"tspResourceCode": "1/RC"

Response

Returned data

See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.3&company=1&action=create&input={"data":[{"tspJobAndPhase":"1/00000772.001","tspTimeDate": "2018-07-18","tspResourceCode": "1/USER"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "tspUuid": "DEBE83A88C58144FA43FC2E3F9839C75",
      "tspTimeStampModified": 1532013707,
      "tspRecordVersionNumber": 0,
      "tspApprovalStatus": "W",
      "tspChargeCode": "1/MAC",
      "tspComplete": "",
      "tspDiaryInternal": 0,
      "tspEntryNo": 3636,
      "tspHoursNormal": 0,
      "tspHoursOtime1": 0,
      "tspHoursOtime2": 0,
      "tspJobAndPhase": "1/00000772.001",
      "tspMaterialCode": "",
      "tspMatQuantity": 0,
      "tspTaskDescription": "",
      "tspTimeDate": "2018-07-18",
      "tspWorkDone": "",
      "tspStageCode": "",
      "tspApprovalStatusName": "Unsubmitted",
      "tspChargeCodeDescription": "MAC Work",
      "tspApproverNotes": "",
      "tspCompleteStages": false,
      "tspCopy": "Y",
      "tspDelete": "Y",
      "tspEdit": "Y",
      "tspMaterials": 0,
      "tspMovestages": false,
      "tspSubmit": "N",
      "tspSubmitterNotes": "",
      "tspTimerElapsedNormal": 0,
      "tspTimerElapsedOt1": 0,
      "tspTimerElapsedOt2": 0,
      "tspTimerStatusNormal": "",
      "tspTimerStatusOt1": "",
      "tspTimerStatusOt2": "",
      "tspPhaseDescription": "phase description fds fsdfsd ffdsf sdfsdf sdfsdfsd fsdfsd fsdfsdf sdfs",
      "tspJobPhaseNumberSimple": "772.001",
      "tspClientCode": "1/00000571",
      "tspJobClientName": "57th & 1st Street Design",
      "tspPhaseJobDescription1stline": "Job descripton  dsfsdfsd fds",
      "tspStageCurrentDescription": "",
      "tspMatDescription": "",
      "tspStageDescription": ""
    }
  ]
}