Errors
Single error shape, stable codes, when to retry — and the full code catalogue.
Every API error — authentication, validation, ERP rules, quotas, outages — has the same shape, and a stable code that says what to do.
Shape of an error
{
"success": false,
"statusCode": 422,
"error": {
"statusCode": 422,
"code": "BUSINESS_RULE_VIOLATION",
"message": "Rejected by a business rule: see detail.reason.",
"detail": { "reason": "Transition VALIDATED → SENT interdite." }
},
"message": "Rejected by a business rule: see detail.reason.",
"requestId": "7d0c1f9a-3e2b-4a51-9a8e-0b6f3c2d1e4f",
"timestamp": "2026-10-02T09:15:00.000Z"
}| Field | Use |
|---|---|
error.code | to test in your code: it never changes |
error.message | to show or log; follows the requested language, may change |
error.detail | code-specific details: violations, required, modules, features, reason… |
requestId | to quote to support (also in the X-Request-Id header) |
ERP business-rule messages only exist in French: in English, message is the code’s generic message and the original cause is in detail.reason. No error contains a stack trace, a database message, a table name or a host.
400 or 422?
- 400 — the request is malformed: missing, unknown or mistyped field, unknown parameter, sort not allowed. Your code needs fixing;
detail.violationssays what. - 422 — the request is correct, but the ERP’s state refuses it: forbidden status transition, a paid invoice whose amounts you want to change, a delivery note already delivered… It is a refusal to show to the user, not a bug.
{
"success": false,
"statusCode": 400,
"error": {
"statusCode": 400,
"code": "VALIDATION_FAILED",
"message": "Invalid request: see detail.violations.",
"detail": { "violations": ["pageSize must not be greater than 100"] }
},
"message": "Invalid request: see detail.violations.",
"requestId": "7d0c1f9a-3e2b-4a51-9a8e-0b6f3c2d1e4f",
"timestamp": "2026-10-02T09:15:00.000Z"
}When to retry
| Response | Retry? |
|---|---|
429 API_RATE_LIMITED | yes, after Retry-After |
503 SERVICE_UNAVAILABLE | yes, after Retry-After |
409 IDEMPOTENCY_IN_PROGRESS | yes, after Retry-After, same key |
| 500, timeout, network cut | yes, with a growing delay and the same Idempotency-Key |
| other 4xx (400, 401, 402, 403, 404, 409, 410, 422) | no: fix the request, the key or the data |
A creation retried without Idempotency-Key may create twice: see Idempotency.
Resource not found
404 NOT_FOUND covers three cases, deliberately merged: the resource does not exist, it is of another kind (a quote requested on the invoices route), or it belongs to another workspace. A workspace can never learn that another one’s data exists.
Code catalogue
Every code the API can return, its status and its circumstance — taken from the contract:
| Status | Code | When |
|---|---|---|
| 400 | API_KEY_AMBIGUOUS | Authorization and X-API-Key carry two different keys. |
| 400 | IDEMPOTENCY_KEY_INVALID | Malformed Idempotency-Key header (1–255 printable ASCII characters). |
| 400 | INVALID_CURSOR | Unreadable cursor, or issued for another sort or other filters. |
| 400 | VALIDATION_FAILED | Missing, unknown or mistyped field; unknown parameter; sort not allowed (detail.violations, detail.allowed). |
| 401 | API_KEY_EXPIRED | Key has expired. |
| 401 | API_KEY_INVALID | Unknown or malformed key. |
| 401 | API_KEY_MISSING | No key presented. |
| 401 | API_KEY_REVOKED | Key revoked. |
| 401 | CUSTOMER_AUTH_FAILED | Rental customer sign-in refused: wrong email or password, disabled account. |
| 401 | CUSTOMER_SESSION_INVALID | Rental customer session (X-Rental-Session) missing, expired or closed. |
| 402 | FEATURE_NOT_INCLUDED | Option not included in the plan (multi-currency…). |
| 402 | MODULE_NOT_INCLUDED | Module not included in the plan. |
| 402 | PLAN_QUOTA_EXCEEDED | Plan quota reached by the operation (documents of the month…). |
| 402 | SUBSCRIPTION_INACTIVE | Workspace subscription inactive. |
| 403 | API_FEATURE_UNAVAILABLE | Option required by the route missing from the plan (detail.features). |
| 403 | API_INSUFFICIENT_SCOPE | Missing scope (detail.required). |
| 403 | API_KEY_WRONG_PERIMETER | QuoSuite key on a QuoShop route, or the reverse; QuoRent key outside the rental routes and webhooks. |
| 403 | API_MODULE_UNAVAILABLE | Resource module missing from the plan (detail.modules). |
| 403 | API_ORIGIN_NOT_ALLOWED | Browser call from an origin not allowed for this key. |
| 403 | API_ROUTE_NOT_DECLARED | Route not open to the public API. |
| 403 | API_TENANT_INACTIVE | Workspace without an active subscription. |
| 403 | API_TENANT_MISMATCH | Key from another workspace than the one designated. |
| 403 | FORBIDDEN | Action refused (suspended store…). |
| 404 | NOT_FOUND | Resource not found, of another kind, or from another workspace. |
| 409 | CONFLICT | Unique value already taken; external reference replayed with different content (detail). |
| 409 | IDEMPOTENCY_IN_PROGRESS | Same Idempotency-Key, first request still in progress (Retry-After). |
| 410 | ENDPOINT_RETIRED | Deprecated route whose end date has passed (detail.successor). |
| 413 | PAYLOAD_TOO_LARGE | Request body too large. |
| 422 | BUSINESS_RULE_VIOLATION | ERP business rule (forbidden transition, locked paid document, stock…). |
| 422 | IDEMPOTENCY_KEY_REUSED | Same Idempotency-Key, different body or route. |
| 429 | API_AUTH_BLOCKED | Too many authentication failures from this address. |
| 429 | API_RATE_LIMITED | Key or workspace quota reached (Retry-After). |
| 500 | INTERNAL_ERROR | Unexpected error — quote requestId to support. |
| 503 | SERVICE_UNAVAILABLE | Temporarily unavailable (Retry-After). |