Open a checkout session for a cart
POST/checkout-sessions
OpenSession. Reads the cart snapshot (shopping-cart GET /carts/{cartId}), checks every selected offer is still QUOTED with margin (delivery-promise GET /delivery-offers/{offerId}), issues the binding PriceQuote (pricing POST /price-quotes) and opens the session. The BFF then shows the review page with the binding total. shipToAddressId references a saved address held by customer-ordering (NG1); the address itself never enters the storefront.
Request
Responses
- 201
- 400
- 409
- 422
- 500
- 502
- 503
The opened session (OPEN).
Response Headers
Set to true on a replay of a stored answer (a retry carrying the same Idempotency-Key, method, path and body), and only on a replay: the first execution of a key never carries it.
malformed-request (bad or empty JSON, unknown field, trailing data, a body over 64 KiB, a NUL character in the query string or body), idempotency-key-required (no Idempotency-Key header) or idempotency-key-invalid (not 1-128 printable ASCII characters). A malformed-request answer is stored under its key and replayed with Idempotency-Replayed: true.
cart-not-checkout-ready (ErrCartNotCheckoutReady), concurrent-update, or idempotency-key-reused (the Idempotency-Key was already used with a different request).
Response Headers
Set to true on a replay of a stored answer (a retry carrying the same Idempotency-Key, method, path and body), and only on a replay: the first execution of a key never carries it.
validation-failed (a missing reference or an unknown cart), price-quote-rejected (pricing refused the quote request) or offer-not-quotable (ErrOfferNotQuotable, decision H3: a selected offer is no longer QUOTED or expires within 2 minutes; no state changes, the BFF refreshes the cart's delivery quote).
internal-error. The detail is always "an unexpected error occurred"; a 5xx is never stored under the Idempotency-Key.
upstream-contract-violation (ErrContractViolation, gap S1/S2 checks) - a sibling answered something that cannot form a session; an alert is raised.
A dependency is unreachable (shopping-cart-unavailable, delivery-promise-unavailable or pricing-unavailable); retry with the same Idempotency-Key. Never stored for replay.