API v2 (2.0.0)Guides

Errors

Success

Every success is HTTP 200 in the v2 envelope. profiler is always an empty array.

{ "code": 200, "version": 2, "success": true, "message": null, "data": { "entries": [] }, "profiler": [] }

Business errors

A business error keeps the envelope, with HTTP 409, message set to error and the reason in data.data:

{ "code": 409, "version": 2, "success": false, "message": "error", "data": { "data": "No deliveries found" }, "profiler": [] }

Each operation in the reference lists its reasons.

Other errors

Authentication, routing and validation errors use a shorter body, with the text in message. The text starts with a space.

HTTPWhen
401Authorization missing, or the key does not exist or was deleted
404No route matches
405Wrong HTTP method for the path
409Validation failed: message lists every problem, separated by commas
{ "code": 409, "success": false, "message": " O campo \"name\" é obrigatório" }

On this page