Returns the list of charge codes.
Charge Code List
| Parameter | Mandatory | Description | Examples | More Info |
|---|---|---|---|---|
| API | Yes | The API area | tspending.json | |
| General | Yes | Parameters described in overview | see overview | Structure of an API call |
| Company | Yes | The company number | company=1 | |
| Action | Yes | The action to perform | action=chargecodelist | |
| Client | No | Filter by client code | cAPI_Client=1/1244 | |
| Job | No | Filter by job number | cAPI_Job=1/00008321 | |
| Job Phase | No | Filter by job and phase | cAPI_JobPhase=1/00008321.001 | |
| Workflow | No | Filter by workflow code | cAPI_Workflow=1/W123 | |
| Task Description | No | Filter by task description code | cAPI_TaskDesc=1/TD1 | |
| Phase Type | No | Filter by phase type | cAPI_PhaseType=1/PT1 | |
| Activity Type | No | Filter by activity type | cAPI_ActivityType=1/AT1 | |
| Search | No | Free-text search | cAPI_Search=design |
Example request (OAuth 2.0):
Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/tspending.json?&version=6&action=chargecodelist&company=1
Example request (legacy username/password):
http://<SERVER>/jsonapi/tspending.json?&version=6&action=chargecodelist&company=1&user=<username>&password=<password>
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 67,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"synapiversion": 3.8,
"data": [
{
"chargecodeUuid": "8D4431FCE252674686DA4DCD3EEEFB94",
"chargecodeTimestampModified": 1594797067,
"chargecodeRecordversionnumber": 1,
"chargecodeActivityCode": "",
"chargecodeChargecode": "1/33&44",
"chargecodeDescription": "33&44",
"chargecodeUserDefault": false
},
{
"chargecodeUuid": "BEE4CB9403261845B2A23F06B16EFD1C",
"chargecodeTimestampModified": 1594797073,
"chargecodeRecordversionnumber": 11,
"chargecodeActivityCode": "",
"chargecodeChargecode": "1/AA",
"chargecodeDescription": "aa",
"chargecodeUserDefault": false
}
]
}