Skip to main content

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​

Order placed.

Response Headers
    Location

    Relative URI of the placed order, /orders/{orderId}.

    Idempotency-Replayed

    "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.