Errors
The Onroad ELD API uses conventional HTTP status codes to indicate the result of a request. Codes in the 2xx range indicate success, 4xx a problem with the request, and 5xx an error on the server side.
Every error response shares the same JSON shape:
{
"error": {
"status": 0,
"code": "string",
"message": "string"
}
}Unauthorized
CLIENTThe x-api-key or provider-token header is missing, malformed, or invalid. Check that both headers are present and correct.
{
"error": {
"status": 401,
"code": "unauthorized",
"message": "Missing or invalid API credentials."
}
}Forbidden
CLIENTThe credentials are valid but the account is not authorized to access this resource — for example, requesting a USDOT number outside your permitted scope.
{
"error": {
"status": 403,
"code": "forbidden",
"message": "You do not have access to this resource."
}
}Not Found
CLIENTThe requested resource does not exist — an unknown USDOT number, VIN, or endpoint path.
{
"error": {
"status": 404,
"code": "not_found",
"message": "No record found for the requested USDOT number."
}
}Internal Server Error
SERVERAn unexpected error occurred on our side while processing the request. Safe to retry after a short delay; if it persists, contact support.
{
"error": {
"status": 500,
"code": "internal_error",
"message": "An unexpected error occurred. Please try again later."
}
}Not Implemented
SERVERThe requested method or endpoint is recognized but not implemented. Verify you are using GET against a supported endpoint.
{
"error": {
"status": 501,
"code": "not_implemented",
"message": "This method is not implemented."
}
}Bad Gateway
SERVERThe upstream service returned an invalid response while processing the request. Safe to retry after a short delay; if it persists, contact support.
{
"error": {
"status": 502,
"code": "bad_gateway",
"message": "Upstream provider is temporarily unavailable."
}
}