Errors

What errors look like and what you can do.

Structure of an error response

Form
Form Where it occurs Fields
Error code with meta fetch-organization, fetch-person, search-organizations, fetch-document and /v1/account when they reject a request error (a code or a short text), sometimes also message; in meta the explanation message plus request_credit_cost and credits_remaining
List in detail No matching company or person found (404), invalid search filters (422) detail, each entry with type (such as not_found), loc, msg and input; plus meta
Problem Details (application/problem+json) All errors from signals type, title, status, code, detail, for invalid parameters invalid_params; in meta also request_id
Only error Authentication (401, 403 for an unconfirmed email address) and limits (429) error; at the limit also message and retry_after
Only meta Not enough credits (402), except for signals meta.message, meta.request_credit_cost (the amount needed) and meta.credits_remaining
1{2  "error": "validation_failed",3  "meta": {4    "message": "financial_statement_type must be one of: auto, annual, consolidated.",5    "request_credit_cost": 0,6    "credits_remaining": 1457  }8}
422 · Example response: fetch-organization with an invalid value for financial_statement_type
1{2  "detail": [3    {4      "type": "not_found",5      "loc": [6        "query",7        "person_q"8      ],9      "msg": "Could not verify with sufficient confidence that 'Erika Musterfrau-Nichtvorhanden' is affiliated with 'Hetzner Online GmbH'",10      "input": {11        "person_q": "Erika Musterfrau-Nichtvorhanden",12        "organization_q": "Hetzner Online GmbH"13      }14    }15  ],16  "meta": {17    "request_credit_cost": 0,18    "credits_remaining": 14519  }20}
404 · Example response: fetch-person with a person who does not match the company
1{2  "type": "https://handelsregister.ai/problems/invalid-request",3  "title": "Invalid request",4  "status": 422,5  "code": "INVALID_REQUEST",6  "detail": "One or more Signals parameters are invalid.",7  "invalid_params": {8    "limit": [9      "Unknown Signals parameter."10    ]11  },12  "meta": {13    "request_id": "req_01m6b25551xazxjpc5ny6b2cx0",14    "request_credit_cost": 0,15    "credits_remaining": 14516  }17}
422 · Example response: signals with an unknown parameter

Status codes

Status codes
Status Cause What you can do
400 A parameter is invalid, such as a wrong company_id or a search term that is too short. Also api_key in the URL for /v1/account/*. Fix the request according to meta.message.
401 No valid API key and no valid token. Send the key in the header x-api-key, see Authentication.
402 Your balance does not cover the highest possible cost of the request. Top up credits or request fewer features, see Billing.
403 Email address not confirmed, a plan required (such as for fetch-person, search filters from Pro, or individual Signals topics) or the token lacks an ability. Confirm your email, choose a credit subscription or use a token with the right ability.
404 No matching company, person or document. For account endpoints, an unknown ID. Use the register court with the register number, or the entity_id.
408 The request took too long, for example because the register answers slowly during a realtime fetch. Retry later. Nothing was billed.
409 Monitoring and webhooks: the idempotency key belongs to different parameters or is still running, or a monitor for this company already exists. Use a new key, wait briefly or use the existing monitor.
415 The register holds the document only as a TIFF image. The API delivers documents as PDF or XML. Fetch the document directly from the Registerportal (register portal). Nothing was billed.
422 A value is invalid, such as financial_years outside the allowed range. Also an idempotency key that already belongs to different parameters. Fix the value according to meta.message or invalid_params; for new parameters, use a new key.
428 A write request to Monitoring or webhooks without an idempotency key. Send the header Idempotency-Key.
429 Too many requests in one minute. Wait as many seconds as Retry-After says, see Limits.
500 A temporary error, for example because the data source was briefly unavailable or the register returned an error. Retry with increasing intervals.
502 The search or the register returned an unreadable response. Retry with increasing intervals. Nothing was billed.
503 A service is temporarily unavailable: Signals, Monitoring, webhook checks or a document fetch with async=true. Retry after Retry-After or a little later.
504 fetch-document: the register did not answer in time. Request again after Retry-After. Nothing was billed.
We fetch documents and realtime data directly from the register. If the register is briefly unavailable for a document, you get 504 and pay nothing. If a realtime fetch fails, fetch-organization returns the stored data, without the Realtime surcharge. If a request takes too long, you get 408, also at no cost. Retry the request a few minutes later.

Free requests