Supported endpoints
The following endpoints accept an idempotency key:
The header is optional. Without it, Tilta processes every request it receives.
Sending a key
Generate a new random UUID for each operation and send it in theIdempotency-Key header. Keep the key with the operation so that a retry sends the same value.
8-4-4-4-12 hexadecimal form. Any other value is rejected with a 400 and the code INVALID_IDEMPOTENCY_KEY. Use a version 4 UUID from your language’s standard library.
How Tilta handles a repeated key
Each key belongs to one operation. Reusing a key for the same operation returns a409 with the code CONFLICT, and Tilta doesn’t process the request. Tilta keeps used keys indefinitely, so a key can’t be reused later either. The same key on a different operation – for example, create a buyer and then create an order – counts as a separate key.
The 409 doesn’t repeat the response of the original request.
When a key counts as used
Tilta records a key once the request has passed authentication and validation, and before the request is processed:- Rejected with
401or400. The key isn’t used. Fix the request and retry with the same key. - Accepted for processing. The key is used, whatever the outcome. If processing then fails – for example with a
404, a409for a resource that already exists, or a500– a retry with the same key returns a409.