Overview / Error codes

Error codes

Every failure, on every endpoint, uses this shape. The code is stable; the message is human-facing and may be reworded. Write your integration against the code.

{
    "error": {
        "code": "validation_failed",
        "message": "The submitted data is invalid.",
        "details": { "fields": { "price": ["Price must be a number."] } }
    }
}
CodeHTTPWhen it happens
authentication_required 401 Credentials are missing or unparseable.
invalid_credentials 401 The key does not exist, or the secret does not match it. The two cases are deliberately indistinguishable.
key_revoked 401 The key exists but was switched off in the panel.
key_expired 401 The key passed its expiry date. The message names the exact date.
brand_inactive 403 The brand account has been closed.
subscription_inactive 403 The subscription is cancelled or expired.
plan_upgrade_required 403 API access starts with the Zincir plan.
insufficient_scope 403 details lists exactly which scopes are missing and which the key holds.
not_found 404 The record does not exist, or belongs to another brand. Both look the same from outside.
validation_failed 422 details.fields maps each rejected field to its errors.
bad_request 400 A query parameter is out of range or in the wrong format.
rate_limited 429 The per-key minute limit was exceeded. Retry-After says how long to wait.
conflict 409 For example: closing a cash day that is already closed.
server_error 500 An unexpected failure. Safe to retry.

Retrying

rate_limited and server_error are safe to retry — back off and try again. Everything else is a problem with the request itself and will fail identically no matter how often you send it.