Skip to content

Error handling

Deterministic errors make safe agents. What each status code means, what to retry, and why a 409 is your friend.

The one that matters for agents: 409 conflict

Reusing an Idempotency-Key with a different payload returns 409. That is the API refusing to guess: the same key must mean the same order. Retrying the identical request returns the original order (200); changing the payload needs a new key. Full write-up: idempotent orders for AI agents.

Status codes

Retry policy for agent tools

Retry 408/429/5xx and network errors with exponential backoff — but only on GETs and idempotency-keyed writes. Never blind-retry an un-keyed write. This is exactly the policy built into the OrderCore SDKs and the tool descriptions we recommend for function-calling agents.

Validation guardrails on POST /v1/orders

Related

Get an API key