Open a return receipt against an RMA
POST/returns/:rmaId/receipts
Records the physical arrival of returned goods. Each line either
matches an RMA (kind: MATCHED, carrying its own rmaId, which may
differ from the path's RMA when several RMAs ship in one parcel) or is
explicitly kind: UNEXPECTED; any other shape is 400 invalid-line
(no silent third state). UNEXPECTED lines raise
UnexpectedReturnReceived for exception-management. Publishes
ReturnReceiptOpened through the outbox. The service does NOT look
the RMA up: an rmaId (path or line) that names no RMA is accepted,
and the RMA keeps its status (nothing moves it to RECEIVED today), so
this operation has no 404 and no rma-not-receivable 409; its 409 is
idempotency-key-reused. Requires an Idempotency-Key.
Request
Responses
- 201
- 400
- 409
- 500
The receipt is opened.
Response Headers
Present, with the value true, only when the answer is a replay of the stored answer of an earlier request with the same Idempotency-Key.
Path of the new receipt.
Malformed JSON body, an unknown field, a NUL byte in the body, or an invalid path, query or header parameter.
The command is refused by the domain rules, another request changed the resource first, or the Idempotency-Key was reused.
Unexpected server error.