Skip to content

HTTP returns

The APIs follow a common status pattern, that is, the behavior of possible treatments is the same for all projects included in this portal.

Success - 2xx

Field Message Description Use
200 OK Generic code for success scenarios. GET, PUT
201 Created Creating a resource scenario. POST, PUT
202 Accepted Accepted a resource scenario for processing. POST, PUT
204 No Content Deleting a resource scenario. DELETE

Redirection - 3xx

Field Message Description Use
303 See Other Server response instructing the client to fetch the requested resource from another URI with a GET request. PUT

Warning

This return code adds the location attribute to the response headers, which has the function of indicating the address of a resource. The presence of this attribute means that the desired resource is located at the described address. To access it, a GET must be performed.

The most common standard implementation of HTTPs libraries and request execution tools automatically follow the redirect. This practice can lead to flow errors, where it is not explicit that the redirection is being executed automatically.

It is strongly recommended that you disable the automatic redirection functionality and perform the necessary treatments manually, in order to avoid confusion when using the APIs.

Client Errors - 4xx

Field Message Description Use
400 Bad request Errors related to the syntax of the request sent by the client. Below are examples of what are considered syntax errors: Poor formation of the request body. Request body format incompatible with what was sent in the Content-Type header. All verbs
401 Unauthorized Client authorization failure (token missing or expired). All verbs
403 Forbidden Lack of privileges to access the resource. These errors include validations using token introspection, for example, comparing a certain role that must be present in the “role” claim. All verbs
404 Not Found It can indicate two different situations: When the backend did not find the record from the filter specified by the client. When the server does not have the route specified in the URL. GET, DELETE
409 Conflict Indicates that the current request conflicted with the resource that is on the server. PUT
422 Unprocessable Entity The request is well formed but unable to be followed due to semantic errors. Incompatibility of the request against what is defined in the API contract. Specifically in relation to body fields, three pieces of information are considered: name, type and mandatory field. All verbs
429 Too Many Requests Indicates that the user has sent too many requests in a certain amount of time. All verbs

Server errors - 5xx

Field Message Description Use
500 Internal Server Error Generic server side error. It can be either a code failure when handling the request, or a failure related to the infrastructure. All verbs
502 Bad Gateway API Gateway received an invalid response from the backend. All verbs
503 Service Unavailable Temporary backend unavailability. All verbs
504 Gateway Timeout API Gateway did not receive the response from the backend in time. All verbs