Hoppa till innehåll
Menu and API reference

Guide

Error handling

Every error shares the same structure, with stable error codes your client can act on.

Every failed call returns the same basic structure, so a single error handler is enough for the whole API.

json
{
  "error": {
    "type": "invalid_request_error",
    "code": "validation_error",
    "message": "One or more request parameters are invalid.",
    "param": null,
    "request_id": "req_9f3a1c0d2b4e6a8c1d3f",
    "errors": [
      { "param": "limit", "message": "must be an integer 1-100" }
    ]
  }
}
  • type gives the broad error category.
  • code is the stable machine code your client logic should switch on.
  • message gives a short explanation in English and never echoes sensitive input.
  • param identifies the parameter when the error concerns one specific field.
  • request_id matches the response's X-Request-Id. Include the value when you contact support.

Error codes

HTTPCodeWhat to do
401invalid_api_keyCheck that the correct active key is being sent as the Bearer token
403missing_scopeRequest the right scope, or use a resource the key is allowed to read
403terms_acceptance_requiredAccept the latest version of the data terms
403not_in_planChange plan, or ask for the feature to be added to your agreement
404not_foundCheck the identifier, or treat the record as missing
400invalid_requestCorrect the request before sending it again
400invalid_cursorRestart the listing from the first page
400cursor_conflictGo back to the filters from the first page, or start a new listing
410cursor_expiredStart over, because the page cursor has expired
422validation_errorCorrect the field named in error.errors
429rate_limitedWait for the time given in Retry-After
429monthly_quota_exceededPause until next month, or raise the quota
503query_timeoutNarrow the selection and try again
503service_unavailableRetry with backoff after the stated wait
500internal_errorLog the request_id and contact us if the error recurs

Unknown parameters are rejected

If a filter is misspelled the API responds with 422. For example, ?min_revenu=5 is rejected outright. So you are never at risk of a mistyped filter quietly returning a huge selection.

404 and unknown identifiers

Malformed, unknown and disallowed identifiers all produce the same 404 response. The API does not echo the value you submitted. That means the response cannot be used to check whether a particular person appears in the registry.