Loads
Packages consolidated onto one departure at its origin node (aggregate Load).
Open a load on a departure (OpenLoad)
Opens the load of a SCHEDULED departure, copying the origin, destination, departure kind, node types and the capacity of the departure into the load. A departure has at most one load (load-already-exists). Raises no event.
Add a package to an open load (AddPackage)
Refused with 409 package-already-loaded (ErrPackageAlreadyLoaded) if the tracking number is on another OPEN or CLOSED load, and with 409 load-over-capacity (ErrLoadOverCapacity) if the load would exceed its capacity snapshot. On a LINEHAUL or AIR departure the package is also booked on the departure (gap G15): 409 departure-full or departure-closed when it cannot be. On a PICKUP departure the booking was made at FulfillmentLocked and booked does not change. Adding a tracking number that is already on this load changes nothing.
Close an open load (CloseLoad)
OPEN to CLOSED; closes the departure of the load (CloseDeparture) and publishes LoadClosed on the analytics stream. Closing a CLOSED load returns it unchanged.
Dispatch a closed load (DispatchLoad)
CLOSED to DEPARTED; records the departure of the trip (RecordDeparture) and publishes LoadDeparted (with departureKind and nodeType) and DepartureDeparted. Dispatching a DEPARTED load returns it unchanged.
Receive a load at its destination node (ReceiveLoad)
DEPARTED to ARRIVED; records the arrival of the trip (RecordArrival) and publishes LoadArrived (with departureKind and nodeType), which last-mile-delivery uses to induct the packages at a delivery station, and DepartureArrived. Receiving an ARRIVED load returns it unchanged.