Response status codes and errors

The API uses the default HTTP codes to indicate both the success of a request and the failure:

CódigoDescrição
200The request was processed successfully.
201The request was successfully processed and a new record was created (POST requests).
400Some mandatory parameter was not sent, or the parameters sent are not correct.
401You are not authorized to access the endpoint. Check if the Authorization header has been sent.
403You are not authorized to access the endpoint. Check if the Authorization header is correct.
404Endpoint or resource not found. Review the URL.
409Conflict to perform the operation (eg. record already exists in a POST). Inspect the error for more details.
429Too many requests. Check the following headers:
- X-RateLimit-Limit
- X-RateLimit-Remaining
- X-RateLimit-Reset
500Gupy internal error. Retry your request and, in case the error persists, contact our support.

In addition to HTTP codes, the API returns information about the error in the response body. For example:

GET /api/v1/jobs?page=1&perPage=_val_
Host: api.gupy.io
Authorization: Bearer 1c3ce6b8251d91c1112aa11d1ef2daa1
 
{
    "title": "Validation Error",
    "detail": "Invalid perPage param: _val_ must be integer",
    "status": 400
}