Skip to content
ProFieldX

Errors

The shape of every error, how to decide by its code and what each code means.

Every error uses the same envelope:

{
  "code": "RATE_LIMITED",
  "message": "The request limit was exceeded. Try again later.",
  "details": [
    { "field": "scope", "message": "O limite por minuto desta chave foi excedido.", "code": "minute" }
  ],
  "requestId": "0197c1d2-8a2e-7f10-9c4b-3e5d6a7b8c90"
}
FieldWhat it is
codeStable error code. Your system decides what to do based on it.
messageText for people, in the language asked in Accept-Language: pt-BR (default) or en-US. The text may change, so never compare against it.
detailsItems with field, message and code when the error refers to specific inputs, such as an invalid field. The message of each item is always in Portuguese.
requestIdIdentifier of the call, equal to the X-Request-Id header.

When you contact support, include the requestId of the call that failed.

Codes

StatusCodeMeaning
400INVALID_CURSORThe cursor is invalid. Start the listing over without cursor.
401UNAUTHENTICATEDThe key is missing, malformed or unknown.
401API_KEY_REVOKEDThe key was revoked.
401API_KEY_EXPIREDThe key is past its expiry.
403PERMISSION_DENIEDThe key access does not include this operation.
403BILLING_FEATURE_REQUIREDThe current plan of the organization does not include the API.
404CUSTOMER_NOT_FOUNDThe customer does not exist in this organization.
404SERVICE_REQUEST_NOT_FOUNDThe service request does not exist in this organization.
404WORK_ORDER_NOT_FOUNDThe work order does not exist in this organization.
404SERVICE_LOCATION_NOT_FOUNDThe location does not exist or does not belong to the given customer.
404ACTIVITY_TYPE_NOT_FOUNDThe activity type is not available in this organization.
409CUSTOMER_CREATION_IDEMPOTENCY_CONFLICTThe same Idempotency-Key already registered, through the same key, a customer with different data.
409IDEMPOTENCY_KEY_REUSEDThe same Idempotency-Key already opened a service request with different data.
409CUSTOMER_MERGEDThe customer was merged into another record and can no longer be changed.
413PAYLOAD_TOO_LARGEThe body is larger than 1 MB.
422VALIDATION_ERROROne or more fields or headers are invalid or missing. See details.
422INVALID_CUSTOMERThe customer data cannot be accepted.
422INVALID_SERVICE_REQUESTThe service request data cannot be accepted.
422PAST_DUE_DATE_NOT_ALLOWEDThe organization does not accept a due date in the past.
422INVALID_COLLECTION_QUERYA filter is unknown or has a value that does not match the field.
429RATE_LIMITEDA rate limit was hit. Wait the time in Retry-After.
500INTERNAL_ERRORUnexpected error. Try again; if it persists, contact support.
503RATE_LIMIT_STORE_UNAVAILABLEThe limit control is briefly unavailable. Try again in a few seconds.
503SERVICE_UNAVAILABLEThe service is briefly unavailable. Try again in a few seconds.

A record of another organization answers as if it did not exist. If you get a code that is not on this list, handle the response by its HTTP status.