Inbound Shipments
Cartons with SSCCs, label data and the ship command.
Introduction
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.
Accept a SUGGESTED plan (AcceptPlacementPlan)
The seller accepts the advisory. Advisory-only in v1 (ADR 0012): no downstream effect; the seller ships through the existing inbound-plan flow. Refused with illegal-transition once ACCEPTED or SUPERSEDED.
Add a carton (AddCarton)
Adds one carton to a `DRAFT` shipment. `sscc` is optional: a supplied SSCC must be valid and unique network-wide, otherwise the network issues one and returns it. `kind` is `HOMOGENEOUS_CASE` (one item at one quantity, matching the case GTIN) or `MIXED`. `parentSscc` names the pallet SSCC when the node accepts pallets. The carton is checked against the node's inbound limits. The response carries the carton and its label data.
Cancel an inbound plan (CancelInboundPlan)
Moves a `DRAFT` plan to `CANCELLED`. Only a `DRAFT` plan can be cancelled (`illegal-transition` otherwise).
Compute a placement plan for one seller item (ComputePlacementPlan)
Roadmap feature F6 (ADR 0012): reads the DemandHeatView (fulfilments locked per (item, region) over the observation window and current listing availability per node) and records a deterministic placement advisory. For each region with demand, suggested units per node = max(0, ceil(demand x coverDays / windowDays) - region availability) split across the region's ACTIVE vendor fulfilment centres proportionally to their availability (evenly when all zero). An item with no demand anywhere yields an EMPTY plan, which is legal. A new plan for the same (sellerId, catalogItemId) supersedes the previous one. Publishes PlacementPlanSuggested (analytics-only consumer in v1). A coverDays outside 1 to 90 is rejected with 400 invalid-cover-days.
Confirm an inbound plan (ConfirmInboundPlan)
Moves a `DRAFT` plan to `CONFIRMED` and publishes `InboundPlanConfirmed`. Shipments are opened only against a confirmed plan. Confirming a confirmed or cancelled plan is `illegal-transition`.
Create an inbound plan (CreateInboundPlan)
Declares what the seller will send to one destination node. The plan starts `DRAFT`. The seller must be `ACTIVE`; the node must be `ACTIVE` with the INBOUND capability (`node-cannot-receive`).
Open an inbound shipment (CreateInboundShipment)
Opens a `DRAFT` shipment against a `CONFIRMED` plan of an `ACTIVE` seller. The shipment inherits the plan's destination node.
Get an inbound plan (GetInboundPlan)
Reads one inbound plan.
Get an inbound shipment (GetInboundShipment)
Reads one shipment with its cartons and, once the vendor reported, the receipt status of each carton.
Read one placement plan in any state
Read-only; an unknown plan fails with not-found.
How far the analytics projection is behind (GetReportFreshness)
`as_of` is the CloudEvents time of the newest event the projector applied; `lag_seconds` is now minus `as_of`, never negative. Both are `null` until the first event. One endpoint for every report: they all read the same projection.
Get a seller's inbound capacity reservations (GetSellerCapacityAllocations)
The seller's inbound capacity reservations of one calendar month (ADR 0015): the dm3 its `DRAFT` and `CONFIRMED` plans
Seller-inbound performance, per UTC day (GetSellerInboundPerformanceReport)
Per UTC day of each fact's own business instant, folded from this context's OWN events only (ADR 0017); days without any fact are omitted. Served by the reports process (`si-reports`, port 8092), not by the seller API; `from` and `to` are UTC dates, both inclusive (neither = the 30 days ending today, at most 366 days).
Get a seller's compliance scorecard (GetSellerScorecard)
The seller's compliance scorecard over a rolling window that ends now, derived from this service's own facts (ADR 0005): the shipments that closed in the window, the
Get the label data (GetLabels)
Returns the label DATA of every carton: SSCC, the GS1-128 element string `(00)<sscc>`, the human readable line, the contents summary in eaches and the destination node.
Inbound Plans
Inbound Plans
Inbound Shipments
Inbound Shipments
Label an inbound shipment (LabelShipment)
Moves a `DRAFT` shipment to `LABELLED`: the cartons must add up to the confirmed plan (`carton-contents-mismatch-plan`) and the manifest is frozen. Publishes `InboundShipmentLabelled`. Only a `DRAFT` shipment can be labelled (`illegal-transition` otherwise).
Page the placement plans of one seller item, newest first
Keyset pagination: `limit` (1..100, default 50) and `cursor` = the `createdAt|planId` pair of the last item; the body carries {items, nextCursor}.
Onboard a seller (OnboardSeller)
Used by network partner managers. Creates the account `ACTIVE` and publishes `SellerOnboarded`. A `sellerId` that already exists is `seller-exists`.
Placement
Placement
Reinstate a seller (ReinstateSeller)
Moves the account `SUSPENDED` to `ACTIVE` and publishes `SellerReinstated`. A seller already `ACTIVE` gets the account back unchanged with `200` and no event.
Reports
Reports
Sellers
Sellers
Ship an inbound shipment (ShipInboundShipment)
Moves a `LABELLED` shipment to `SHIPPED` and publishes `InboundShipmentShipped`. A shipment that is not labelled is `shipment-not-labelled`; a suspended seller ships nothing (`seller-suspended`). Only a `LABELLED` shipment ships.
Suspend a seller (SuspendSeller)
Moves the account `ACTIVE` to `SUSPENDED` and publishes `SellerSuspended`. A seller already `SUSPENDED` gets the account back unchanged with `200` and no event. While suspended, the seller creates no plan, shipment or carton and ships nothing.