API reference
Idempotency
Retry Verilo API requests safely with Idempotency-Key and claim references, so a network failure never opens two damage claims.
Networks fail mid-request. Verilo gives you two ways to retry without doing anything twice.
Idempotency-Key
Send an Idempotency-Key header on any POST. The first answer is kept for 24 hours; a retry with the same key and the same body gets that answer again, with the header Idempotent-Replayed: true, and nothing runs a second time.
curl https://api.verilo.app/v1/claims \
-H "Authorization: Bearer $VERILO_API_KEY" \
-H "Idempotency-Key: rma-1042-create" \
-H "Content-Type: application/json" \
-d @claim.json- Use a value that names the action in your system, such as
rma-1042-create, or a random UUID you store with the request. - The same key with a different body is refused with
idempotency_conflict. - A retry that arrives while the first request is still running gets
idempotency_in_progress. Retry after a second. - Errors about the request itself (4xx) are kept and replayed. A 500 is not kept, so a retry runs again.
- Keys are per mode and up to 255 characters.
Claim references
A Claim's reference is your own identifier for the claim: an RMA, a case number, a protection claim id. One Claim exists per order item and reference, ever. Creating a Claim with a reference that item already has returns the existing Claim with status 200 instead of 201, however long ago it was made. Retried jobs, duplicate webhooks in your system and two workers racing each other all end at the same Claim.
Separately, an item that has an open Claim cannot get a second one, whatever the reference: that answers claim_open with the open Claim's id.
Orders
POST /v1/orders is idempotent by nature: sending an order again updates it.