All APIs require authentication, which is delegated to Auth0. Before any of the following external APIs can be accessed, the requestor needs to authenticate using a client id and client secret. The returned bearer token is then added to the request headers.
Usage
To use this API, an account is required to obtain an Access Token by authenticating. All requests must be formatted as JSON and contain the following headers:
Header Name | Header Value | Optional | Comments |
Authorization | Bearer <access-token> | false |
|
Content-Type | application/json | false |
|
X-Version | 1 | true | If omitted, latest version will be used |
Each response will have the following structure, where data field will contain the actual data payload.
Property Name | Property Type | Can be Empty |
Success | bool | false |
ErrorMessage | String? | true |
Data | Payload Data Type | true |
Example response including data
{
"success": true,
"errorMessage": null,
"data": {
"uniqueCode": "RS_00000003"
}
}
Response Codes
Http Response Code | Description |
200 | Successful |
400 | Bad Request β Missing/invalid input parameters |
401 | Unauthenticated β the authentication access token is missing or expired |
403 | Unauthorized β the user is logged in successfully, however does not have permission to access the requested resource. |
500 | Unexpected error β please contact support along with any returned error messages |
Get Cargo Type
Get a cargo type identified by its RS Cargo Type Code.
Request Uri: [HttpGet] /api/CargoType/{cargoTypeCode}
Request: empty
Response:
Property Name | Property Type | Can Be Empty | Comments |
UniqueCode | string | false |
|
Name | string | false |
|
cargoTypeCategoryName | string | false |
|
Get All Cargo Type
Get a list of all Cargo Types.
Request Uri: [HttpGet] /api/CargoType
Request: empty
Response:
Property Name | Property Type | Can Be Empty | Comments |
CargoTypes | CargoType[] | true |
|
CargoTypes:
Property Name | Property Type | Can Be Empty | Comments |
UniqueCode | string | false |
|
Name | string | false |
|
cargoTypeCategoryName | string | false |
|