enVision Cloud / API Guide
Error Codes
Description of error codes returned by enVision Cloud APIs
Error Codes
When a request fails, the response has one of the following HTTP status codes.
| Code | Description | Message |
|---|---|---|
| 400 | Bad Request | A parameter is missing or invalid |
| 401 | Unauthorized | The Bearer token is missing or invalid |
| 404 | Not Found | The item, or its media, was not found |
| 429 | Too Many Requests | The rate limit was exceeded. See Rate Limiting |
| 500 | Internal Server Error | An unexpected error occurred |
| 504 | Timeout | The remote device did not respond in a timely manner (Cloud Trigger and video only) |
The errorCode in a measurement result (Cloud Trigger and Transactions) is a different code. It describes the measurement on the device, where 0 means success. See the Error Codes pages of the enVision 100S and the enVision K150S.
Example Errors
The body of an error is either a short text message or a JSON error object.
Example Text Error
Code: 400; Error : Start Date must be <= End Date
Example JSON Error
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"startDate": [ "The value 'abc' is not valid." ]
},
"traceId": "00-b6a0dff194fe6f193f545cef47ae45f0-a1819d3f220e359a-00"
}
Rate Limiting
The enVision Cloud APIs limit how many requests a company can make. The limit is shared by all the Bearer tokens of a company.
It applies to the Terminals, Devices, Company, Transactions, Transaction Media, Transaction Images, Shipments and Shipment Media endpoints. It does not apply to Cloud Trigger or the video endpoints.
Example Response
HTTP/1.1 429 Too Many Requests
Retry-After: 540
Content-Type: application/json
{
"error": "TooManyRequests",
"message": "Rate limit exceeded. Please retry later.",
"retryAfterSeconds": 540
}
| Property | Data Type | Description |
|---|---|---|
| error | string | always TooManyRequests |
| message | string | a short description of the problem |
| retryAfterSeconds | int | the number of seconds to wait before retrying. Can be null |
