Version: 1.0.0
Seller Inbound API
This is the seller API of the seller-inbound bounded context (retail network, partner tier): the front door through which a seller gets stock into the network.
A seller declares an inbound plan (what it will send, to which node, INDIVIDUAL or CASE_PACKED), confirms it, opens an inbound shipment against the plan, adds
cartons (each with an SSCC and its contents), has the labels produced, and ships. The vendor that runs the receiving node later reports what it received
(over the event stream, not this API) and the shipment closes.
Rules of the contract:
- Quantities are always eaches (
qtyEaches). A case-packed carton holds one item at one quantity, and that quantity must equal the units per pack the case GTIN declares (case-qty-mismatches-gtin). - GTIN is 14 digits and SSCC is 18 digits, both with a GS1 mod-10 check digit.
- SSCC. The seller may supply an SSCC on
POST /inbound-shipments/{id}/cartons; it is accepted only when valid (invalid-ssccotherwise) and unique network-wide (sscc-not-uniqueotherwise). Without one, the network issues an SSCC from its own GS1 company prefix and returns it (ssccIssued: true). - Labels.
POST /inbound-shipments/{id}/labelsmoves aDRAFTshipment toLABELLEDonce the cartons add up to the confirmed plan (carton-contents-mismatch-planotherwise).GET /inbound-shipments/{id}/labelsreturns the label data per carton (SSCC, the GS1-128 element string(00)<sscc>, the human readable line, the content summary in eaches and the destination node). Rendering a printable label is the seller's concern. - Destination node. The plan's node must be
ACTIVEand have the INBOUND capability in the local view fed by node-topology events (node-cannot-receive). Cartons are checked against the node's declared inbound limits (carton-overweight,carton-oversize). - Suspension. A suspended seller creates no plan, shipment or carton and ships nothing (
seller-suspended). - Scorecard.
GET /sellers/{sellerId}/scorecard?window=7d|30danswers the seller's rolling-window compliance scorecard, computed from the facts this service recorded when it applied the vendor's receipts (shipments closed, cartons received, discrepancies by kind, compliance violations). It is informational: the derivedcomplianceTier(GOOD,WATCH,AT_RISK) suspends and blocks nothing; suspension stays the humanPOST /sellers/{sellerId}/suspensionscommand (ADR 0005). A rate whose denominator is zero is omitted, neverNaN. - No authentication (consistent with the fleet): the seller is named in the request body and checked against its account.
- Every
POSTtakesIdempotency-Key(1 to 128 printable ASCII characters; missing is400 idempotency-key-required, malformed400 idempotency-key-invalid); a repeat replays the first response withIdempotency-Replayed: truewhen that response was a success or a refusal that is final for the request (invalid-cover-days,invalid-sscc), and the same key on a different method, path or body is409 idempotency-key-reused. A refusal that depends on state that can change (validation-failed,case-pack-not-uniform,case-qty-mismatches-gtin,carton-overweight,carton-oversize,carton-contents-mismatch-plan,inbound-capacity-exceeded,network-split-destination,network-split-unavailable,not-found,seller-suspended,seller-exists,node-cannot-receive,sscc-not-unique,shipment-not-labelled,illegal-transitionandconcurrent-update) is NOT stored: the key is released and the sameIdempotency-Keyexecutes the request again. - A NUL character (U+0000) is refused before anything else runs: in a path it is
404 not-found; in a query string or a JSON body it is422 validation-failed, and theIdempotency-Keyof such a request is not recorded. Request bodies are decoded strictly: an unknown field, malformed JSON, an empty body where one is required, trailing data or a body over 4 MiB is422 validation-failed. - Errors are RFC 9457
application/problem+json; the shared problem types arenot-found404,illegal-transition409,concurrent-update409 andvalidation-failed422, plus one slug per modelErr...name. - Suspending a suspended seller and reinstating an active one answer
200with the account and publish no event (ADR 0002 A3). Every other command finds the state it needs or answersillegal-transition. - Events (AsyncAPI
apis/asyncapi.yaml): ten types.InboundShipmentLabelled,InboundShipmentShipped,InboundShipmentReceived,PlacementPlanSuggested,SellerSuspendedandSellerReinstatedgo only to the events topic; the other four (SellerOnboarded,InboundPlanConfirmed,InboundDiscrepancyRecorded,SellerComplianceViolationRecorded) go to the analytics topic.
Contact seller-inbound maintainers:
License