Returns a list of materials types.
Material Type 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 |
| Action | Yes | The action to perform | action=materialtypelist | |
| Company | Yes | The company number | company=1 |
Example request (OAuth 2.0):
Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/tspending.json?&version=6&action=materialtypelist&company=1
Example request (legacy username/password):
http://<SERVER>/jsonapi/tspending.json?&version=6&action=materialtypelist&company=1&user=<username>&password=<password>
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 4,
"totalpages": 2,
"responsemessage": "",
"pagerows": 2,
"pagenumber": 1,
"success": true,
"data": [
{
"resourcetypesUuid": "97880FCD8EEC4AA8A26D3BD881DF8455",
"resourcetypesTimestampModified": 1385821271,
"resourcetypesRecordVersionNumber": 0,
"resourcetypesCode": "1/CC",
"resourcetypesDescription": "Colour Copies1"
},
{
"resourcetypesUuid": "4D7583E97AD841EEB7ACBE273FB3EA16",
"resourcetypesTimestampModified": 1385821271,
"resourcetypesRecordVersionNumber": 0,
"resourcetypesCode": "1/CO",
"resourcetypesDescription": "Communication"
}
]
}