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/v2/applications?jobId=nonono&candidateId=nonono
Host: api.gupy.io
Authorization: Bearer 1c3ce6b8251d91c1112aa11d1ef2daa1
 
{
    "errors": [
       {
           "code": "BAD_ARGUMENT",
           "target": "jobId",
           "message": "each value in jobId must be a number conforming to the specified constraints"
       },
       {
           "code": "BAD_ARGUMENT",
           "target": "candidateId",
           "message": "each value in candidateId must be a number conforming to the specified constraints"
       },