Get started

Errors

https://docs.importexportapi.com/errors

Every error response, from any endpoint, uses the same JSON envelope. Branch on error, show message to humans, and keep request_id for support. The same id is on the x-request-id header of every response, success or error.

Error envelope
{
  "error": "quota_exceeded",
  "message": "Credit balance exhausted. Top up in the dashboard.",
  "request_id": "8f3c2a1e-5b7d-4c9a-9e2f-1a2b3c4d5e6f"
}

Envelope fields

errorstringalways present

Stable machine code. Use it in code; it never changes meaning.

messagestringalways present

Human-readable description. May change wording; do not match on it.

request_idstringalways present

Unique id for this request. Include it when contacting support.

Status codes

CodeMeaningerror
200Success.
400Bad request: a required input is missing.
bad_request
401Invalid, revoked, or missing API key.
invalid_key
403Credit quota exhausted, or the request did not pass through the gateway.
quota_exceededforbidden
422Unparseable input: the body did not validate against the schema.
validation_error
429Rate limit exceeded. Honor the `Retry-After` header.
rate_limit_exceeded
503An upstream dependency is unavailable. Retry with backoff.
provider_unavailable
504An upstream dependency timed out. Retry with backoff.
provider_timeout