Authorize a return (AuthorizeReturn)
POST/return-authorizations
Authorizes one order group's return and publishes ReturnAuthorized. The group must be SHIPPED or DELIVERED (group-not-shipped otherwise); the lines are resolved against the placed group (validation-failed on an unknown lineNo) and the disposition is decided from the read models. A repeat of the same key and body replays the first answer when it was the 201. A refusal that depends on state that can change (group-not-shipped, no-return-destination, validation-failed, concurrent-update) is not stored -- the key is released and the same key and body executes again.
Request
Responses
- 201
- 400
- 409
- 422
- 500
The authorization, decided and stored.
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.
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.