HTTP status 409. An API key request can get this code.
The Idempotency-Key was used before with a different request body, or its first result is not available.
Recovery
Retry the same body with the same key, including when the first result is not available. Practice creates and updates return the stored first response, even if the practice has changed. Use GET /v1/practices/{practiceId} to read the current practice. Order creation and cancellation return the current order. Cancellation keeps the first response's status. Webhook creation returns the original endpoint details and signing secret within 24 hours, or 404 after deletion. Other keyed requests return the stored first response. Optional organization headers do not change API-key idempotency. If you cannot rebuild the original order body, find the order with a list request. Send its externalOrderId and the practiceId of the original order. Another practice can use the same externalOrderId. Do not send the changed body with a new key to recover an order: a new key can create a second order. Use a new key only for a new action.
Branch on code, not on the text of detail. Give Affinity the requestId when you report a problem.