When the Hours of Service platform encounters an error, it returns an error message along with a code. Here is the list of API error codes and the conditions that might have triggered these errors.
Accounts
| ERROR MESSAGE | HTTP STATUS | ERROR CODE | POSSIBLE CAUSES |
| Current account is not a reseller. | 500 | 8000 | POST error because the current account is not a reseller account. |
| A user with the given email address already exists | 500 | 3100 | POST error because the administrative user’s email address is already used by another user |
| The new account to insert should not have an id. | 500 | 1000 | POST error because the account must have a name |
| The new account to insert should not have an account token. | 500 | 1000 | POST error because the account must not have an account token |
| The new account name must not be blank. | 500 | 7000 | POST error because the account name must not be blank |
| Access Denied. User is not authorized for this request. | 403 | 8000 | POST and PUT methods require permission of PERM_IS_ACCOUNT_ADMIN or higher |
| Account already exists with this name. | 500 | 1001 | POST or PUT error because account name is already used by another account. |
| A <domain.name> domain name already exists | 500 | 1004 | POST or PUT error because domain name is already used by another account. |
| <domain.name> is not a valid domain. | 500 | 1000 | POST or PUT error because domain name is not a valid domain name. |
| One resellable product is required. | 500 | 1005 | POST or PUT error because account must have one resellable product |
| Only one resellable product is required. | 500 | 6000 | POST or PUT error because account is limited to only one resellable product |
| Only one product module allowed per account | 500 | 6000 | POST or PUT error because account is limited to one product module |
| <module> is NOT resellable by the parent account | 500 | 1300 | POST or PUT error because module cannot be resold by the parent account |
| User does not have permission to edit or delete this account | 403 | 8000 | PUT or DELETE error because user cannot delete the specified account |
| User does not have DELETE role | 403 | 8000 | DELETE error because user role does not allow it to delete an account |
| DELETE on own account is not allowed | 403 | 8000 | DELETE error because own account cannot be deleted |
| <METHOD> is not supported. | 500 | 12000 | POST, PUT and DELETE methods are not allowed for /meta/tree |
Terminals
| ERROR MESSAGE | HTTP STATUS | ERROR CODE | POSSIBLE CAUSES |
| Entities should not contain an Id when creating. | 500 | 11000 | POST error because request must not contain an id |
| Terminal should have a name. | 500 | 7000 | POST error because the terminal must have a name |
| Terminal should have a value for Start Time of Day. | 500 | 7000 | POST error because the terminal must have a Start Time of Day |
| Unable to save record | 500 | 500 | POST or PUT error because required fields are missing or incorrect |
|
Access Denied. User is not authorized for this request.
|
403
|
8000
|
POST and PUT methods require permission of PERM_IS_ACCOUNT_ADMIN and PERM_EDIT_TERMINALS |
| DELETE method require permission of PERM_EDIT_TERMINALS | |||
| Unable to save the Terminal. Name already in use. | 500 | 1001 | POST or PUT error because the terminal name is already used by another terminal. |
| Unable to save the Terminal. Terminal Code already in use. | 500 | 1001 | POST or PUT error because the terminal code is already used by another terminal. |
| Cannot find requested entity. (id = <id>) | 500 | 3000 | PUT or DELETE error because the supplied id does not exist |
| Main Office Terminal cannot be deleted | 500 | 11000 | DELETE error because a terminal that is set as main office cannot be deleted |
| Error while handling request | 500 | 500 | Generic error message. Something is wrong with the request |
Equipment
| ERROR MESSAGE | HTTP STATUS | ERROR CODE | POSSIBLE CAUSES |
| Entities should not contain an Id when creating. | 500 | 11000 | POST error because request must not contain an id |
| Equipment with name <name> already exists | 500 | 1001 | POST error because equipment name is already used by an equipment in the system. |
| You are not allowed to create an equipment and assign a visibility set you do not have access to. | 403 | 8000 | POST error because request contains a visibility set that the PERM_IS_ASSETADMIN user does not have access to. |
| Equipment should have an asset type. | 500 | 7000 | POST and PUT methods require the asset type of ‘Vehicle’ or ‘Trailer’ |
| Trailer name cannot be more than 10 characters. | 500 | 1005 | POST or PUT error because name of trailer exceeds 10 characters. |
| Trailer name can only contain alphanumeric characters, no spaces. | 500 | 1005 | POST or PUT error because name of trailer contains invalid characters. |
| A visibility set was not found with the given name or id. | 500 | 17000 | POST or PUT error because the equipment contained a non-existent visbility set |
| Asset named <name> already exists. | 500 | 2000 | PUT error because equipment name is already used by an equipment in the system. |
| You are not allowed to remove an equipment from a visibility set you do not have access to. | 403 | 8000 | PUT error because request attempted to remove a visibility set that the PERM_IS_ASSETADMIN user does not have access to. |
| You are not allowed to update an equipment from a visibility set you do not have access to. | 403 | 8000 | PUT error because request attempted to add a visibility set that the PERM_IS_ASSETADMIN user does not have access to. |
| Cannot modify a deleted entity. | 500 | 11000 | PUT error because a soft-deleted record cannot be updated. |
| Access Denied. User is not allowed to delete this record. | 403 | 8000 | DELETE error because driver is not allowed to delete the equipment |
| Entity is already deleted. | 500 | 11000 | DELETE error because a soft-deleted record cannot be deleted again. |
| Access Denied. User is not authorized for this request. | 403 | 8000 | POST, PUT and DELETE methods require permission of PERM_EDIT_EQUIPMENT |
| Error while handling request | 500 | 500 | Generic error message. Something is wrong with the request |
Users
| ERROR MESSAGE | HTTP STATUS | ERROR CODE | POSSIBLE CAUSES |
| The new user to insert should not have an id. | 500 | 1000 | POST error because request must not contain an id |
| A user with the given email address already exists. | 500 | 3100 | POST error because the email address is already used by another user |
| An email address is required. | 500 | 1000 | POST or PUT error because user does not have an email address |
| <email> is not a valid email address. | 500 | 1000 | POST or PUT error because user does not have a valid email address |
| User does not have sufficient privelege to set isVerified | 403 | 8000 | POST or PUT error because setting isVerified requires permission PERM_IS_USER_ADMIN or higher |
| Can only create users in your account or your sub accounts. | 500 | 500 | POST or PUT error because user is not allowed to create or edit users on other accounts |
| A user must have at least one visibility set. | 500 | 11000 | POST or PUT error because user does not have a visibility set |
| A visibility set was not found with the given name or id. | 500 | 3000 | POST or PUT error because the user contained a non-existent visbility set |
| User cannot assign user role: <user role name> | 500 | 20000 | POST or PUT error because the current user is not allowed to create or update a user with the given user role. |
| UserRole of id <id> does not exist. | 500 | 3000 | POST or PUT error because id was not found in the account |
| Users cannot modify their own user roles | 500 | 20000 | PUT error bceause user cannot modify his own user roles |
| Id cannot be 0 for updates. | 500 | 4000 | PUT error because request requires id |
| A user with the given id was not found | 500 | 4000 | PUT error because user id does not exist |
| Cannot update system user. | 500 | 1001 | PUT error because editing the Unidentified Driver is not allowed |
| Cannot delete system user. | 500 | 1001 | DELETE error because deleting the Unidentified driver is not allowed |
| Users cannot delete themselves | 500 | 20000 | DELETE error because user is not allowed to delete himself |
Drivers
| ERROR MESSAGE | HTTP STATUS | ERROR CODE | POSSIBLE CAUSES |
| Entities should not contain an Id when creating. | 500 | 11000 | POST error because request must not contain an id |
| Driver with email <email> already exists | 500 | 1001 | POST error because of email address is already used by a user in the system. |
| No password set for this driver | 500 | 7000 | POST error because there is no password in the request |
| CDL Number is already associated with another driver. | 500 | 1004 | POST or PUT error because CDL number is already used by a user in the system. |
| A ROLE_DRIVER must have a HOS_CDL_NUMBER | 500 | 1005 | POST or PUT error because there is no cdlIssuingNumber in the request. |
| A ROLE_DRIVER must have a HOS_CDL_ISSUING_STATE | 500 | 1005 | POST or PUT error because there is no cdlIssuingState in the request. |
| Unable to save record | 500 | 500 | POST or PUT error because required fields are missing or incorrect |
| Driver with ID <id> does not exist. | 500 | 4000 | PUT error because id doesn’t exist in the account. |
| Cannot edit system user | 500 | 1001 | PUT method is not allowed for the Unidentified Driver |
| Cannot delete system user | 500 | 1001 | DELETE method is not allowed on the Unidentified Driver |
| Access Denied. User is not authorized for this request. | 403 | 8000 | POST, PUT and DELETE methods require permission of PERM_EDIT_DRIVERS |
| Error while handling request | 500 | 500 | Generic error message. Something is wrong with the request |