Cancel a return (CancelReturn)
POST/return-authorizations/:authorizationId/cancellations
The shopper's cancellation, allowed while AUTHORIZED (before anything is in transit); publishes ReturnCancelled with reason SHOPPER_REQUESTED and answers 200 with the CANCELLED authorization. An authorization whose expiresAt passed untouched is cancelled by this very call with reason EXPIRED and also answers 200 (the lazy expiry IS the cancellation; this route never answers authorization-expired). Cancelling again, or after RECEIVED/CLOSED_KEEP, is 409 illegal-transition.
Request
Responses
- 200
- 400
- 404
- 409
- 422
- 500
The cancelled authorization.
Response Headers
Set to the literal true when this response was replayed from the idempotency store; absent otherwise.
The Idempotency-Key is missing (idempotency-key-required), malformed (idempotency-key-invalid) or reused on a different request (idempotency-key-reused, 409); a malformed query is validation-failed.
No authorization exists with that id.
The command does not fit the state (illegal-transition) or another request modified the resource (concurrent-update).
The body or the world refuses the command; validation-failed (malformed body, unknown line, over the line ceiling), group-not-shipped, no-return-destination, label-unavailable or authorization-expired.
An unexpected failure; the body never leaks the internal error.