Getting Started
Idempotency
Use the Idempotency-Key header to retry safely. LandedFees stores the response for 24 hours and returns the same body on replay.
How it works
- Include an
Idempotency-Keyheader (recommended: UUID v4) on any POST request. - The first request runs normally. LandedFees stores the request hash and response for 24 hours.
- Retry the same request with the same key: LandedFees returns the cached response and does not re-run the engine or bill quota.
- Retry with the same key but a different body: LandedFees returns
409 idempotency_conflict. - After 24 hours, the key expires and a new request runs fresh.
When to use it
Any retry loop over the network. Cron-driven batch imports. Any code path where a partial network failure could otherwise double-persist a calculation or double-bill quota. GET endpoints (/v1/rates/*) do not need idempotency keys because they are already safe.
