Skip to content

Idempotency โ€‹

The Quarzo API supports idempotency to let you safely retry requests without risking duplicate operations โ€” for example, sending the same transfer twice after a network timeout.

How to use it โ€‹

Add an Idempotency-Key header to any POST or PATCH request. We recommend using a V4 UUID or equivalent and generate a new one for each distinct operation.

http
POST /v1/subscriptions HTTP/1.1
Host: api.quarzo-life.com
Authorization: Bearer <token>
Idempotency-Key: 123e4567-e89b-12d3-a456-60984f46cb48
Content-Type: application/json

GET and DELETE requests

These are inherently idempotent. Setting an Idempotency-Key on them has no effect and is not supported.

Retry logic โ€‹

Retry with the same key if the request fails with any of the following:

ConditionRetry?
Network error (no response received)โœ… Yes
409 Conflict โ€” request still in progressโœ… Yes
429 Too Many Requestsโœ… Yes
5XX server errorโœ… Yes
4XX client error (other than 409 / 429)โŒ No โ€” same result every time

Replayed responses โ€‹

When the API returns a cached result from a previous request, the response includes:

http
Idempotent-Replayed: true

Error cases โ€‹

409 Conflict โ€” the original request is still being processed. Wait briefly and retry with the same key.

422 Unprocessable Entity โ€” the retry body differs from the original request. Each key is bound to an exact request; reuse it only with identical parameters.