The HOS Carrier Properties endpoint handles a collection of Carriers from which admin personnel can assign Drivers to, depending on which Carrier they are working for on that particular day. It should be noted that values saved using this API are saved into the Account Property named “hos.carrier.information” and if the default Carrier is edited, it also updates the “hos.mainoffice.*” Account Properties.
Fields
An individual Carrier is required to have name and a DOT Number, along with a full address divided up into separate fields and a corresponding timezone.
Tag | Data Type | Required | Description |
accountId | Long | No | The id of the Account that owns this record. |
carrierName | Text (max of 120 characters) | Yes | The name of the Carrier |
carrierDotNumber | Integer (max value of 999999999) | Yes | The DOT number of the Carrier |
city | Text (unlimited) | Yes | The city where the Carrier is located |
country | Text (unlimited) | Yes | The country where the Carrier is located. Can be:
|
id | Auto-incremented Long | Auto | Unique Identifier for the Carrier |
isDefault | Boolean | No | Indicates whether the Carrier is the default Carrier or not. Only one Carrier can be set as default at any given time. Setting this to true for one Carrier will set all other Carriers to false |
phoneNumber | Character (50) | Yes | The phone number of the Carrier |
zip | Text (unlimited) | Yes | The postal code where the Carrier is located |
startTimeOfDay | Text | Yes | The start time of day set for the Carrier Note: Format must be in (HH:MM:SS) |
state | Text (must be valid state code) | Yes | The state where the Carrier is located. Can either be one of the following state codes:
|
street | Text (unlimited) | Yes | The street where the Carrier is located |
timezone | Text (unlimited) | Yes |
Timezone where the Carrier is located. Can either be:
|
Read
API PATH: | /api/v2/hosCarrierProperties |
METHOD: | GET |
EXAMPLE RESPONSE: |
[ { "carrierName": "Carrier 1", "carrierDotNumber": 208029, "street": "Central Avenue. Lake Station", "city": "Lake County", "state": "IN", "country": "USA", "zip": "46405", "phoneNumber": "1223334444", "timezone": "CST6CDT", "startTimeOfDay": "00:00:00", "isDefault": true, "accountId": 2251360, "id": 1 } ] |
Create
API PATH: | /api/v2/hosCarrierProperties |
METHOD: | POST |
EXAMPLE REQUEST: |
[ { "carrierName": "Carrier 2", "carrierDotNumber": 208029, "street": "Central Avenue. Lake Station", "city": "Lake County", "state": "IN", "country": "USA", "zip": "46405", "phoneNumber": "1223334444", "timezone": "CST6CDT", "startTimeOfDay": "00:00:00", "isDefault": false, "accountId": 2251360, "id": 2 } ] |
EXAMPLE RESPONSE: |
[ { "carrierName": "Carrier 2", "carrierDotNumber": 208029, "street": "Central Avenue. Lake Station", "city": "Lake County", "state": "IN", "country": "USA", "zip": "46405", "phoneNumber": "1223334444", "timezone": "CST6CDT", "startTimeOfDay": "00:00:00", "isDefault": false, "accountId": 2251360, "id": 2 } ] |
Update
API PATH: | /api/v2/hosCarrierProperties |
METHOD: | PUT |
EXAMPLE REQUEST: |
[ { "carrierName": "Carrier 2 edited", "carrierDotNumber": 208029, "street": "Central Avenue. Lake Station", "city": "Lake County", "state": "IN", "country": "USA", "zip": "46405", "phoneNumber": "1223334444", "timezone": "CST6CDT", "startTimeOfDay": "00:00:00", "isDefault": true, "accountId": 2251360, "id": 2 } ] |
EXAMPLE RESPONSE: |
[ { "carrierName": "Carrier 2 edited", "carrierDotNumber": 208029, "street": "Central Avenue. Lake Station", "city": "Lake County", "state": "IN", "country": "USA", "zip": "46405", "phoneNumber": "1223334444", "timezone": "CST6CDT", "startTimeOfDay": "00:00:00", "isDefault": true, "accountId": 2251360, "id": 2 } ] |
Delete
API PATH: | /api/v2/hosCarrierProperties/<id> |
METHOD: | DELETE |
REQUIRED FIELDS: | id |
API error calls
ERROR MESSAGE | HTTP STATUS | ERROR CODE | POSSIBLE CAUSES |
Default Carrier can not be deleted. | 500 | 11000 | Deleting the default carrier is not allowed |
There is a problem reading the carrier information account property | 500 | 1000 | The Carrier Information Account Property cannot be read properly or is not in a valid JSON format |
Error while handling request | 500 | 500 | Generic error message. Something is wrong with the request |