When it is required
Send anIdempotency-Key header on these requests:
POST /recipientsPOST /recipients/{recipient_id}/addressesPOST /deliveriesPOST /deliveries/bulkPOST /test-helpers/deliveries/{delivery_id}/transitionPOST /test-helpers/deliveries/{delivery_id}/simulate
GET requests and quote requests do not need it.
Node.js
The rule that prevents mistakes
Use:- the same key when retrying the same HTTP method, URL, environment, and JSON body;
- a new key for a new action or any changed request body.
Bulk requests
OneIdempotency-Key covers a whole POST /deliveries/bulk request. HaulStow stores the complete response, including any items that failed, and replays it when you retry with the same key and body. Retrying with the same key therefore never re-attempts a failed item.
To retry only the failed items, send a new bulk request that contains just those items, with a new key. Put an external_id on every item so you can match each result to your own records.
Retry behavior
Authentication and validation failures are not stored because no mutation was attempted. Deterministic failures after a mutation claim may be stored to prevent repeated side effects.
What a replay looks like
The JSON is the same as the original response. This response header tells you it was replayed:A safe retry checklist
Before retrying a create request, confirm that you kept all four things unchanged:- The sandbox or live base URL.
- The HTTP method and path.
- The JSON request body.
- The
Idempotency-Keyvalue.
