Skip to main content
Every JSON endpoint returns the same envelope on both success and failure. On success, status.code is 0, errors is empty, and data carries the payload. On failure, the HTTP status reflects the broad failure category and the envelope’s status / errors fields carry detail.

Envelope shape

HTTP status codes

Status codes inside the envelope

status.code is a numeric service-level code that gives more nuance than the HTTP status. The most common values are:
The full ServiceResultType catalog evolves over time. For unrecognised codes, fall back to the HTTP status and the errors[].message text — both are stable contracts.

Retry strategy

  • 401 — refresh the bearer token and retry once. Do not retry blindly; if the refresh also fails, the API key has likely been revoked.
  • 403 — do not retry. Fix the request scope.
  • 429 — back off. Honour the next minute boundary; the limit is a fixed window.
  • 5xx — retry with exponential backoff (e.g., 1s, 2s, 4s, 8s) up to a small cap. Treat the request as non-idempotent if you cannot guarantee otherwise.