Errors
The error object, the shared codes with what to do for each, and what to send us when you ask for help.
On this page
An error is an HTTP status and a JSON object whose code never changes its meaning.
The error object
| Field | Meaning |
|---|---|
code | A stable code for the cause. Act on code. |
message | A sentence to read in your logs. It can change, so do not show it to the people who use your software and do not match on it. |
fields | On a 400, each field that is wrong and why. Absent otherwise. |
requestId | The identifier of this request. Quote it when you ask us for help. |
Every answer, an error or not, also carries the header X-RDC-Request-Id with the same value.
The shared codes
Every product answers these. The last column says whether to send the request again.
| Status | Code | Meaning | Retry |
|---|---|---|---|
400 | invalid_request | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | No. Fix the request. |
401 | unauthorized | The token is missing, expired or not ours. | After you get a new token. |
403 | forbidden | The token does not give access to this company or operation. | No. |
404 | <thing>_not_found | The record does not exist for this company. | No. |
409 | revision_conflict | expectedRevision is older than the record. | Read the record again, then send a new operation. |
409 | operation_reused | This operationId was sent before with another body. | No. |
422 | A code of the product, such as blocked_by_checks | The request is well formed and a rule of the product refuses it. | No. The code says what to change. |
429 | rate_limited | Too many requests. Retry-After gives the seconds. | Yes, after the pause. |
503 | unavailable | The service cannot answer now. | Yes, with the same operationId. |
Codes of a product
A product adds codes for its own rules, always at 422 or as <thing>_not_found at 404. They are listed on the Errors page of the product docs, after the shared table. A product never renames a shared code or gives it another meaning.
A validation answer
A request that cannot be read or breaks the contract answers 400. fields names each field that is wrong, so one answer lists every problem.
Answer 400 invalid_request
{
"code": "invalid_request",
"message": "The request breaks the contract.",
"fields": [
{
"field": "lines[0].quantity",
"problem": "must be a decimal string such as \"24\""
},
{
"field": "occurredAt",
"problem": "is required"
}
],
"requestId": "req_8Kq2mT4vXz9N"
} codeisinvalid_request: fix the request. Sending it again unchanged gives the same answer.fields[].fieldis the path of the field, andproblemsays what is wrong with it.requestIdis the identifier to send us.
A conflict answer
When the record has changed since you read it, the change is answered with 409 revision_conflict. Nothing was applied.
Answer 409 revision_conflict
{
"code": "revision_conflict",
"message": "The balance changed after revision 6.",
"requestId": "req_3Hd7vB1pLw5R"
} - Read the record again: its
revisionis now newer than the one you sent. - Decide whether your change still applies, then send it as a new operation, with a new
operationId.
What to send us when you ask for help
- The
requestIdof the answer. - The
operationIdof the change, if there was one. - The time, with the time zone.
In the product docs
- ERP: Error codes of the product
- Inventory: Error codes of the product
- WMS: Error codes of the product
- POS: Error codes of the product
- Self-Checkout: Error codes of the product
- Accounting: Error codes of the product
- Treasury: Error codes of the product
- HR: Error codes of the product
- Payroll: Error codes of the product
- eLearning: Error codes of the product
- CRM: Error codes of the product
- AI Assistant: Error codes of the product
- Private AI Workspace: Error codes of the product
- DMS: Error codes of the product
- BI: Error codes of the product
- IoT: Error codes of the product
- e-Factura Gateway: Error codes of the product
- e-TVA Check: Error codes of the product
- e-Transport Gateway: Error codes of the product
- Tax Filing: Error codes of the product
- REGES Gateway: Error codes of the product
- Integrations: Error codes of the product
Related pages
- Idempotency and retries: when to send a request again.
- Limits: the 429 answer.