Events
Retries and idempotency
Safe retries through the externalId; what to retry and what not.
- Use a client timeout of about 30 seconds for
POST /orders. - Retry timeouts, network errors,
5xx,429(afterRetry-After) and409 REQUEST_IN_PROGRESS(afterRetry-After: 2) with the same body. - An order is identified by your
externalIdwithin the connection:- same
externalId, same body, already received →200with the first receipt andduplicate: true; - same
externalId, different body →409 ORDER_CONFLICT. Use a newexternalIdfor a new order; - same
externalIdwhile the first request is still running →409 REQUEST_IN_PROGRESS. A request that died more than 60 seconds ago is taken over and finished.
- same
- "Same body" means the same JSON value after parsing; key order and unknown fields do not matter.
- A refused order (any
4xx) leaves nothing behind. For example, an order refused with409 STORE_OFFLINEcan be sent again unchanged once the restaurant is back online. - Cancels and courier updates are safe to retry (see §8.7 and §8.8).