Place a customer order, promising and confirming every shipment group
POST/checkout
PlaceOrder. For each shipment group the service calls delivery-promise MakePromise (POST /promises) with the offer the shopper saw and then ConfirmPromise (POST /promises/{promiseId}/confirmations) before anything is stored. If an offer expired or was consumed, or a confirm fails, it re-quotes (QuoteDeliveryOffers, POST /delivery-quotes) and answers 409 offer-not-quotable with the new offers; no order is placed. On success the order is PLACED and CustomerOrderPlaced is published through the outbox in the same transaction. The order id is derived from the Idempotency-Key, so a retry after a timeout reuses the same promises.
Request
Responses
- 201
- 400
- 409
- 422
- 503
Order placed.
Response Headers
Relative URI of the placed order, /orders/{orderId}.
"true" when the answer is the stored one of an earlier request with the same Idempotency-Key (a stored 2xx or a stored final 4xx answer, replayed with its original status and body); absent on the first execution. A refusal that a retry could pass (a RETRYABLE problem type, see the Idempotency-Key parameter) and a 5xx are never stored.
The request is not valid JSON, has an unknown field contains a NUL character or is larger than 64 KiB (malformed-request; there is no 413), or the Idempotency-Key header is missing (idempotency-key-required) or is not 1 to 128 printable ASCII characters (idempotency-key-invalid).
An offer expired or was consumed or a promise could not be confirmed (offer-not-quotable, the body carries re-quoted offers), promise capacity exhausted (promise-capacity-exhausted), book closed (book-closed), a concurrent update (concurrent-update), or the Idempotency-Key was already used with a different request (idempotency-key-reused). offer-not-quotable is stored under the key (use a new key with the new offers); promise-capacity-exhausted, book-closed and concurrent-update are not stored and release the key (retry with the same key).
validation-failed (including the shipTo / shipToAddressId choice: both, neither, an unknown id, another shopper's address or a shopper that is not registered), line-without-promise (ErrLineWithoutPromise), promise-destination-mismatch (ErrPromiseDestinationMismatch) or group-spans-nodes from delivery-promise. line-without-promise is stored under the Idempotency-Key; the others are not (retry with the same key).
delivery-promise unreachable or timed out (delivery-promise-unavailable). Retry with the same Idempotency-Key.