Skip to main content

Cancel a confirmed promise on request (CancelPromise)

POST 

/promises/:promiseId/cancellations

Called by customer-ordering to compensate a checkout whose later group failed to confirm: the promises already CONFIRMED are cancelled so their capacity is given back. No request body. A CONFIRMED or AT_RISK promise becomes CANCELLED (cancelReason CANCELLED_ON_REQUEST), the confirmed hold goes back to its PromiseBook and PromiseCancelled goes to the analytics topic, in one transaction. Idempotent: cancelling an already CANCELLED promise is a no-op returning 200 with the same view. A PROVISIONAL, KEPT, BROKEN or RELEASED promise is refused with illegal-transition (409); a provisional hold is never cancelled, it lapses by itself (ReleaseExpiredHolds).

Request​

Responses​

The CANCELLED promise (also the replay and the repeat on an already cancelled promise).

Response Headers
    Idempotency-Replayed

    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.