Idempotency-Key header — the same key with the same body
returns the original response, instead of executing the action twice.
How to use it
Generate a fresh UUID (or any unique string up to 64 chars) per logical operation and send it on writes:409 IDEMPOTENCY_KEY_CONFLICT. That’s your signal that your retry logic and
your client both think they own the key — investigate before retrying.
Which endpoints honour it
| Endpoint family | Idempotency-Key |
|---|---|
PATCH /items/{id}/availability | ✅ honoured |
| Bulk OOS | ✅ honoured |
| Visibility writes | ✅ honoured |
| All reads | ✖️ ignored (reads are already idempotent) |
Practical recipe
- Generate the key once at the boundary where you decide to perform the action (e.g. when the operator clicks “mark out of stock”), and reuse it across all retry attempts of that one logical action.
- Do not regenerate the key on each retry — that defeats the safety.
- Keep your retries to a finite count with exponential backoff. Klikit remembers the key for 24 hours; after that the dedupe window has closed.