Error handling
Errors use one stable envelope:
{"error":{"code":"CUSTOMER_NOT_FOUND","message":"Customer reference was not found","request_id":"00000000-0000-4000-8000-000000000000"}}
Always log request_id when contacting support. Stack traces, database errors and other internal details are never part of the public response.
Status codes at a glance#
| Status | Meaning | Example codes |
|---|---|---|
400 |
Malformed request — the request could not be parsed (for example invalid path-parameter encoding). | INVALID_REQUEST |
401 |
The credential itself is invalid, expired or revoked. | INVALID_API_KEY, API_KEY_REVOKED, API_KEY_EXPIRED |
403 |
The credential is valid but not authorized — scope, entitlement, lifecycle, or contract capacity. | INSUFFICIENT_SCOPE, FEATURE_NOT_ENTITLED, ORGANIZATION_NOT_ACTIVE, USAGE_LIMIT_REACHED |
404 |
A referenced resource does not exist for this credential's organization and environment. | CUSTOMER_NOT_FOUND, CUSTOMER_ACCESS_DENIED |
409 |
The request conflicts with an existing record. | IDEMPOTENCY_KEY_REUSED, EXTERNAL_REFERENCE_CONFLICT |
422 |
The request is well-formed but its content is invalid, or the calculation could not complete. | INVALID_REQUEST, FACTOR_NOT_FOUND, CALCULATION_FAILED |
429 |
Too many requests, too fast. Retrying after Retry-After will normally succeed. |
RATE_LIMITED |
500 |
A temporary internal problem. Safe to retry. | INTERNAL_ERROR |
403 vs 429: two different limits#
403 USAGE_LIMIT_REACHED and 429 RATE_LIMITED are unrelated:
403 USAGE_LIMIT_REACHED— your organization's effective contract period has used its included calculation capacity. This is a commercial limit set by your agreement. Retrying immediately will not help; capacity returns with a new contract period or an amendment. See Usage and contract capacity.429 RATE_LIMITED— requests are arriving faster than the configured throughput allows. This is a technical protection, unrelated to your contract. Wait for theRetry-Afterinterval (seconds) and retry.
409: two different conflicts#
IDEMPOTENCY_KEY_REUSED— the sameIdempotency-Keywas sent with a materially different request body, or the original request with that key is still processing. See Idempotency.EXTERNAL_REFERENCE_CONFLICT— theexternal_referencein the request already identifies a different calculation for this organization and environment. Eachexternal_referenceresolves to exactly one calculation.
All codes#
INVALID_API_KEY, API_KEY_REVOKED, API_KEY_EXPIRED, INSUFFICIENT_SCOPE, FEATURE_NOT_ENTITLED, ORGANIZATION_NOT_ACTIVE, CUSTOMER_NOT_FOUND, CUSTOMER_ACCESS_DENIED, INVALID_REQUEST, IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_REUSED, EXTERNAL_REFERENCE_CONFLICT, FACTOR_NOT_FOUND, CALCULATION_FAILED, USAGE_LIMIT_REACHED, RATE_LIMITED, INTERNAL_ERROR.