Networks drop answers. Every POST in the partner API honours an Idempotency-Key header, so a request can be retried after a timeout without creating a second quote or sending a proposal twice.
Any string of up to 255 characters works. A UUID is ideal. Make one per logical request (per deal you are quoting, say) and keep it with the request until it has an answer.
What a retry gets
| Situation | Answer |
|---|---|
| First request with the key | Processed normally. The answer is stored, success or refusal alike |
| Same key, same body, after an answer | The stored answer, byte for byte, with Idempotent-Replayed: true. Nothing is created or sent again |
| Same key, different body | 422. Use a new key for a new request |
| Same key while the first is still running | 409. Retry shortly |
| Same key after the quote was created but before its answer was stored | 201 with that quote, never a second one |
Same key after one of our 5xx, with nothing created | Processed again: a 5xx before anything was created is not stored |
| Same key after a request died part way with nothing created | Held for 15 minutes, then a retry with the same body takes it over |
"Same body" means the same method, path and JSON body, and for a multipart upload the same file. Keys are scoped to the API key that sent them, so two of your systems cannot collide, and are kept for seven days.
How the guarantee holds
POST /quotes binds the quote it creates to the idempotency key in the same database transaction that creates it. Whatever goes wrong afterwards (a later step failing, a timeout, a restart on our side), the quote and the key are already joined, and the retry is answered with that quote.
A retry loop
Reading a quote document can take a while, so allow a generous timeout on POST /quotes with a document. A retry while it is still being read answers 409 and is harmless.