Confirm a provisional promise for a placed order (ConfirmPromise)
POST/promises/:promiseId/confirmations
Called by customer-ordering inside checkout, before the order is placed (E7). PROVISIONAL becomes CONFIRMED and the book hold moves from provisional to confirmed, in one transaction; PromiseConfirmed goes to the analytics topic. Idempotent: confirming an already CONFIRMED promise with the same orderId and groupNo is a no-op returning 200. A hold past holdExpiresAt is refused with promise-hold-expired (409), and a RELEASED or otherwise closed promise with promise-closed (409): checkout then re-quotes and no order is placed.
Request
Responses
- 200
- 400
- 404
- 409
- 422
- 500
The CONFIRMED promise (also the replay).
Response Headers
Present, with the value "true", only when the response is the stored answer replayed for the same Idempotency-Key, method, path and body. The first execution never carries it.
The Idempotency-Key header is missing (idempotency-key-required) or malformed (idempotency-key-invalid), the request body is malformed (malformed-request, for bad JSON, an unknown field, trailing data, an empty body, a body over 64 KiB or a NUL character in the query or body), or a collection GET sent an undeclared query parameter (unknown-query-parameter), a bad limit (invalid-limit) or an undecodable cursor (invalid-cursor).
Not found (not-found): the offer or promise does not exist; an identifier carrying a NUL character is resource-not-found.
State, capacity, closed or concurrency conflict (illegal-transition, concurrent-update, offer-not-quotable, promise-capacity-exhausted, book-closed, promise-hold-expired, promise-closed, revision-moves-earlier), or idempotency-key-reused when the Idempotency-Key was already used with a different method, path or body.
Validation failure (validation-failed, group-spans-nodes, invalid-promise-terms, nominal-basis-not-allowed-for-tier).
Unexpected failure (internal-error); the detail never leaks the internal message. A 5xx is never stored for an Idempotency-Key, so the same key can retry.