Skip to main content
Version: 1.0.0

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, a replay returns the original response with Idempotency-Replayed: true, and a key reused with a DIFFERENT body is a 409 idempotency-key-reused (R4).

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).

License