← Graph

Handling third-party APIs without idempotency keys

question 3 connections

Audience question: when a third-party API doesn't support idempotency keys and the find-or-create technique is impractical (thousands of entities, race conditions), what other options guarantee only one item is created? Answer: PUT with a sender-chosen ID (e.g. UUIDv4) if the API allows it; otherwise you're in a 'wrong protocol' situation — compensation is painful and costly. Best to negotiate with the provider, and failing that, consider switching providers.

answer_summary
PUT with a sender-chosen UUID if supported; otherwise negotiate with the provider or switch APIs — the protocol is simply wrong for edge cases.
question Handling third-party APIs without idempotency keys
about
Idempotency Key concept
Topic is what to do when the third party does not support idempotency keys.
question Handling third-party APIs without idempotency keys
about
Asker notes the find-or-create fallback is impractical at scale.
question Handling third-party APIs without idempotency keys
asked_at
Second audience question in the Q&A.

Provenance

Read by
1 extraction