Outbound Shipping API
Commands and queries of the outbound-shipping bounded context (WMS subdomain, ADR 0001): staging manifested packages at the door, planning and loading the outbound load for one cutoff, closing and ship-confirming it on the trailer's physical departure (ADR 0002), and issuing the bill of lading.
Routes. Every route below is the domain model's rest list verbatim:
dock operators drive package scans (stagings, loadings,
unloadings), dock supervisors decide loads (closures, reopenings,
cancellations, BOL voids), and a scheduler sweeps missed loads. The
service is written through a transactional outbox: a REST command
persists the aggregate AND its already-encoded CloudEvents in one
transaction; a relay drains them to Kafka
(warehouse.outbound-shipping.events, ADR 0005).
Idempotency. Every POST takes an Idempotency-Key (fleet REST
guideline R3): the first request executes, and a replay returns the
stored answer with Idempotency-Replayed: true when that answer is
final for the request — a 2xx, or a refusal whose problem type is
FINAL (ADR 0012). A RETRYABLE refusal (a lost optimistic lock, a fact
an event has not delivered yet, an aggregate state not reached yet) is
not stored: the key is released and a retry executes again. A 5xx is
never stored. A key reused with a DIFFERENT body after a stored answer
is a 409 idempotency-key-reused (R4). A stored answer is replayed for
24 hours after it was stored (ADR 0012, addendum 2026-11-22); after
that the key is free and the request executes again, and a background
purge deletes the expired rows.
Errors are RFC 9457 problem+json with a fleet code. The domain
refusals map 1:1 to the model's invariant errors, e.g.
409 packages-outstanding (ErrPackagesOutstanding),
409 load-not-closed (ErrLoadNotClosed),
422 not-staging-location (ErrNotStagingLocation).
Contact outbound-shipping maintainers: outbound-shipping@iqvo.example.com
License