asyncapi: 3.0.0 info: title: shipping-and-tracking Domain Events version: "1.0.0" contact: name: shipping-and-tracking maintainers url: https://github.com/IQVO/shipping-and-tracking email: shipping-and-tracking@iqvo.example.com license: name: UNLICENSED tags: - name: shipping-and-tracking description: The shipping-and-tracking bounded context (retail network, logistics tier). - name: label description: Events raised by the ShippingLabel aggregate. - name: journey description: Events raised by the PackageJourney aggregate. description: | Event catalog for the **shipping-and-tracking** bounded context of the retail network (logistics tier): it issues shipping labels and owns each package's journey, the one customer-visible timeline consolidated from vendor handover, load and delivery facts (ADR 0001, ADR 0002). **Published.** Thirteen events, all on `retailnetwork.shipping-and-tracking.events`, through a **transactional outbox**: the aggregate rows and their already-encoded events are written in ONE database transaction and an always-on relay drains them to Kafka (at-least-once; the CloudEvents `id` is stored with the outbox row, so a retry republishes the same `id`). The thirteen types are catalogued in ADR 0004. Every one is an integration event: the model's analytics-only events (LabelVoided, PackageReturned, PackageLost) were promoted by contracts-delta E6 and E16, so nothing is published on `retailnetwork.shipping-and-tracking.analytics`. No event carries a ship-to address or any part of it (the opaque `stopKey` and the postal prefix on LabelIssued are the only derived values; ADR 0002 A9, A10). **Consumed.** Fourteen types from five topics (ADR 0003): vendor-connectivity VendorShipmentConfirmed, linehaul-transportation LoadDeparted and LoadArrived, last-mile-delivery PackageOutForDelivery, DeliveryAttempted, PackageReturnInitiated, StopEtaWindowAssigned and DeliveryPointFlagged (ADR 0014), offer-availability CatalogItemCreated, node-topology ServiceAreaAssigned (ADR 0015) and the node lifecycle events NodeRegistered, NodeActivated, NodeSuspended and NodeRetired (ADR 0016; NodeRegistered also feeds the destination prefix of every node, ADR 0018). Each consumer group dedupes on the CloudEvents `id` (inbox table `processed_events`), dispatches on the full `type`, ignores unknown types and fields, and parks a poison message on `.dlq`; a transient failure is retried five times first. **Own events, read back for analytics (ADR 0012).** The analytics projector (`cmd/st-projector`) reads this context's OWN integration topic in the fixed group `shipping-and-tracking-analytics` and projects LabelIssued, PackageScanned, PackageDelivered, PackageReturned and PackageLost into a separate analytical database. It dedupes on the CloudEvents `id` in the same transaction as the projection, dead-letters only deterministic poison to `retailnetwork.shipping-and-tracking.analytics.dlq` and retries transient failures without a bound. It reads no sibling's topic. **Envelope (mandatory).** CloudEvents 1.0, structured content mode, Kafka header `content-type: application/cloudevents+json; charset=UTF-8`. `specversion`, `id`, `source` (`/retailnetwork/shipping-and-tracking`), `type`, `subject` (the aggregate root id), `time`, `datacontenttype` (`application/json`) and `dataschema` (`urn:retailnetwork:shipping-and-tracking:events::v1`) are all required. Kafka key = the subject, so one aggregate's events stay ordered on one partition. Type = `com.retailnetwork.logistics.shipping-and-tracking..` with entity `label` or `journey`. A breaking payload change is a new `.v2` type, never a mutation. **Conventions.** `data` is camelCase; timestamps are RFC 3339 UTC; optional fields are omitted when unset; arrays are always present. servers: production: host: "{brokers}" protocol: kafka description: Retail-network Kafka broker (host supplied by the deployment environment via KAFKA_BROKERS). variables: brokers: default: "kafka.retail-network.internal:9092" defaultContentType: application/cloudevents+json channels: shippingAndTrackingEvents: address: retailnetwork.shipping-and-tracking.events title: shipping-and-tracking integration topic description: | This service's integration topic. Written by the outbox relay; key = subject (labelRef for label events, trackingNumber for journey events). Every message carries the CloudEvents content-type header. Dispatch on the full `type`, ignore unknown types, dedupe on `id`. messages: LabelIssued: $ref: "#/components/messages/LabelIssued" LabelVoided: $ref: "#/components/messages/LabelVoided" PackageScanned: $ref: "#/components/messages/PackageScanned" PackageHandedOver: $ref: "#/components/messages/PackageHandedOver" PackageDelivered: $ref: "#/components/messages/PackageDelivered" PackageExceptionRaised: $ref: "#/components/messages/PackageExceptionRaised" PackageReturned: $ref: "#/components/messages/PackageReturned" PackageLost: $ref: "#/components/messages/PackageLost" PackageEtaWindowAssigned: $ref: "#/components/messages/PackageEtaWindowAssigned" PackageDeliveryPointFlagged: $ref: "#/components/messages/PackageDeliveryPointFlagged" PackageHandedToCarrier: $ref: "#/components/messages/PackageHandedToCarrier" PackageReadyForCollection: $ref: "#/components/messages/PackageReadyForCollection" PackageCollected: $ref: "#/components/messages/PackageCollected" nodeTopologyEvents: address: retailnetwork.node-topology.events title: node-topology integration topic (consumed) description: | Owned by node-topology; this service only reads it, in its own consumer group (ST_AREAS_CONSUMER_GROUP), and relies on the fields listed on each message. Unknown fields and unknown types are ignored. messages: ServiceAreaAssigned: $ref: "#/components/messages/ServiceAreaAssigned" NodeRegistered: $ref: "#/components/messages/NodeRegistered" NodeActivated: $ref: "#/components/messages/NodeActivated" NodeSuspended: $ref: "#/components/messages/NodeSuspended" NodeRetired: $ref: "#/components/messages/NodeRetired" vendorConnectivityEvents: address: retailnetwork.vendor-connectivity.events title: vendor-connectivity integration topic (consumed) description: | Owned by vendor-connectivity; this service only reads it, in its own consumer group, and relies on the fields listed on each message. Unknown fields and unknown types are ignored. messages: VendorShipmentConfirmed: $ref: "#/components/messages/VendorShipmentConfirmed" linehaulEvents: address: retailnetwork.linehaul-transportation.events title: linehaul-transportation integration topic (consumed) description: | Owned by linehaul-transportation; this service only reads it, in its own consumer group, and relies on the fields listed on each message. Unknown fields and unknown types are ignored. messages: LoadDeparted: $ref: "#/components/messages/LoadDeparted" LoadArrived: $ref: "#/components/messages/LoadArrived" lastMileEvents: address: retailnetwork.last-mile-delivery.events title: last-mile-delivery integration topic (consumed) description: | Owned by last-mile-delivery; this service only reads it, in its own consumer group, and relies on the fields listed on each message. Unknown fields and unknown types are ignored. messages: PackageOutForDelivery: $ref: "#/components/messages/PackageOutForDelivery" DeliveryAttempted: $ref: "#/components/messages/DeliveryAttempted" PackageReturnInitiated: $ref: "#/components/messages/PackageReturnInitiated" StopEtaWindowAssigned: $ref: "#/components/messages/StopEtaWindowAssigned" DeliveryPointFlagged: $ref: "#/components/messages/DeliveryPointFlagged" offerAvailabilityEvents: address: retailnetwork.offer-availability.events title: offer-availability integration topic (consumed) description: | Owned by offer-availability; this service only reads it, in its own consumer group, and relies on the fields listed on each message. Unknown fields and unknown types are ignored. messages: CatalogItemCreated: $ref: "#/components/messages/CatalogItemCreated" operations: publishShippingAndTrackingEvents: action: send title: Publish shipping-and-tracking events summary: Publish the shipping-and-tracking events through the transactional outbox. description: | The service sends every event of its two aggregates (ShippingLabel, PackageJourney) to `retailnetwork.shipping-and-tracking.events`. Consumers route on the full `type`. tags: - name: shipping-and-tracking channel: $ref: "#/channels/shippingAndTrackingEvents" messages: - $ref: "#/channels/shippingAndTrackingEvents/messages/LabelIssued" - $ref: "#/channels/shippingAndTrackingEvents/messages/LabelVoided" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageScanned" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageHandedOver" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageDelivered" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageExceptionRaised" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageReturned" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageLost" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageEtaWindowAssigned" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageDeliveryPointFlagged" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageHandedToCarrier" projectOwnEventsForAnalytics: action: receive title: Project this context's own events into the analytical database summary: The analytics projector reads back five of the events this service publishes (ADR 0012). description: | Inbound adapter internal/adapters/inbound/kafka/analytics_consumer.go, run by cmd/st-projector in the consumer group ANALYTICS_CONSUMER_GROUP (default shipping-and-tracking-analytics). Dispatches on the full `type`; LabelVoided, PackageHandedOver, PackageHandedToCarrier (ADR 0015), PackageExceptionRaised, PackageEtaWindowAssigned, PackageDeliveryPointFlagged, PackageReadyForCollection and PackageCollected are acknowledged without projection; any other type or a non-CloudEvents message is skipped with a sampled warning. tags: - name: shipping-and-tracking channel: $ref: "#/channels/shippingAndTrackingEvents" messages: - $ref: "#/channels/shippingAndTrackingEvents/messages/LabelIssued" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageScanned" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageDelivered" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageReturned" - $ref: "#/channels/shippingAndTrackingEvents/messages/PackageLost" consumeNodeTopologyEvents: action: receive title: Consume node-topology events summary: Receive ServiceAreaAssigned and the node lifecycle events from node-topology (ADR 0015, ADR 0016). description: | Inbound adapter under internal/adapters/inbound/kafka. Reads `retailnetwork.node-topology.events` in the consumer group named by ST_AREAS_CONSUMER_GROUP (mandatory), records the CloudEvents `id` in `processed_events` in the same transaction as the effect, and dead-letters a message it cannot decode. An assignment version older than the stored row is acknowledged and dropped (an equal one only fills a missing delivery station, ADR 0019); that fold claims the CloudEvents `id` under its own inbox identity (`node-topology.area-modes`). The node lifecycle events keep the pickup-point rows of the local PickupPointView (ADR 0016). NodeRegistered also keeps, for a node of ANY type, its row of the local NodeDestinationView (ADR 0018): the node id and the destination prefix derived from the registered postal code. That fold claims the CloudEvents `id` under its own inbox identity (`node-topology.node-destinations`), and the three status events never reach it. tags: - name: shipping-and-tracking channel: $ref: "#/channels/nodeTopologyEvents" messages: - $ref: "#/channels/nodeTopologyEvents/messages/ServiceAreaAssigned" - $ref: "#/channels/nodeTopologyEvents/messages/NodeRegistered" - $ref: "#/channels/nodeTopologyEvents/messages/NodeActivated" - $ref: "#/channels/nodeTopologyEvents/messages/NodeSuspended" - $ref: "#/channels/nodeTopologyEvents/messages/NodeRetired" consumeVendorConnectivityEvents: action: receive title: Consume vendor-connectivity events summary: Receive VendorShipmentConfirmed from vendor-connectivity. description: | Inbound adapter under internal/adapters/inbound/kafka. Reads `retailnetwork.vendor-connectivity.events` in the consumer group named by an environment variable (mandatory), records the CloudEvents `id` in `processed_events` in the same transaction as the effect, and dead-letters a message it cannot decode. tags: - name: shipping-and-tracking channel: $ref: "#/channels/vendorConnectivityEvents" messages: - $ref: "#/channels/vendorConnectivityEvents/messages/VendorShipmentConfirmed" consumeLinehaulTransportationEvents: action: receive title: Consume linehaul-transportation events summary: Receive LoadDeparted, LoadArrived from linehaul-transportation. description: | Inbound adapter under internal/adapters/inbound/kafka. Reads `retailnetwork.linehaul-transportation.events` in the consumer group named by an environment variable (mandatory), records the CloudEvents `id` in `processed_events` in the same transaction as the effect, and dead-letters a message it cannot decode. tags: - name: shipping-and-tracking channel: $ref: "#/channels/linehaulEvents" messages: - $ref: "#/channels/linehaulEvents/messages/LoadDeparted" - $ref: "#/channels/linehaulEvents/messages/LoadArrived" consumeLastMileDeliveryEvents: action: receive title: Consume last-mile-delivery events summary: Receive PackageOutForDelivery, DeliveryAttempted, PackageReturnInitiated, StopEtaWindowAssigned, DeliveryPointFlagged from last-mile-delivery. description: | Inbound adapter under internal/adapters/inbound/kafka. Reads `retailnetwork.last-mile-delivery.events` in the consumer group named by an environment variable (mandatory), records the CloudEvents `id` in `processed_events` in the same transaction as the effect, and dead-letters a message it cannot decode. tags: - name: shipping-and-tracking channel: $ref: "#/channels/lastMileEvents" messages: - $ref: "#/channels/lastMileEvents/messages/PackageOutForDelivery" - $ref: "#/channels/lastMileEvents/messages/DeliveryAttempted" - $ref: "#/channels/lastMileEvents/messages/PackageReturnInitiated" - $ref: "#/channels/lastMileEvents/messages/StopEtaWindowAssigned" - $ref: "#/channels/lastMileEvents/messages/DeliveryPointFlagged" consumeOfferAvailabilityEvents: action: receive title: Consume offer-availability events summary: Receive CatalogItemCreated from offer-availability. description: | Inbound adapter under internal/adapters/inbound/kafka. Reads `retailnetwork.offer-availability.events` in the consumer group named by an environment variable (mandatory), records the CloudEvents `id` in `processed_events` in the same transaction as the effect, and dead-letters a message it cannot decode. tags: - name: shipping-and-tracking channel: $ref: "#/channels/offerAvailabilityEvents" messages: - $ref: "#/channels/offerAvailabilityEvents/messages/CatalogItemCreated" components: messages: LabelIssued: name: LabelIssued title: A shipping label was issued for one package summary: A shipping label was issued for one package. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.label.LabelIssued`; Raised by IssueLabel. Subject and key = the labelRef. Consumers: linehaul-transportation (ExpectedVolumeView), customer-ordering (OrderTrackingView), last-mile-delivery (groups stops by `stopKey`, contracts-delta E10). `stopKey` is an opaque keyed hash of the normalized ship-to address and `destinationPostalPrefix` its postal prefix: no address ever appears on the wire. `orderId` is an additive field (ADR 0002 A12). `destinationStationNodeId` is an additive optional field (ADR 0019): the delivery station of the area covering `destinationPostalPrefix`, a node id only, omitted when no station is known for the prefix." contentType: application/cloudevents+json tags: - name: label payload: $ref: "#/components/schemas/LabelIssuedEvent" examples: - name: labelIssued summary: A shipping label was issued for one package. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c01", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.label.LabelIssued", "subject": "lbl-7c1f", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:LabelIssued:v1", "data": { "labelRef": "lbl-7c1f", "trackingNumber": "STT00000000000042", "poNumber": "PO-1001", "assignmentId": "asg-001", "orderId": "ord-001", "packageNo": 1, "tier": "NEXT_DAY", "carrier": "RN-EXPRESS", "stopKey": "9f2a6c0d4b7e11aa5c3d8e90b1f47a62c8d0e3f15a9b7c24d6e8f0a1b3c5d7e9", "destinationPostalPrefix": "01310" } } - name: labelIssuedWithDestinationStation summary: A shipping label whose destination prefix is covered by a delivery station (ADR 0019). payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c02", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.label.LabelIssued", "subject": "lbl-7c20", "time": "2026-10-23T12:00:05Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:LabelIssued:v1", "data": { "labelRef": "lbl-7c20", "trackingNumber": "STT00000000000043", "poNumber": "PO-1001", "assignmentId": "asg-001", "orderId": "ord-001", "packageNo": 2, "tier": "NEXT_DAY", "carrier": "RN-EXPRESS", "stopKey": "9f2a6c0d4b7e11aa5c3d8e90b1f47a62c8d0e3f15a9b7c24d6e8f0a1b3c5d7e9", "destinationPostalPrefix": "01310", "destinationStationNodeId": "node-ds-07" } } LabelVoided: name: LabelVoided title: A shipping label was voided summary: A shipping label was voided. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.label.LabelVoided`; Raised by VoidLabel when the label moves ISSUED to VOIDED (the LABELLED journey closes as VOIDED in the same transaction). Subject and key = the labelRef. Integration event (contracts-delta E16): consumed by customer-ordering and linehaul-transportation (ExpectedVolumeView)." contentType: application/cloudevents+json tags: - name: label payload: $ref: "#/components/schemas/LabelVoidedEvent" examples: - name: labelVoided summary: A shipping label was voided. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c02", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.label.LabelVoided", "subject": "lbl-7c1f", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:LabelVoided:v1", "data": { "labelRef": "lbl-7c1f", "trackingNumber": "STT00000000000042", "reason": "order cancelled before pickup" } } PackageScanned: name: PackageScanned title: A scan was applied to a package journey summary: A scan was applied to a package journey. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageScanned`; Raised by RecordScan for every APPLIED scan (a scan stored out of order or without an edge raises nothing). Subject and key = the trackingNumber. `state` is the journey state after the scan. A handover or delivery raises two events in one transaction: this one and the milestone event." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageScannedEvent" examples: - name: packageScanned summary: A scan was applied to a package journey. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c03", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageScanned", "subject": "STT00000000000042", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageScanned:v1", "data": { "trackingNumber": "STT00000000000042", "scanId": "9b1d2c3e-0000-4000-8000-000000000001:STT00000000000042", "nodeId": "node-fc-01", "scanType": "PICKUP_DEPARTURE", "at": "2026-10-23T11:30:00Z", "state": "HANDED_OVER" } } PackageHandedOver: name: PackageHandedOver title: A package entered the network (handover) summary: A package entered the network (handover). description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageHandedOver`; Raised on LABELLED to HANDED_OVER (policy HandoverOnFirstScan): the first PICKUP-kind LoadDeparted at the vendor node. `handedOverAt` is the instant node-performance measures the vendor against." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageHandedOverEvent" examples: - name: packageHandedOver summary: A package entered the network (handover). payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c04", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageHandedOver", "subject": "STT00000000000042", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageHandedOver:v1", "data": { "trackingNumber": "STT00000000000042", "poNumber": "PO-1001", "nodeId": "node-fc-01", "handedOverAt": "2026-10-23T11:30:00Z" } } PackageDelivered: name: PackageDelivered title: A package was delivered summary: A package was delivered. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageDelivered`; Raised on OUT_FOR_DELIVERY to DELIVERED. Consumers: delivery-promise (JudgeOnDelivery; the group is judged on its LAST delivered package, contracts-delta E1), order-sourcing (MarkDelivered), customer-ordering." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageDeliveredEvent" examples: - name: packageDelivered summary: A package was delivered. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c05", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageDelivered", "subject": "STT00000000000042", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageDelivered:v1", "data": { "trackingNumber": "STT00000000000042", "assignmentId": "asg-001", "orderId": "ord-001", "deliveredAt": "2026-10-24T15:05:00Z" } } PackageExceptionRaised: name: PackageExceptionRaised title: A package journey raised an exception summary: A package journey raised an exception. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageExceptionRaised`; Raised by the ExceptionOnSilence sweep with reason NO_SCAN: no scan arrived within the expected window of the journey's state and tier (ADR 0002 A7). The state does not change. At most one per silence. Consumers: delivery-promise (RepromiseOnRisk), customer-ordering." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageExceptionRaisedEvent" examples: - name: packageExceptionRaised summary: A package journey raised an exception. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c06", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageExceptionRaised", "subject": "STT00000000000042", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageExceptionRaised:v1", "data": { "trackingNumber": "STT00000000000042", "assignmentId": "asg-001", "orderId": "ord-001", "reason": "NO_SCAN", "at": "2026-10-24T13:00:00Z" } } PackageReturned: name: PackageReturned title: A package was returned to the sender summary: A package was returned to the sender. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageReturned`; Raised on AT_STATION to RETURNED, triggered by last-mile-delivery's PackageReturnInitiated (contracts-delta E15). Integration event (E6): delivery-promise judges the promise BROKEN with cause RETURNED." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageReturnedEvent" examples: - name: packageReturned summary: A package was returned to the sender. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c07", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageReturned", "subject": "STT00000000000042", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageReturned:v1", "data": { "trackingNumber": "STT00000000000042", "orderId": "ord-001", "returnedAt": "2026-10-26T09:00:00Z" } } PackageLost: name: PackageLost title: A package was declared lost summary: A package was declared lost. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageLost`; Raised on IN_TRANSIT to LOST by the ExceptionOnSilence escalation (ADR 0002 A8). Integration event (E6): delivery-promise judges the promise BROKEN with cause LOST." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageLostEvent" examples: - name: packageLost summary: A package was declared lost. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c08", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageLost", "subject": "STT00000000000042", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageLost:v1", "data": { "trackingNumber": "STT00000000000042", "orderId": "ord-001", "declaredAt": "2026-10-27T13:00:00Z" } } PackageEtaWindowAssigned: name: PackageEtaWindowAssigned title: A package got its day-of ETA window summary: A package got its day-of ETA window. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageEtaWindowAssigned`; Raised by AssignEta when last-mile-delivery's StopEtaWindowAssigned names the package (ADR 0013). Subject and key = the trackingNumber. Not a scan: the journey state does not change. `etaStart`/`etaEnd` are the window as last-mile-delivery stated it and `assignedAt` is the instant the route started; a later event for the same package replaces an earlier one. Consumers decide whether the window is still current from the package's OUT_FOR_DELIVERY scan time: it is current only while the package is out for delivery and `assignedAt` is not before that scan. No address, stop key or free text is carried." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageEtaWindowAssignedEvent" examples: - name: packageEtaWindowAssigned summary: A package got its day-of ETA window. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c09", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageEtaWindowAssigned", "subject": "STT00000000000042", "time": "2026-10-24T09:00:01Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageEtaWindowAssigned:v1", "data": { "trackingNumber": "STT00000000000042", "assignmentId": "asg-001", "orderId": "ord-001", "etaStart": "2026-10-24T13:00:00Z", "etaEnd": "2026-10-24T15:00:00Z", "assignedAt": "2026-10-24T09:00:00Z" } } PackageDeliveryPointFlagged: name: PackageDeliveryPointFlagged title: The delivery point of a package was flagged summary: The delivery point of a package failed twice (ADR 0014). description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageDeliveryPointFlagged`; subject and key = the tracking number. Raised by RelayDeliveryPointFlag when last-mile-delivery flags the delivery point behind a stop - one event per journey, so customer-ordering can warn the shopper by orderId. The state is unchanged; a newer flag replaces an older one. Consumer: customer-ordering (ADR 0015 there)." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageDeliveryPointFlaggedEvent" examples: - name: packageDeliveryPointFlagged summary: The delivery point of a package failed twice. payload: { "specversion": "1.0", "id": "5b8e4c2a-1d3f-4e69-b7f2-2f1a5d6c8e24", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageDeliveryPointFlagged", "subject": "STT00000000000042", "time": "2026-10-24T16:30:05Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageDeliveryPointFlagged:v1", "data": { "trackingNumber": "STT00000000000042", "assignmentId": "asg-001", "orderId": "ord-001", "reason": "NOT_HOME", "flaggedAt": "2026-10-24T16:30:00Z" } } PackageHandedToCarrier: name: PackageHandedToCarrier title: A package was handed to an external carrier (ADR 0015) summary: A package of a CARRIER_HANDOFF service area was handed to the chosen carrier. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageHandedToCarrier`; raised on AT_STATION to WITH_CARRIER, once per journey (a repeat handoff scan is a duplicate). Subject and key = the trackingNumber. `carrierId` and `handoffNodeId` are the deterministic choice computed at the station (ADR 0015); `destinationPostalPrefix` is the label's prefix. Consumer: delivery-promise (carrier transit actuals)." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageHandedToCarrierEvent" examples: - name: packageHandedToCarrier summary: A package was handed to an external carrier. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c0a", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageHandedToCarrier", "subject": "STT00000000000042", "time": "2026-11-13T09:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageHandedToCarrier:v1", "data": { "trackingNumber": "STT00000000000042", "assignmentId": "asg-001", "orderId": "ord-001", "carrierId": "crr-fast", "handoffNodeId": "node-sc-03", "destinationPostalPrefix": "01310", "handedAt": "2026-11-13T08:55:00Z" } } VendorShipmentConfirmed: name: VendorShipmentConfirmed title: VendorShipmentConfirmed (consumed from vendor-connectivity) summary: The vendor confirmed it shipped a purchase order's packages. description: "`type` = `com.retailnetwork.partner.vendor-connectivity.purchaseorder.VendorShipmentConfirmed`. The vendor confirmed it shipped a purchase order's packages. Becomes one SHIPMENT_CONFIRMED scan per tracking number (journey stays LABELLED)." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/VendorShipmentConfirmedEvent" examples: - name: vendorShipmentConfirmed summary: VendorShipmentConfirmed as this service relies on it. payload: { "specversion": "1.0", "id": "4a7d3b1f-2c9e-4d58-8a61-1e0f9c3b5d09", "source": "/retailnetwork/vendor-connectivity", "type": "com.retailnetwork.partner.vendor-connectivity.purchaseorder.VendorShipmentConfirmed", "subject": "PO-1001", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:vendor-connectivity:events:VendorShipmentConfirmed:v1", "data": { "poNumber": "PO-1001", "assignmentId": "asg-001", "nodeId": "node-fc-01", "trackingNumbers": [ "STT00000000000042" ], "shippedAt": "2026-10-23T11:00:00Z", "requiredShipBy": "2026-10-23T14:00:00Z" } } LoadDeparted: name: LoadDeparted title: LoadDeparted (consumed from linehaul-transportation) summary: A load left a node. description: "`type` = `com.retailnetwork.logistics.linehaul-transportation.load.LoadDeparted`. A load left a node. departureKind PICKUP at a vendor node is the handover (PICKUP_DEPARTURE); other kinds are DEPARTURE scans. departureKind is a contracts-delta E3 addition; its absence is tolerated (the scan is then a DEPARTURE, or the handover while the journey is LABELLED). A missing timestamp falls back to the CloudEvents `time`." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/LoadDepartedEvent" examples: - name: loadDeparted summary: LoadDeparted as this service relies on it. payload: { "specversion": "1.0", "id": "4a7d3b1f-2c9e-4d58-8a61-1e0f9c3b5d10", "source": "/retailnetwork/linehaul-transportation", "type": "com.retailnetwork.logistics.linehaul-transportation.load.LoadDeparted", "subject": "load-9", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:linehaul-transportation:events:LoadDeparted:v1", "data": { "loadId": "load-9", "departureId": "dep-9", "originNodeId": "node-fc-01", "trackingNumbers": [ "STT00000000000042" ], "departedAt": "2026-10-23T11:30:00Z", "departureKind": "PICKUP", "nodeType": "FULFILLMENT_CENTER" } } LoadArrived: name: LoadArrived title: LoadArrived (consumed from linehaul-transportation) summary: A load arrived at a node. description: "`type` = `com.retailnetwork.logistics.linehaul-transportation.load.LoadArrived`. A load arrived at a node. nodeType DELIVERY_STATION gives STATION_ARRIVAL (also straight after handover: direct injection, E3); any other or absent nodeType gives TRANSIT_ARRIVAL. nodeType is the contracts-delta E3 name; destinationNodeType is read as a fallback." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/LoadArrivedEvent" examples: - name: loadArrived summary: LoadArrived as this service relies on it. payload: { "specversion": "1.0", "id": "4a7d3b1f-2c9e-4d58-8a61-1e0f9c3b5d11", "source": "/retailnetwork/linehaul-transportation", "type": "com.retailnetwork.logistics.linehaul-transportation.load.LoadArrived", "subject": "load-9", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:linehaul-transportation:events:LoadArrived:v1", "data": { "loadId": "load-9", "departureId": "dep-9", "destinationNodeId": "node-ds-07", "trackingNumbers": [ "STT00000000000042" ], "arrivedAt": "2026-10-24T06:00:00Z", "departureKind": "LINEHAUL", "nodeType": "DELIVERY_STATION" } } PackageOutForDelivery: name: PackageOutForDelivery title: PackageOutForDelivery (consumed from last-mile-delivery) summary: A package left a delivery station on a route. description: "`type` = `com.retailnetwork.logistics.last-mile-delivery.route.PackageOutForDelivery`. A package left a delivery station on a route. Becomes an OUT_FOR_DELIVERY scan at stationNodeId." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/PackageOutForDeliveryEvent" examples: - name: packageOutForDelivery summary: PackageOutForDelivery as this service relies on it. payload: { "specversion": "1.0", "id": "4a7d3b1f-2c9e-4d58-8a61-1e0f9c3b5d12", "source": "/retailnetwork/last-mile-delivery", "type": "com.retailnetwork.logistics.last-mile-delivery.route.PackageOutForDelivery", "subject": "STT00000000000042", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:last-mile-delivery:events:PackageOutForDelivery:v1", "data": { "routeId": "route-3", "trackingNumber": "STT00000000000042", "stationNodeId": "node-ds-07", "at": "2026-10-24T09:00:00Z" } } DeliveryAttempted: name: DeliveryAttempted title: DeliveryAttempted (consumed from last-mile-delivery) summary: A delivery attempt finished. description: "`type` = `com.retailnetwork.logistics.last-mile-delivery.route.DeliveryAttempted`. A delivery attempt finished. outcome DELIVERED gives a DELIVERED scan; any other outcome gives DELIVERY_FAILED (package back to the station). The node of the scan is the station of the package's last OUT_FOR_DELIVERY scan (ADR 0003)." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/DeliveryAttemptedEvent" examples: - name: deliveryAttempted summary: DeliveryAttempted as this service relies on it. payload: { "specversion": "1.0", "id": "4a7d3b1f-2c9e-4d58-8a61-1e0f9c3b5d13", "source": "/retailnetwork/last-mile-delivery", "type": "com.retailnetwork.logistics.last-mile-delivery.route.DeliveryAttempted", "subject": "STT00000000000042", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:last-mile-delivery:events:DeliveryAttempted:v1", "data": { "routeId": "route-3", "trackingNumber": "STT00000000000042", "outcome": "DELIVERED", "at": "2026-10-24T15:05:00Z" } } PackageReturnInitiated: name: PackageReturnInitiated title: PackageReturnInitiated (consumed from last-mile-delivery) summary: The third delivery attempt failed (contracts-delta E15). description: "`type` = `com.retailnetwork.logistics.last-mile-delivery.packageattempthistory.PackageReturnInitiated`. The third delivery attempt failed (contracts-delta E15). Drives ReturnToSender: AT_STATION to RETURNED. The entity segment of the type is last-mile-delivery's choice and is not yet published; ADR 0003 lists the accepted type strings." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/PackageReturnInitiatedEvent" examples: - name: packageReturnInitiated summary: PackageReturnInitiated as this service relies on it. payload: { "specversion": "1.0", "id": "4a7d3b1f-2c9e-4d58-8a61-1e0f9c3b5d14", "source": "/retailnetwork/last-mile-delivery", "type": "com.retailnetwork.logistics.last-mile-delivery.packageattempthistory.PackageReturnInitiated", "subject": "STT00000000000042", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:last-mile-delivery:events:PackageReturnInitiated:v1", "data": { "trackingNumber": "STT00000000000042" } } StopEtaWindowAssigned: name: StopEtaWindowAssigned title: StopEtaWindowAssigned (consumed from last-mile-delivery) summary: A stop of a started route got its ETA window (ADR 0013). description: "`type` = `com.retailnetwork.logistics.last-mile-delivery.route.StopEtaWindowAssigned`. Raised when a route starts, one per stop, after every PackageOutForDelivery, under the routeId key. Becomes the day-of ETA window of every package of the stop (PackageEtaWindowAssigned). The CloudEvents `time` is the route start instant and is the assignedAt. `stopNo`, `stopKey` and `routeId` are not used: this service keeps no stop identifier. Blank trackingNumbers or etaStart not before etaEnd is poison." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/StopEtaWindowAssignedEvent" examples: - name: stopEtaWindowAssigned summary: StopEtaWindowAssigned as this service relies on it. payload: { "specversion": "1.0", "id": "4a7d3b1f-2c9e-4d58-8a61-1e0f9c3b5d15", "source": "/retailnetwork/last-mile-delivery", "type": "com.retailnetwork.logistics.last-mile-delivery.route.StopEtaWindowAssigned", "subject": "route-3", "time": "2026-10-24T09:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:last-mile-delivery:events:StopEtaWindowAssigned:v1", "data": { "routeId": "route-3", "stopNo": 1, "stopKey": "pkg:STT00000000000042", "trackingNumbers": [ "STT00000000000042" ], "etaStart": "2026-10-24T13:00:00Z", "etaEnd": "2026-10-24T15:00:00Z" } } DeliveryPointFlagged: name: DeliveryPointFlagged title: DeliveryPointFlagged (consumed from last-mile-delivery) summary: The delivery point behind a stop failed twice (ADR 0014). description: "`type` = `com.retailnetwork.logistics.last-mile-delivery.deliverypointprofile.DeliveryPointFlagged`. One per flagged stop with every tracking number of the stop. Consumed by RelayDeliveryPointFlag - the flag is stored on each journey and relayed per package as PackageDeliveryPointFlagged. stopKey and failures are read and dropped." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/DeliveryPointFlaggedEvent" examples: - name: deliveryPointFlagged summary: DeliveryPointFlagged as this service relies on it. payload: { "specversion": "1.0", "id": "6c9f5d3b-2e4a-4f70-c8a3-3a2b6e7d9f35", "source": "/retailnetwork/last-mile-delivery", "type": "com.retailnetwork.logistics.last-mile-delivery.deliverypointprofile.DeliveryPointFlagged", "subject": "9f2c7a44e1d8b6f3a5c0e9d2b7f4a1c8e6d3b9f5a2c7e4d1b8f6a3c5e7d9f1b4", "time": "2026-10-24T16:30:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:last-mile-delivery:events:DeliveryPointFlagged:v1", "data": { "stopKey": "9f2c7a44e1d8b6f3a5c0e9d2b7f4a1c8e6d3b9f5a2c7e4d1b8f6a3c5e7d9f1b4", "reason": "NOT_HOME", "failures": 2, "trackingNumbers": [ "STT00000000000042" ], "flaggedAt": "2026-10-24T16:30:00Z" } } CatalogItemCreated: name: CatalogItemCreated title: CatalogItemCreated (consumed from offer-availability) summary: A catalogue item was created. description: "`type` = `com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemCreated`. A catalogue item was created. Upserted into the local CatalogDimensionsView (item dimensions, weight and handling flags for the label)." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/CatalogItemCreatedEvent" examples: - name: catalogItemCreated summary: CatalogItemCreated as this service relies on it. payload: { "specversion": "1.0", "id": "4a7d3b1f-2c9e-4d58-8a61-1e0f9c3b5d15", "source": "/retailnetwork/offer-availability", "type": "com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemCreated", "subject": "item-1", "time": "2026-10-23T12:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:offer-availability:events:CatalogItemCreated:v1", "data": { "catalogItemId": "item-1", "title": "Desk lamp", "lengthMm": 300, "widthMm": 200, "heightMm": 150, "weightG": 900, "hazmat": false, "fragile": true } } ServiceAreaAssigned: name: ServiceAreaAssigned title: ServiceAreaAssigned (consumed from node-topology) summary: A postal prefix was assigned to a delivery station (ADR 0015). description: "`type` = `com.retailnetwork.logistics.node-topology.servicearea.ServiceAreaAssigned`. Tolerant local copy: `deliveryStationNodeId` is kept per postal prefix (ADR 0019) and published as `destinationStationNodeId` on LabelIssued; `regionId` is read and dropped. `deliveryMode` and `carriers` are additive v1 fields (ADR 0016 there); their absence means NETWORK_ROUTE with no options, so a pre-C4 replay keeps the old meaning. Upserted into `area_modes` only when `assignmentVersion` beats the stored row; an equal `assignmentVersion` still fills a station the stored row lacks (ADR 0019), so a replay or re-emit backfills rows stored before the station was kept." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/ServiceAreaAssignedEvent" examples: - name: serviceAreaAssigned summary: ServiceAreaAssigned as this service relies on it. payload: { "specversion": "1.0", "id": "7c1f5a2e-3d8b-4f6a-b9e4-1f2a3b4c5d6e", "source": "/retailnetwork/node-topology", "type": "com.retailnetwork.logistics.node-topology.servicearea.ServiceAreaAssigned", "subject": "01310", "time": "2026-11-13T07:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:node-topology:events:ServiceAreaAssigned:v1", "data": { "postalPrefix": "01310", "deliveryStationNodeId": "node-ds-07", "regionId": "reg-1", "assignmentVersion": 4, "deliveryMode": "CARRIER_HANDOFF", "carriers": [ { "carrierId": "crr-fast", "handoffNodeId": "node-sc-03", "costPerPackageCents": 420, "transitMinutes": 1440 }, { "carrierId": "crr-saver", "handoffNodeId": "node-sc-03", "costPerPackageCents": 380, "transitMinutes": 2880 } ] } } PackageReadyForCollection: name: PackageReadyForCollection title: A package reached its pickup point (ADR 0016) summary: The wave deposited a pickup journey's package at its point. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageReadyForCollection`; raised on OUT_FOR_DELIVERY to READY_FOR_COLLECTION. Subject and key = the trackingNumber. `holdUntil` is the retention deadline the uncollected sweep returns the package after. Consumer: delivery-promise (the kept outcome of a pickup promise)." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageReadyForCollectionEvent" examples: - name: packageReadyForCollection summary: A package became collectable at its point. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c0b", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageReadyForCollection", "subject": "STT00000000000051", "time": "2026-11-13T09:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageReadyForCollection:v1", "data": { "trackingNumber": "STT00000000000051", "assignmentId": "asg-1001", "orderId": "ord-2001", "pickupPointId": "node-pnt-07", "readyForCollectionAt": "2026-11-13T09:00:00Z", "holdUntil": "2026-11-20T09:00:00Z" } } PackageCollected: name: PackageCollected title: The shopper collected the package (ADR 0016) summary: A READY_FOR_COLLECTION package was collected at its point. description: "`type` = `com.retailnetwork.logistics.shipping-and-tracking.journey.PackageCollected`; COLLECTED is terminal. Subject and key = the trackingNumber. `proofCode` is omitted when no proof was taken." contentType: application/cloudevents+json tags: - name: journey payload: $ref: "#/components/schemas/PackageCollectedEvent" examples: - name: packageCollected summary: A package was collected with a proof code. payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c0c", "source": "/retailnetwork/shipping-and-tracking", "type": "com.retailnetwork.logistics.shipping-and-tracking.journey.PackageCollected", "subject": "STT00000000000051", "time": "2026-11-14T18:30:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:shipping-and-tracking:events:PackageCollected:v1", "data": { "trackingNumber": "STT00000000000051", "assignmentId": "asg-1001", "orderId": "ord-2001", "pickupPointId": "node-pnt-07", "collectedAt": "2026-11-14T18:30:00Z", "proofCode": "4821" } } NodeRegistered: name: NodeRegistered title: NodeRegistered (consumed from node-topology) summary: A node was registered; every node reaches the NodeDestinationView (ADR 0018), a PICKUP_POINT also the PickupPointView (ADR 0016). description: "`type` = `com.retailnetwork.logistics.node-topology.node.NodeRegistered`. Tolerant local copy. Relied on for EVERY node type: `nodeId` and `postalCode`, from which this context derives the node's destination prefix (the first 5 characters from A-Z 0-9 of the upper-cased code; ADR 0002 A10, ADR 0018) and keeps it, not the code, in the NodeDestinationView. A registration whose `postalCode` is absent or leaves no such character still makes the node known, with no usable prefix. Relied on for a PICKUP_POINT only: `nodeType` and `servingStationNodeId` (null for every other node type), which add the pickup-point row (ADR 0016). A registration without a `nodeId` is dead-lettered. Every other field is ignored." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/NodeRegisteredEvent" examples: - name: nodeRegistered summary: A partner pickup point was registered. payload: { "specversion": "1.0", "id": "7c1f5a2e-3d8b-4f6a-b9e4-1f2a3b4c5d71", "source": "/retailnetwork/node-topology", "type": "com.retailnetwork.logistics.node-topology.node.NodeRegistered", "subject": "node-pnt-07", "time": "2026-11-13T07:00:00Z", "datacontenttype": "application/json", "data": { "nodeId": "node-pnt-07", "nodeType": "PICKUP_POINT", "operator": "PARTNER", "servingStationNodeId": "node-ds-07", "regionId": "reg-1", "timezone": "America/Sao_Paulo", "postalCode": "07095000", "countryCode": "BR" } } - name: nodeRegisteredFulfillmentCenter summary: A node that is not a pickup point; its destination prefix 07750 is kept (ADR 0018). payload: { "specversion": "1.0", "id": "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c40", "source": "/retailnetwork/node-topology", "type": "com.retailnetwork.logistics.node-topology.node.NodeRegistered", "subject": "node-0f3a91", "time": "2026-10-22T13:00:00Z", "datacontenttype": "application/json", "dataschema": "urn:retailnetwork:node-topology:events:NodeRegistered:v1", "data": { "nodeId": "node-0f3a91", "nodeType": "FULFILLMENT_CENTER", "subtype": "SORTABLE", "operator": "VENDOR", "vendorId": "vendor-77", "vendorNodeCode": "SP-CAJAMAR-01", "regionId": "region-se", "timezone": "America/Sao_Paulo", "postalCode": "07750-000", "countryCode": "BR" } } NodeActivated: name: NodeActivated title: NodeActivated (consumed from node-topology) summary: A node became ACTIVE; a pickup point becomes labelable (ADR 0016). description: "`type` = `com.retailnetwork.logistics.node-topology.node.NodeActivated`. Only the `nodeId` is read. It sets the state of the pickup point this context holds under that id to ACTIVE and changes nothing else: the point's serving station and prefix come from NodeRegistered alone. A node this context holds no pickup point of (any node of another type) is acknowledged without an effect and no row is made; a RETIRED point is not revived (ADR 0016, addendum 2026-11-18). Like NodeSuspended and NodeRetired it never reaches the NodeDestinationView: a node's destination prefix does not depend on its state (ADR 0018)." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/NodeStateChangedEvent" NodeSuspended: name: NodeSuspended title: NodeSuspended (consumed from node-topology) summary: A node was suspended; a pickup point stops being labelable (ADR 0016). description: "`type` = `com.retailnetwork.logistics.node-topology.node.NodeSuspended`. Only the `nodeId` is read. Sets the state of the held pickup point to SUSPENDED and changes nothing else; the same rules as NodeActivated for a node that is not a held pickup point and for a RETIRED one." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/NodeStateChangedEvent" NodeRetired: name: NodeRetired title: NodeRetired (consumed from node-topology) summary: A node was retired; its pickup point stays in the view as RETIRED, for good (ADR 0016). description: "`type` = `com.retailnetwork.logistics.node-topology.node.NodeRetired`. Only the `nodeId` is read. Sets the state of the held pickup point to RETIRED and changes nothing else; the row is kept, RETIRED is terminal and no later status fact changes it. A node that is not a held pickup point is acknowledged without an effect." contentType: application/cloudevents+json tags: - name: shipping-and-tracking payload: $ref: "#/components/schemas/NodeStateChangedEvent" schemas: CloudEventEnvelope: type: object required: [specversion, id, source, type, subject, time, datacontenttype, dataschema, data] properties: specversion: { type: string, const: "1.0" } id: { type: string, format: uuid } source: { type: string } type: { type: string } subject: { type: string, description: The aggregate root id. } time: { type: string, format: date-time } datacontenttype: { type: string, const: application/json } dataschema: { type: string } ServiceTier: type: string enum: [SAME_DAY, NEXT_DAY, TWO_DAY, STANDARD] ScanType: type: string enum: [SHIPMENT_CONFIRMED, PICKUP_DEPARTURE, DEPARTURE, TRANSIT_ARRIVAL, STATION_ARRIVAL, CARRIER_HANDOFF, OUT_FOR_DELIVERY, DELIVERED, DELIVERY_FAILED, POINT_DEPOSITED, COLLECTED] JourneyState: type: string enum: [LABELLED, HANDED_OVER, IN_TRANSIT, AT_STATION, WITH_CARRIER, OUT_FOR_DELIVERY, READY_FOR_COLLECTION, DELIVERED, COLLECTED, RETURNED, LOST, VOIDED] LabelIssuedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["labelRef", "trackingNumber", "poNumber", "assignmentId", "orderId", "packageNo", "tier", "carrier", "stopKey", "destinationPostalPrefix"] properties: labelRef: {"type": "string"} trackingNumber: {"type": "string"} poNumber: {"type": "string"} assignmentId: {"type": "string"} orderId: {"type": "string", "description": "Additive over the model (ADR 0002 A12)."} packageNo: {"type": "integer", "minimum": 1} tier: {"$ref": "#/components/schemas/ServiceTier"} carrier: {"type": "string"} stopKey: {"type": "string", "description": "Opaque keyed hash (HMAC-SHA-256, hex) of the normalized address; equal addresses give equal keys. A pickup label keys the point id, so every package of one point shares one stop (ADR 0016). A reverse label keys the same ship-to as the outbound label of the same order, so its key EQUALS the outbound key (ADR 0017)."} destinationPostalPrefix: {"type": "string", "description": "Leading characters of the ship-to postal code (ADR 0002 A10); a pickup label carries the point's own prefix (ADR 0016); a reverse label carries the RETURN DESTINATION's prefix (ADR 0017)."} pickupPointId: {"type": "string", "description": "The pickup point of a pickup label; omitted on a ship-to label (ADR 0016)."} destinationStationNodeId: {"type": "string", "description": "Optional (ADR 0019). The delivery station of the area covering destinationPostalPrefix, as node-topology's ServiceAreaAssigned last assigned it (the area's station, also for a pickup label; ADR 0019 records the open question). A node id only, never an address. Omitted when no station is known for the prefix and on a reverse label. Tolerant consumers ignore it."} purpose: {"type": "string", "enum": ["RETURN"], "description": "Present only on a reverse label of a customer return (ADR 0017); omitted on an outbound label. Tolerant consumers ignore it."} returnAuthorizationId: {"type": "string", "description": "The return authorization a reverse label belongs to (ADR 0017); omitted on an outbound label."} LabelVoidedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["labelRef", "trackingNumber", "reason"] properties: labelRef: {"type": "string"} trackingNumber: {"type": "string"} reason: {"type": "string"} PackageScannedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "scanId", "nodeId", "scanType", "at", "state"] properties: trackingNumber: {"type": "string"} scanId: {"type": "string"} nodeId: {"type": "string"} scanType: {"$ref": "#/components/schemas/ScanType"} at: {"type": "string", "format": "date-time"} state: {"$ref": "#/components/schemas/JourneyState"} PackageHandedOverEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "poNumber", "nodeId", "handedOverAt"] properties: trackingNumber: {"type": "string"} poNumber: {"type": "string"} nodeId: {"type": "string"} handedOverAt: {"type": "string", "format": "date-time"} PackageDeliveredEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "assignmentId", "orderId", "deliveredAt"] properties: trackingNumber: {"type": "string"} assignmentId: {"type": "string"} orderId: {"type": "string"} deliveredAt: {"type": "string", "format": "date-time"} PackageExceptionRaisedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "assignmentId", "orderId", "reason", "at"] properties: trackingNumber: {"type": "string"} assignmentId: {"type": "string"} orderId: {"type": "string"} reason: {"type": "string", "enum": ["NO_SCAN"]} at: {"type": "string", "format": "date-time"} PackageReturnedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "orderId", "returnedAt"] properties: trackingNumber: {"type": "string"} orderId: {"type": "string"} returnedAt: {"type": "string", "format": "date-time"} reason: {"type": "string", "description": "Why the package returned; UNCOLLECTED is the pickup hold expiry (ADR 0016). Omitted on the station-initiated return."} NodeRegisteredEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["nodeId", "nodeType"] properties: nodeId: {"type": "string", "description": "Relied on for every node type: the key of the NodeDestinationView row (ADR 0018)."} nodeType: {"type": "string", "description": "Only PICKUP_POINT reaches the PickupPointView (ADR 0016); every node type reaches the NodeDestinationView (ADR 0018)."} operator: {"type": "string"} servingStationNodeId: {"type": ["string", "null"], "description": "The serving delivery station of a pickup point; null for every other node type."} regionId: {"type": "string"} timezone: {"type": "string"} postalCode: {"type": "string", "description": "The node's own postal code. Relied on for every node type: its first 5 characters from A-Z 0-9 (upper-cased) are the node's destination prefix, kept in the NodeDestinationView; the code itself is not kept (ADR 0018). A pickup point's code is also its PickupPointView prefix (ADR 0016)."} countryCode: {"type": "string"} NodeStateChangedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["nodeId"] properties: nodeId: {"type": "string"} PackageReadyForCollectionEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "pickupPointId", "readyForCollectionAt", "holdUntil"] properties: trackingNumber: {"type": "string"} assignmentId: {"type": "string"} orderId: {"type": "string"} pickupPointId: {"type": "string"} readyForCollectionAt: {"type": "string", "format": "date-time"} holdUntil: {"type": "string", "format": "date-time"} PackageCollectedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "pickupPointId", "collectedAt"] properties: trackingNumber: {"type": "string"} assignmentId: {"type": "string"} orderId: {"type": "string"} pickupPointId: {"type": "string"} collectedAt: {"type": "string", "format": "date-time"} proofCode: {"type": "string", "description": "The shopper's collection proof; omitted when none was taken (ADR 0016)."} PackageLostEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "orderId", "declaredAt"] properties: trackingNumber: {"type": "string"} orderId: {"type": "string"} declaredAt: {"type": "string", "format": "date-time"} PackageEtaWindowAssignedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "assignmentId", "orderId", "etaStart", "etaEnd", "assignedAt"] properties: trackingNumber: {"type": "string"} assignmentId: {"type": "string"} orderId: {"type": "string"} etaStart: {"type": "string", "format": "date-time"} etaEnd: {"type": "string", "format": "date-time", "description": "After etaStart."} assignedAt: {"type": "string", "format": "date-time", "description": "The route start instant: the CloudEvents time of the consumed StopEtaWindowAssigned."} PackageHandedToCarrierEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "assignmentId", "orderId", "carrierId", "handoffNodeId", "destinationPostalPrefix", "handedAt"] properties: trackingNumber: {"type": "string"} assignmentId: {"type": "string"} orderId: {"type": "string"} carrierId: {"type": "string", "description": "The deterministic choice of the area's declared options (ADR 0015)."} handoffNodeId: {"type": "string", "description": "The node the carrier collects the package at."} destinationPostalPrefix: {"type": "string", "description": "The label's postal prefix."} handedAt: {"type": "string", "format": "date-time"} VendorShipmentConfirmedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumbers"] properties: poNumber: {"type": "string"} assignmentId: {"type": "string"} nodeId: {"type": "string"} trackingNumbers: {"type": "array", "items": {"type": "string"}} shippedAt: {"type": "string", "format": "date-time"} requiredShipBy: {"type": "string", "format": "date-time"} LoadDepartedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumbers"] properties: loadId: {"type": "string"} departureId: {"type": "string"} originNodeId: {"type": "string"} trackingNumbers: {"type": "array", "items": {"type": "string"}} departedAt: {"type": "string", "format": "date-time"} departureKind: {"type": "string", "description": "PICKUP gives a PICKUP_DEPARTURE scan; any other value gives DEPARTURE. Absent: DEPARTURE, upgraded to a handover while the journey is LABELLED."} LoadArrivedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumbers"] properties: loadId: {"type": "string"} departureId: {"type": "string"} destinationNodeId: {"type": "string"} trackingNumbers: {"type": "array", "items": {"type": "string"}} arrivedAt: {"type": "string", "format": "date-time"} nodeType: {"type": "string", "description": "DELIVERY_STATION gives a STATION_ARRIVAL scan, any other value TRANSIT_ARRIVAL."} destinationNodeType: {"type": "string", "description": "Read only when nodeType is empty; same meaning."} PackageOutForDeliveryEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber"] properties: routeId: {"type": "string"} trackingNumber: {"type": "string"} stationNodeId: {"type": "string"} at: {"type": "string", "format": "date-time"} DeliveryAttemptedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber"] properties: routeId: {"type": "string"} trackingNumber: {"type": "string"} outcome: {"type": "string", "description": "DELIVERED gives a DELIVERED scan; any other value gives DELIVERY_FAILED."} failureReason: {"type": "string"} at: {"type": "string", "format": "date-time"} PackageReturnInitiatedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber"] properties: trackingNumber: {"type": "string"} at: {"type": "string", "format": "date-time", "description": "Falls back to the CloudEvents time."} StopEtaWindowAssignedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumbers", "etaStart", "etaEnd"] properties: routeId: {"type": "string"} stopNo: {"type": "integer", "minimum": 1} stopKey: {"type": "string", "description": "Opaque stop identifier; read and dropped."} trackingNumbers: {"type": "array", "minItems": 1, "items": {"type": "string"}} etaStart: {"type": "string", "format": "date-time"} etaEnd: {"type": "string", "format": "date-time", "description": "After etaStart."} PackageDeliveryPointFlaggedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumber", "assignmentId", "orderId", "reason", "flaggedAt"] properties: trackingNumber: {"type": "string"} assignmentId: {"type": "string"} orderId: {"type": "string"} reason: {"type": "string", "enum": ["NOT_HOME", "ACCESS_PROBLEM"], "description": "A code the storefront words; never driver prose."} flaggedAt: {"type": "string", "format": "date-time"} DeliveryPointFlaggedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["trackingNumbers", "reason", "flaggedAt"] properties: stopKey: {"type": "string", "description": "Opaque stop identifier; read and dropped."} reason: {"type": "string", "enum": ["NOT_HOME", "ACCESS_PROBLEM"]} failures: {"type": "integer", "minimum": 2} trackingNumbers: {"type": "array", "minItems": 1, "items": {"type": "string"}} flaggedAt: {"type": "string", "format": "date-time"} CatalogItemCreatedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["catalogItemId"] properties: catalogItemId: {"type": "string"} title: {"type": "string"} lengthMm: {"type": "integer"} widthMm: {"type": "integer"} heightMm: {"type": "integer"} weightG: {"type": "integer"} hazmat: {"type": "boolean"} fragile: {"type": "boolean"} ServiceAreaAssignedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: ["postalPrefix", "assignmentVersion"] properties: postalPrefix: {"type": "string"} deliveryStationNodeId: {"type": "string", "description": "The DELIVERY_STATION that serves the prefix. Kept per postal prefix and published as destinationStationNodeId on LabelIssued (ADR 0019); absent or not a valid id means no station."} regionId: {"type": "string", "description": "Read and dropped."} assignmentVersion: {"type": "integer", "minimum": 1} deliveryMode: {"type": "string", "enum": ["NETWORK_ROUTE", "CARRIER_HANDOFF"], "description": "Absent means NETWORK_ROUTE (the pre-C4 meaning)."} carriers: {"type": "array", "description": "The declared carrier options of a CARRIER_HANDOFF area; absent or empty means none.", "items": {"type": "object", "required": ["carrierId", "handoffNodeId", "transitMinutes"], "properties": {"carrierId": {"type": "string"}, "handoffNodeId": {"type": "string"}, "costPerPackageCents": {"type": "integer", "minimum": 0}, "transitMinutes": {"type": "integer", "minimum": 1}}}}