Issue a shipping label for one package (IssueLabel)
POST/labels
In-org route called by vendor-connectivity (contracts-delta E2). Reads the ship-to from customer-ordering (GET /orders/{orderId}/ship-to) BEFORE the transaction opens, stores it encrypted, starts the package journey (LABELLED) and publishes LabelIssued. The response never contains the address. A replay of the same Idempotency-Key returns the first response when that response is final for the request: a success and a refusal that is stored (see the Idempotency-Key parameter). A refusal that follows state which can change is not stored, and a retry under the same key executes again. An order collected at a pickup point (ADR 0016) has no address to read: the label's destination prefix is the point's own, taken from this context's local view of node-topology's pickup points, and the point must be ACTIVE in that view.
Request
Responses
- 201
- 400
- 409
- 422
- 500
- 503
Label issued (or replayed for a known Idempotency-Key).
Response Headers
Present, with the value true, only when the response is a replay of the answer stored for the Idempotency-Key.
idempotency-key-required (the Idempotency-Key header is missing) or idempotency-key-invalid (not 1-128 printable ASCII characters).
label-already-issued (ErrLabelAlreadyIssued), tracking-number-taken (ErrTrackingNumberTaken), concurrent-update (ErrConcurrentUpdate) or idempotency-key-reused (the Idempotency-Key was already used with a different request).
validation-failed (a malformed request, or the order is unknown to customer-ordering), address-suspect (the ship-to failed the deterministic deliverability check — RECIPIENT_PLACEHOLDER, STREET_PLACEHOLDER, STREET_MISSING_NUMBER, CITY_PLACEHOLDER or POSTAL_CODE_TOO_SHORT; the detail carries reason tokens only, never address values, and no label is stored), or pickup-point-unavailable (ErrPickupPointUnavailable: the order is collected at a pickup point that this context's local view does not hold, or holds in a state other than ACTIVE — PROPOSED, SUSPENDED or RETIRED; the detail names the point and its state, and no label is stored. The refusal follows the point's state, which node-topology's node facts change, so it is NOT stored under the Idempotency-Key: a retry of the same request with the same key is executed again and is served once the point is ACTIVE; ADR 0016).
internal-error. An unmapped failure; the detail never carries the cause. Never cached by the idempotency middleware, so the same key retries the work.
ship-to-unavailable. customer-ordering did not return the ship-to in time. No label is stored.