Receive a quantity against a line
POST/receipts/:receiptId/lines
Records quantity units of line lineNo as Good or Damaged and
publishes ReceiptLineReceived (the handover event: inventory-storage
books the Good ones). This is NOT naturally idempotent, so the
Idempotency-Key is required: a retry with the same key never counts
the units twice. Over-receipt is accepted and shows as an Over
discrepancy on close. Receiving into a Closed receipt is 409
receipt-closed; a lineNo the ASN does not have is 422
line-not-on-asn.
Request
Responses
- 201
- 400
- 404
- 409
- 412
- 422
- 500
The quantity was recorded; the body is the receipt after the change.
Response Headers
Present, with the value true, only when this response is the replay of a stored answer for the same Idempotency-Key.
Strong entity tag of the resource: the quoted version, for example "3".
Malformed JSON or an unknown field (malformed-request), a bad query
parameter (invalid-query, invalid-limit, invalid-cursor,
unknown-query-parameter), a missing or malformed Idempotency-Key
(idempotency-key-required, idempotency-key-invalid), or a value that breaks a domain rule
(the invalid-*, *-requires-*, duplicate-* and
invalid-condition, invalid-carton*, invalid-scan*, invalid-counted-contents, invalid-cases,
invalid-gtin, invalid-sscc and invalid-owner-ref slugs), a reason code outside the list
(invalid-override-reason) or a tolerance band that breaks 0 <= tolerance < hardStop <= 1
(invalid-tolerance-band).
The resource in the path does not exist: asn-not-found,
appointment-not-found, receipt-not-found, carton-not-found or
receiving-policy-not-found (no policy declared for the exact owner and supplier).
The request conflicts with current state: asn-already-exists,
asn-in-progress, asn-terminal, asn-not-receivable,
appointment-cancelled, receipt-already-open, receipt-closed, sscc-prefix-not-configured and
sscc-serial-exhausted (receiver-assigned SSCCs, ADR 0024), tolerance-override-required
(a line sits between the declared band and its hard stop and no valid override reason was given) and
tolerance-blocked (a line is at or beyond the hard stop: no override passes, the receipt stays
open; ADR 0026), a write that lost a race
(concurrent-modification), or an Idempotency-Key already used with
a different request (idempotency-key-reused).
The If-Match value does not match the resource's current version; re-fetch and retry.
The request is well-formed but refers to something that does not hold:
unknown-sku, unknown-dock-door,
unknown-asn, unknown-appointment,
asn-not-on-appointment, line-not-on-asn, invalid-sscc,
duplicate-sscc, homogeneous-carton-mixed, carton-contents-mismatch,
scan-kind-mismatch, unsupported-pack-level,
counted-contents-not-mixed, counted-sku-unknown or unknown-gtin.
Unexpected server error.