API surface. Consolidations and conveyances are built and operated over GraphQL Interface, or by device scans through RESTParcels rarely travel alone. A sort center bags 60 parcels, puts 12 bags into a gaylord, and loads the gaylord onto a pallet. The pallet is built onto an air ULD, and the ULD flies on a scheduled flight. At the other end, everything is broken down in reverse. Each layer has its own identifier, its own scans, and often its own customs and dangerous-goods paperwork. A system of record has to model the layers, or a single scan of a gaylord either means nothing or has to be fanned out by hand into 700 parcel events. This chapter adds two objects and one rule:POST /v1/device_events. Integrators read the outcome through RESTGET /v1/shipments/{id}/custodyand timelines.
The aggregation rule. An event on a consolidation applies to everything inside it, recursively, until the contents are removed. Scanning a gaylord out of a hub moves every parcel in it.
1. The hierarchy
Handling units (chapter 01 §2) remain the leaves: the things a shipper labels. Consolidations are created by carriers, 3PLs and networks as goods move, and they can mix shipments from many shippers and many accounts.2. The consolidation object
3. Building and breaking consolidations
- A handling unit or consolidation is in at most one parent at a time. Adding something that is already in another open consolidation moves it, and records a
removedevent on the old parent. addvalidates compatibility with the consolidation’sdestination(a unit routed elsewhere is rejected with409 destination_mismatch), dangerous-goods segregation, and weight and volume limits (capacity_exceeded).- After
seal,addandremovefail with409 state_error/consolidation_sealeduntil the seal is broken withbreakSealConsolidation(id, input: { reason })(GraphQL), which is recorded and notifies the owner. - Facility scanners do all of this through the IoT interface with
action: "aggregate"(the scanned children go into the parent being built) andaction: "disaggregate"(chapter 22 §2). Most consolidations are never touched through the REST endpoints by a person.
4. Conveyances: flights, voyages, trucks, trains
A conveyance is one departure of one vehicle carrying consolidations. It is created with, and kept in sync with, aroute_run leg (chapter 16 §3).
status is planned, loading, closed (load finalized), departed, arrived, unloaded, or cancelled. Changes write through to the route-run leg, and from there, through the aggregation rule, to every contained shipment’s tracker.
5. Events through the layers
- Fan-out events carry
carrier_metadata: { via: { consolidation, conveyance } }, so a shipper can see that its parcel moved because its gaylord did. - Implementers MAY coalesce fan-out webhooks into
tracker.updatedbatches per account (capabilitytracking.batched_webhooks). The tracker data is still per shipment. GET /v1/shipments/{id}/custodyreturns the shipment’s current consolidation chain, from the handling unit up to the conveyance. Support teams answer “where is it really” with one call.
6. Gaylords and bulk mail, in detail
Gaylords (bulk boxes on a pallet base, about 1.2 m cubed) and postal sacks carry most cross-border e-commerce volume, and they are where data is most often lost. The spec’s requirements for them:- Every gaylord and sack has an SSCC or a UPU receptacle ID, with a printed label generated by
labelConsolidation(GraphQL Interface mutation). - Every parcel added is scanned in, because a manual count is not a manifest.
closefreezes the content list, and the content list becomes the consolidation’s manifest.- Customs pre-arrival data for the contents is sent per parcel, from each shipment’s
customs_declaration, not per gaylord. - On receipt, deconsolidation scans reconcile actual against declared contents, using the same discrepancy model as ASNs (chapter 18 §4).
7. Events
consolidation.created, consolidation.closed, consolidation.sealed, consolidation.seal_broken, consolidation.loaded, consolidation.deconsolidated, conveyance.created, conveyance.closed, conveyance.departed, conveyance.arrived, conveyance.delayed, conveyance.cancelled.