Trips›Idempotency
Idempotency
Safe retries when the network drops after POST /trips.
Key points
- Header — Idempotency-Key: your order id, e.g. ORDER-10025.
- Same JSON — Replay returns the original 201 body.
- Different JSON — Same key with a different body is 409.
Retry a create if the network drops before you get a response.
Send the same JSON with the same Idempotency-Key. TrustCold returns the original result and does not open a second trip. The same key with different JSON returns 409. The header also works on PATCH /trips/{id} and POST /trips/{id}/cancel.
Idempotency-Key: ORDER-10025