Skip to content

Errors ​

Errors are always JSON - also without an Accept header - and never a redirect to a login page. Every error has a message; many carry a machine-readable error code as well.

json
{ "message": "The access token needs the scope \"user\" or \"console-zones\".", "error": "missing_scope", "scope": "console-zones", "scopes": ["user", "console-zones"] }

Use error (where present) for decisions in your code, and message for logs and humans.

Status codes ​

StatusWhenBody
401no, invalid, expired or revoked token; unknown user{"message": "Unauthenticated."}
401the token's app may not use the Console API beta{"message": "…", "error": "client_not_allowed"}
402a direct purchase: the charge failed{"message": "…", "error": "order_failed", "order": {…}}
403the token lacks the scope{"message": "…", "error": "missing_scope", "scope": "…", "scopes": […]}
403you may not access the object or action{"message": "…"}
404no such object or endpoint - also objects you cannot see{"message": "…"}
409the request conflicts with the object's state{"message": "…", "error": "<code>"}
422validation failed{"message": "…", "errors": {"field": ["…"]}}
429rate limit exceeded{"message": "Too Many Attempts."} (see Rate limits)
500an order request failed after its order was recorded (see Idempotency){"message": "…", "error": "order_unknown_state", "order_id": "…"}
502the checkout could not be opened on Anikeen ID beta{"message": "…", "error": "checkout_unavailable", "order": {…}}
503a backend the request needs is not reachable right now{"message": "…"}

Validation errors ​

422 lists the problems per field. Fields of order items are keyed by their position:

json
{
  "message": "The selected location is invalid.",
  "errors": {
    "items.0.attributes.location_id": ["The selected location is invalid."]
  }
}

Error codes ​

Codes marked beta belong to features that are not yet released to production.

errorStatusMeaning
client_not_allowed beta401the token's app may not use this API
missing_scope403the token lacks a scope; scope names it
email_not_verified beta403the user's e-mail address is not verified in Anikeen ID
owner_only beta403a team member may not order: the owner does not allow members to buy
team_managed_by_app beta403the team is managed by an app: orders go through that app
no_app_team beta404GET /app-team with a token that is not an app token
account_conflict beta409the user's e-mail address belongs to another Console account
owner_sign_in_required409the team owner's Anikeen ID login expired - the owner must sign in to the Console once
order_refused409e.g. no default billing address or payment method
billing_suspended beta409the server is suspended for an unpaid invoice (containers answer 409 without a code)
provisioning beta409the product is still being set up (or its setup is stuck and with support) - see Products being set up
server_protected beta409the server's deletion protection is on
idempotency_key_in_progress409the first request with this key still runs - see Idempotency
idempotency_key_reused422the key was used with another body
order_failed402the charge of a direct purchase failed
order_unknown_state500the order request failed after its order was recorded; order_id names it
checkout_unavailable beta502the checkout could not be opened; try again with a new key
rate_limited429more than 10 orders per minute and team

The reseller API adds reseller_terms_required, reseller_offboarding and reseller_orders_blocked.

In the PHP SDK ​

The SDK throws one exception class per case - see SDK errors.

Anikeen Console documentation