Skip to main content

6. Idempotency

Idempotency is implemented per endpoint, not globally. The table is the authoritative summary; section 11 repeats the detail for each endpoint.

EndpointKey locationRequiredReplay behaviourConflict behaviour
POST /finance/transactionsBody field idempotencyKey (16 to 128 chars)Yes (schema)Same key and same fingerprint: returns the existing transaction with status 201Same key, different fingerprint: 409 IDEMPOTENCY_CONFLICT
POST /finance/transactions/{id}/reversal and /refundBody field idempotencyKeyYes (schema)Same key and fingerprint: returns the existing correctionDifferent fingerprint: 409 IDEMPOTENCY_CONFLICT
POST /finance/transactions/{id}/approve, /rejectNonen/aNot idempotent. A second call finds the transaction no longer pending: 409 INVALID_STATEn/a
POST /finance-applicationsHeader Idempotency-Key (8 to 128 chars, [A-Za-z0-9._:-])YesSame key and fingerprint: returns the existing application (201)Different fingerprint: 409 IDEMPOTENCY_CONFLICT
POST /finance-applications/{id}/transitionHeaderYesSame key: returns the current application. No fingerprint comparison.n/a
POST /finance-applications/{id}/decisionHeaderYesSame key: returns the current application. No fingerprint comparison.n/a
POST /financing-casesHeaderYesSame key: returns the existing case. No fingerprint comparison.n/a
POST /financing-cases/{id}/transitionHeaderYesSame key: returns the existing transition record.n/a
POST /financing-cases/{id}/agreementsHeaderYesSame key: returns the existing agreement.n/a
POST /{resource} (generic)None readn/aNot implemented. A duplicate natural key returns 409 CONFLICTn/a
PATCH /{resource} (generic)Nonen/aNot applicablen/a
POST /reconciliation/syncNonen/aNot idempotent: every call queues a new jobn/a
POST /reporting/jobsNonen/aNot idempotent: every call queues a new jobn/a
POST /marketplace/applications/{id}/decisionNonen/aSecond call finds the request decided: 409 INVALID_STATEn/a
POST /webhooks/{provider}Provider event idn/aDuplicate (tenant, provider, eventId): returns 200 with duplicate: truen/a
POST /contactNonen/aNot idempotentn/a

Header name used by the code is Idempotency-Key. Send 16 to 128 characters (A-Z a-z 0-9 . _ : -).