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.

CodeDescriptionMessage
400Bad RequestA parameter is missing or invalid
401UnauthorizedThe Bearer token is missing or invalid
404Not FoundThe item, or its media, was not found
429Too Many RequestsThe rate limit was exceeded. See Rate Limiting
500Internal Server ErrorAn unexpected error occurred
504TimeoutThe 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
}
PropertyData TypeDescription
errorstringalways TooManyRequests
messagestringa short description of the problem
retryAfterSecondsintthe number of seconds to wait before retrying. Can be null

Copyright © PHD Solutions 2024