Make a provisional promise for one shipment group from a quoted offer
POST/promises
MakePromise. Consumes the offer (CONSUMED), creates the promise in PROVISIONAL with holdExpiresAt, and holds capacity on the witness PromiseBook (nodeId:pickupDepartureId), opening the book lazily on the first hold, in ONE transaction (documented exception to one aggregate per transaction, G22). A retry with the same Idempotency-Key and body replays the stored answer when it is final (a promise made, or a refusal the request cannot pass later); a refusal that capacity, a concurrent request or a fact not known yet can still change releases the key, so the retry under the same key runs again. Errors: not-found (404); offer-not-quotable, promise-capacity-exhausted, book-closed, concurrent-update (409); group-spans-nodes, invalid-promise-terms, nominal-basis-not-allowed-for-tier, validation-failed (422); idempotency-key-required (400); idempotency-key-reused (409).
Request
Responses
- 200
- 201
- 400
- 404
- 409
- 422
- 500
Idempotent replay; the promise made by the first request.
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.
Promise made (PROVISIONAL) and capacity held.
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.