asyncapi: 3.0.0 info: title: offer-availability Domain Events version: "1.0.0" contact: name: offer-availability maintainers url: https://github.com/IQVO/offer-availability email: offer-availability@iqvo.example.com license: name: UNLICENSED tags: - name: offer-availability description: The offer-availability bounded context (retail network, commerce tier). - name: catalogitem description: Events raised by the CatalogItem aggregate. - name: listing description: Events raised by the Listing aggregate. - name: inventoryfeed description: Events raised by the InventoryFeed aggregate. - name: node-topology description: Events consumed from the node-topology bounded context. - name: seller-inbound description: Events consumed from the seller-inbound bounded context. - name: customer-returns description: Events consumed from the customer-returns bounded context. description: | Event catalog for the **offer-availability** bounded context of the retail network (commerce tier): the network's catalogue items, one listing per (catalogue item, node) and the quantity each node claims it can ship, with the basis the vendor gave (ADR 0001, ADR 0002). **Published.** Nine events, all integration events on the topic `retailnetwork.offer-availability.events`, through a **transactional outbox**: the aggregates 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 nine types are catalogued in ADR 0004. A listing created on a node that is not sellable raises ListingCreated and, in the same transaction, ListingSuppressed (ADR 0002, A6), so a consumer never has to guess the initial state. **Consumed.** Four node-topology events (`NodeRegistered`, `NodeActivated`, `NodeSuspended`, `NodeRetired`) from `retailnetwork.node-topology.events`, in the consumer group given by the mandatory `NODE_TOPOLOGY_CONSUMER_GROUP` (a boot error when unset). They feed the local NodeStatusView and drive the SuppressOnNodeUnavailable policy (ADR 0003). The consumer dispatches on the full `type`, ignores every other type, tolerates unknown fields, and dedupes on the CloudEvents `id` (inbox table `processed_events`). Two seller-inbound events (`SellerSuspended`, `SellerReinstated`) from `retailnetwork.seller-inbound.events`, in the consumer group given by the mandatory `SELLER_INBOUND_CONSUMER_GROUP`, feed the local SellerStatusView and suppress or restore the listings the seller owns (reason OWNER_SUSPENDED, ADR 0013). `InboundShipmentReceived` on the same topic creates the seller's listings of the received stock (ADR 0014). Every other type on that topic is acknowledged and counted (`availability.seller_events.ignored`, reason `type_not_consumed`), never applied. One customer-returns event (`ReturnCompleted`) from `retailnetwork.customer-returns.events`, in the consumer group given by the mandatory `CUSTOMER_RETURNS_CONSUMER_GROUP`, adds each line's restockable quantity to the owner listing at the node (ADR 0015); every other type on that topic is acknowledged and counted (`availability.customer_returns_events.ignored`, reason `type_not_consumed`). **Analytics.** The model names no analytics-only event for this context, so nothing is published on `retailnetwork.offer-availability.analytics`. **Envelope (mandatory).** CloudEvents 1.0, structured content mode, Kafka header `content-type: application/cloudevents+json; charset=UTF-8`. `specversion`, `id`, `source` (`/retailnetwork/offer-availability`), `type`, `subject` (the aggregate root id), `time`, `datacontenttype` (`application/json`) and `dataschema` (`urn:retailnetwork:offer-availability:events::v1`) are all required. Kafka key = the subject, so one aggregate's events stay ordered on one partition. Type = `com.retailnetwork.commerce.offer-availability..` with entity `catalogitem`, `listing` or `inventoryfeed`. A breaking payload change is a new `.v2` type, never a mutation. Dispatch on the full `type`, ignore unknown types, dedupe on `id`. **Conventions.** `data` is camelCase; ids are strings; timestamps are RFC 3339 UTC; counts are integers; enums are UPPER_SNAKE; optional fields are omitted when unset (never null). 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: offerAvailabilityEvents: address: retailnetwork.offer-availability.events title: offer-availability integration topic description: | This service's integration topic. Written by the outbox relay; key = subject (catalogItemId, listingId or feedId). Every message carries the CloudEvents content-type header. Dispatch on the full `type`, ignore unknown types, dedupe on `id`. messages: CatalogItemCreated: $ref: "#/components/messages/CatalogItemCreated" CatalogItemDiscontinued: $ref: "#/components/messages/CatalogItemDiscontinued" CatalogItemPackagingDeclared: $ref: "#/components/messages/CatalogItemPackagingDeclared" CatalogItemPackLevelRetired: $ref: "#/components/messages/CatalogItemPackLevelRetired" ListingCreated: $ref: "#/components/messages/ListingCreated" ListingAvailabilityChanged: $ref: "#/components/messages/ListingAvailabilityChanged" ListingSuppressed: $ref: "#/components/messages/ListingSuppressed" ListingRestored: $ref: "#/components/messages/ListingRestored" InventoryFeedApplied: $ref: "#/components/messages/InventoryFeedApplied" nodeTopologyEvents: address: retailnetwork.node-topology.events title: node-topology integration topic (consumed) description: | Owned by node-topology; consumed here. Key = nodeId, so one node's events arrive in order on one partition. Only the four node lifecycle types below are used; every other type on the topic is acknowledged and ignored. messages: NodeRegistered: $ref: "#/components/messages/NodeRegistered" NodeActivated: $ref: "#/components/messages/NodeActivated" NodeSuspended: $ref: "#/components/messages/NodeSuspended" NodeRetired: $ref: "#/components/messages/NodeRetired" sellerInboundEvents: address: retailnetwork.seller-inbound.events title: seller-inbound integration topic (consumed) description: | Owned by seller-inbound; consumed here (ADR 0013). Key = the aggregate root id (sellerId for the two seller types below, shipmentId for InboundShipmentReceived), so one seller's status events arrive in order on one partition. The two seller status types and InboundShipmentReceived (ADR 0014) are used; every other type on the topic (the other inbound shipment events, the placement suggestion, any future type) is acknowledged, counted and ignored. messages: SellerSuspended: $ref: "#/components/messages/SellerSuspended" SellerReinstated: $ref: "#/components/messages/SellerReinstated" InboundShipmentReceived: $ref: "#/components/messages/InboundShipmentReceived" customerReturnsEvents: address: retailnetwork.customer-returns.events title: customer-returns integration topic (consumed) description: | Owned by customer-returns; consumed here (ADR 0015). Key = the authorizationId, so one return's events arrive in order on one partition. Only ReturnCompleted is used; every other type on the topic is acknowledged, counted and ignored. messages: ReturnCompleted: $ref: "#/components/messages/ReturnCompleted" operations: publishOfferAvailabilityEvents: action: send title: Publish offer-availability events summary: Publish the nine offer-availability events through the transactional outbox. description: | The service sends every event of its three aggregates (CatalogItem, Listing, InventoryFeed) to `retailnetwork.offer-availability.events`. Consumers route on the full `type`. tags: - name: offer-availability channel: $ref: "#/channels/offerAvailabilityEvents" messages: - $ref: "#/channels/offerAvailabilityEvents/messages/CatalogItemCreated" - $ref: "#/channels/offerAvailabilityEvents/messages/CatalogItemDiscontinued" - $ref: "#/channels/offerAvailabilityEvents/messages/CatalogItemPackagingDeclared" - $ref: "#/channels/offerAvailabilityEvents/messages/CatalogItemPackLevelRetired" - $ref: "#/channels/offerAvailabilityEvents/messages/ListingCreated" - $ref: "#/channels/offerAvailabilityEvents/messages/ListingAvailabilityChanged" - $ref: "#/channels/offerAvailabilityEvents/messages/ListingSuppressed" - $ref: "#/channels/offerAvailabilityEvents/messages/ListingRestored" - $ref: "#/channels/offerAvailabilityEvents/messages/InventoryFeedApplied" receiveNodeTopologyEvents: action: receive title: Receive node-topology node lifecycle events summary: Fold node status into NodeStatusView and apply SuppressOnNodeUnavailable. description: | Consumed from `retailnetwork.node-topology.events` in the group named by NODE_TOPOLOGY_CONSUMER_GROUP. NodeRegistered inserts the node as PROPOSED; NodeActivated sets it ACTIVE and restores the listings of the node that are suppressed for NODE_NOT_SELLABLE; NodeSuspended and NodeRetired set it SUSPENDED or RETIRED and suppress every LIVE listing of the node. The fields read are exactly the ones in the payload schemas below; everything else in the producer's payload is ignored. Each CloudEvents id is recorded in `processed_events` in the same transaction as its effects. Failure handling: a message that is not a valid CloudEvents 1.0 event is logged and skipped (offset committed); a node type of the four with an undecodable `data`, a missing `nodeId` or instant, or a value the use case refuses (validation) is dead-lettered at once; any other failure is tried 5 times in all, then dead-lettered. The dead-letter topic is `retailnetwork.node-topology.events.dlq` (same key and value, headers `x-dlq-source-topic`, `x-dlq-source-partition`, `x-dlq-source-offset`, `x-dlq-error`, `x-dlq-failed-at`). Offsets are committed after the event was handled. The instant applied is `activatedAt`, `suspendedAt` or `retiredAt`; for NodeRegistered it is the CloudEvents `time`. tags: - name: node-topology channel: $ref: "#/channels/nodeTopologyEvents" messages: - $ref: "#/channels/nodeTopologyEvents/messages/NodeRegistered" - $ref: "#/channels/nodeTopologyEvents/messages/NodeActivated" - $ref: "#/channels/nodeTopologyEvents/messages/NodeSuspended" - $ref: "#/channels/nodeTopologyEvents/messages/NodeRetired" receiveSellerInboundEvents: action: receive title: Receive seller-inbound seller status events summary: Fold seller status into SellerStatusView and suppress or restore the seller's listings. description: | Consumed from `retailnetwork.seller-inbound.events` in the group named by SELLER_INBOUND_CONSUMER_GROUP (ADR 0013). SellerSuspended sets the seller SUSPENDED at `suspendedAt` and suppresses every LIVE listing whose ownerRef is the sellerId with reason OWNER_SUSPENDED (a listing already SUPPRESSED keeps its higher reason). SellerReinstated sets it ACTIVE at `reinstatedAt` and restores every listing of the seller suppressed for OWNER_SUSPENDED, unless its node is not sellable or its item is discontinued, in which case the reason switches to that cause (one ListingSuppressed). An event older than the stored `asOf` is ignored; an unknown seller is ACTIVE. The fields read are exactly the ones in the payload schemas below. Each CloudEvents id is recorded in `processed_events` in the same transaction as its effects. Failure handling mirrors the node-topology consumer: not a CloudEvent = logged and skipped; another type of the topic = counted and skipped; a seller type with an undecodable `data`, a missing `sellerId` or instant, or a value the use case refuses is dead-lettered at once to `retailnetwork.seller-inbound.events.dlq`; any other failure is tried 5 times in all, then dead-lettered. tags: - name: seller-inbound channel: $ref: "#/channels/sellerInboundEvents" messages: - $ref: "#/channels/sellerInboundEvents/messages/SellerSuspended" - $ref: "#/channels/sellerInboundEvents/messages/SellerReinstated" receiveSellerInboundReceivedStock: action: receive title: Receive seller-inbound received shipments summary: Create the seller's listings of the stock an inbound shipment received. description: | Consumed from `retailnetwork.seller-inbound.events` by the same consumer and group as the seller status events (ADR 0014, building ADR 0013 rule 8). For each `received` line with `qtyEaches` > 0 the item is the line's `catalogItemId`, or else the catalogue item holding its `gtin` (an item GTIN or any pack level GTIN, retired levels included). Each resolved item without a listing of (item, `nodeId`, ownerRef = `sellerId`) gets one: ListingCreated (availability 0, basis UNKNOWN), then ListingSuppressed when the node is not sellable, the item is discontinued or the owner is SUSPENDED. An existing listing is not touched; availability comes only from the vendor's inventory feed. One transaction per event, the CloudEvents id recorded in `processed_events`. Skips are acknowledged and counted in `availability.seller_events.ignored` (attribute `reason`), never errors: an event without `received` (published before the producer carried it) creates nothing (`received_unknown`); a line whose GTIN no item holds is logged at WARN (`gtin_unresolved`); a line whose `catalogItemId` the catalogue does not hold likewise (`item_unknown`). An undecodable `data`, or one without `sellerId` or `nodeId`, is dead-lettered to `retailnetwork.seller-inbound.events.dlq`. tags: - name: seller-inbound channel: $ref: "#/channels/sellerInboundEvents" messages: - $ref: "#/channels/sellerInboundEvents/messages/InboundShipmentReceived" receiveCustomerReturnsReturnCompletions: action: receive title: Receive customer-returns return completions summary: Restock the owner listings of what a closed return brought back. description: | Consumed from `retailnetwork.customer-returns.events` in the group named by CUSTOMER_RETURNS_CONSUMER_GROUP (ADR 0015). For each line of a ReturnCompleted the available quantity of the listing of (catalogItemId, `nodeId`, ownerRef) is raised by `qtyRestockable` (one ListingAvailabilityChanged each, basis and state untouched); the unsellable units never touch a listing. A line with qtyRestockable <= 0 (`nothing_restockable`), without a usable catalogItemId (`item_absent`), or whose listing does not exist (`listing_unknown`, logged at WARN) is counted in `availability.customer_returns_events.ignored`, never an error; an event without `lines` counts `lines_absent`. One transaction per event, the CloudEvents id recorded in `processed_events`. Failure handling mirrors the seller-inbound consumers: not a CloudEvent = logged and skipped; another type of the topic = counted and skipped; a ReturnCompleted with an undecodable `data`, or without a usable `authorizationId`, `nodeId` or instant, is dead-lettered to `retailnetwork.customer-returns.events.dlq`; any other failure is tried 5 times in all, then dead-lettered. tags: - name: customer-returns channel: $ref: "#/channels/customerReturnsEvents" messages: - $ref: "#/channels/customerReturnsEvents/messages/ReturnCompleted" components: messages: CatalogItemCreated: name: CatalogItemCreated title: Catalogue item created summary: A catalogue item was created in state ACTIVE. description: "`type` = `com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemCreated`; subject and key = the catalogItemId. Raised by CreateCatalogItem. Dimensions are in millimetres and the weight in grams, all positive. `gtin` is the optional identifiers.gtin (14 digits, GS1 check digit validated) and is omitted when the item has none." contentType: application/cloudevents+json tags: - name: catalogitem payload: $ref: "#/components/schemas/CatalogItemCreatedEvent" examples: - name: catalogItemCreated summary: A catalogue item was created. payload: specversion: "1.0" id: "7c1d3a52-5f0e-4a61-9a37-2b9d4e1f6a10" source: "/retailnetwork/offer-availability" type: "com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemCreated" subject: "item-004512" time: "2026-10-23T09:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:offer-availability:events:CatalogItemCreated:v1" data: catalogItemId: "item-004512" title: "Stainless steel water bottle 750 ml" lengthMm: 270 widthMm: 75 heightMm: 75 weightG: 340 hazmat: false fragile: false gtin: "06141410000120" CatalogItemPackagingDeclared: name: CatalogItemPackagingDeclared title: Catalogue item pack level declared summary: A pack level of a catalogue item was declared (or its dimensions changed in place). description: "`type` = `com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemPackagingDeclared`; subject and key = the catalogItemId. Raised by DeclarePackLevel (ADR 0006). `unitsPerPack` is in eaches (1 for EACH); `childGtin` names the active lower level and is omitted for EACH. The unitsPerPack of a GTIN never changes: a new count arrives as a new `gtin` at the level, preceded in the same transaction by CatalogItemPackLevelRetired for the old one." contentType: application/cloudevents+json tags: - name: catalogitem payload: $ref: "#/components/schemas/CatalogItemPackagingDeclaredEvent" examples: - name: catalogItemPackagingDeclared summary: An inner pack of six eaches was declared. payload: specversion: "1.0" id: "7c1d3a52-5f0e-4a61-9a37-2b9d4e1f6a20" source: "/retailnetwork/offer-availability" type: "com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemPackagingDeclared" subject: "item-004512" time: "2026-10-24T09:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:offer-availability:events:CatalogItemPackagingDeclared:v1" data: catalogItemId: "item-004512" level: "INNER" gtin: "06141410000298" childGtin: "06141410000120" unitsPerPack: 6 declaredAt: "2026-10-24T09:00:00Z" CatalogItemPackLevelRetired: name: CatalogItemPackLevelRetired title: Catalogue item pack level retired summary: The active pack level of a catalogue item was retired. description: "`type` = `com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemPackLevelRetired`; subject and key = the catalogItemId. Raised by RetirePackLevel, or by DeclarePackLevel when a new GTIN supersedes the level (then it precedes the CatalogItemPackagingDeclared of the new GTIN). The retired GTIN stays resolvable and is never reused." contentType: application/cloudevents+json tags: - name: catalogitem payload: $ref: "#/components/schemas/CatalogItemPackLevelRetiredEvent" examples: - name: catalogItemPackLevelRetired summary: The case level was retired. payload: specversion: "1.0" id: "7c1d3a52-5f0e-4a61-9a37-2b9d4e1f6a21" source: "/retailnetwork/offer-availability" type: "com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemPackLevelRetired" subject: "item-004512" time: "2026-10-24T10:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:offer-availability:events:CatalogItemPackLevelRetired:v1" data: catalogItemId: "item-004512" level: "CASE" gtin: "06141410000366" retiredAt: "2026-10-24T10:00:00Z" CatalogItemDiscontinued: name: CatalogItemDiscontinued title: Catalogue item discontinued summary: A catalogue item moved from ACTIVE to DISCONTINUED. description: "`type` = `com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemDiscontinued`; subject and key = the catalogItemId. Raised by DiscontinueItem. Every listing of the item is suppressed in the same transaction (reason DISCONTINUED), each with its own ListingSuppressed." contentType: application/cloudevents+json tags: - name: catalogitem payload: $ref: "#/components/schemas/CatalogItemDiscontinuedEvent" examples: - name: catalogItemDiscontinued summary: A catalogue item was discontinued. payload: specversion: "1.0" id: "7c1d3a52-5f0e-4a61-9a37-2b9d4e1f6a11" source: "/retailnetwork/offer-availability" type: "com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemDiscontinued" subject: "item-004512" time: "2026-10-23T09:30:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:offer-availability:events:CatalogItemDiscontinued:v1" data: catalogItemId: "item-004512" ListingCreated: name: ListingCreated title: Listing created summary: A catalogue item is now offered from a node. description: "`type` = `com.retailnetwork.commerce.offer-availability.listing.ListingCreated`; subject and key = the listingId. Raised by CreateListing. The event does not say whether the listing starts LIVE: a listing created on a node that is not sellable, or for a discontinued item, is followed in the same transaction by a ListingSuppressed. Availability starts at 0 with basis UNKNOWN until the first feed." contentType: application/cloudevents+json tags: - name: listing payload: $ref: "#/components/schemas/ListingCreatedEvent" examples: - name: listingCreated summary: A listing was created. payload: specversion: "1.0" id: "7c1d3a52-5f0e-4a61-9a37-2b9d4e1f6a12" source: "/retailnetwork/offer-availability" type: "com.retailnetwork.commerce.offer-availability.listing.ListingCreated" subject: "lst-000184" time: "2026-10-23T09:05:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:offer-availability:events:ListingCreated:v1" data: listingId: "lst-000184" catalogItemId: "item-004512" nodeId: "node-0f3a91" ListingAvailabilityChanged: name: ListingAvailabilityChanged title: Listing availability changed summary: A feed replaced the available quantity of a listing. description: "`type` = `com.retailnetwork.commerce.offer-availability.listing.ListingAvailabilityChanged`; subject and key = the listingId. Raised once per feed line that was applied and once per listing zeroed by FullFeedZeroing (a zeroed listing keeps its basis and gets the feed's asOf). `asOf` is strictly increasing per listing, so a consumer keeps the highest. Raised for a SUPPRESSED listing too: the state is carried by ListingSuppressed/ListingRestored, not here." contentType: application/cloudevents+json tags: - name: listing payload: $ref: "#/components/schemas/ListingAvailabilityChangedEvent" examples: - name: listingAvailabilityChanged summary: A feed replaced the quantity of a listing. payload: specversion: "1.0" id: "7c1d3a52-5f0e-4a61-9a37-2b9d4e1f6a13" source: "/retailnetwork/offer-availability" type: "com.retailnetwork.commerce.offer-availability.listing.ListingAvailabilityChanged" subject: "lst-000184" time: "2026-10-23T14:05:12Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:offer-availability:events:ListingAvailabilityChanged:v1" data: listingId: "lst-000184" catalogItemId: "item-004512" nodeId: "node-0f3a91" availableQty: 120 basis: THROUGHPUT_CONSTRAINED asOf: "2026-10-23T14:00:00Z" feedId: "feed-20261023-0007" ListingSuppressed: name: ListingSuppressed title: Listing suppressed summary: A listing stopped being sellable. description: "`type` = `com.retailnetwork.commerce.offer-availability.listing.ListingSuppressed`; subject and key = the listingId. Raised by SuppressListing: on NodeSuspended/NodeRetired (reason NODE_NOT_SELLABLE), on SellerSuspended for the seller's LIVE listings (OWNER_SUSPENDED), on creation for a node that is not sellable (NODE_NOT_SELLABLE), a discontinued item (DISCONTINUED) or a suspended owner (OWNER_SUSPENDED), and on DiscontinueItem (DISCONTINUED). `reason` is the highest active cause, by precedence DISCONTINUED > NODE_NOT_SELLABLE > OWNER_SUSPENDED (ADR 0013): whenever it changes (a higher cause arrives, or a cleared higher cause hands over to a remaining lower one, for example NodeActivated while the owner is still suspended) a second ListingSuppressed carries the new reason. DISCONTINUED is final." contentType: application/cloudevents+json tags: - name: listing payload: $ref: "#/components/schemas/ListingSuppressedEvent" examples: - name: listingSuppressed summary: A listing was suppressed because its node was suspended. payload: specversion: "1.0" id: "7c1d3a52-5f0e-4a61-9a37-2b9d4e1f6a14" source: "/retailnetwork/offer-availability" type: "com.retailnetwork.commerce.offer-availability.listing.ListingSuppressed" subject: "lst-000184" time: "2026-10-23T15:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:offer-availability:events:ListingSuppressed:v1" data: listingId: "lst-000184" nodeId: "node-0f3a91" reason: NODE_NOT_SELLABLE ListingRestored: name: ListingRestored title: Listing restored summary: A suppressed listing became LIVE again. description: "`type` = `com.retailnetwork.commerce.offer-availability.listing.ListingRestored`; subject and key = the listingId. Raised by RestoreListing when the last cause cleared: the node became ACTIVE again (NODE_NOT_SELLABLE) or the owner was reinstated (OWNER_SUSPENDED), and no other cause holds. A listing suppressed for DISCONTINUED is never restored." contentType: application/cloudevents+json tags: - name: listing payload: $ref: "#/components/schemas/ListingRestoredEvent" examples: - name: listingRestored summary: A listing was restored because its node was activated. payload: specversion: "1.0" id: "7c1d3a52-5f0e-4a61-9a37-2b9d4e1f6a15" source: "/retailnetwork/offer-availability" type: "com.retailnetwork.commerce.offer-availability.listing.ListingRestored" subject: "lst-000184" time: "2026-10-23T16:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:offer-availability:events:ListingRestored:v1" data: listingId: "lst-000184" nodeId: "node-0f3a91" InventoryFeedApplied: name: InventoryFeedApplied title: Inventory feed applied summary: A vendor inventory feed reached APPLIED. description: "`type` = `com.retailnetwork.commerce.offer-availability.inventoryfeed.InventoryFeedApplied`; subject and key = the feedId. Raised once by ApplyInventoryFeed when the feed reaches APPLIED, after the ListingAvailabilityChanged events of the same transaction. A FAILED or SUPERSEDED feed raises nothing. `lineCount` is the number of lines as received." contentType: application/cloudevents+json tags: - name: inventoryfeed payload: $ref: "#/components/schemas/InventoryFeedAppliedEvent" examples: - name: inventoryFeedApplied summary: A full feed was applied. payload: specversion: "1.0" id: "7c1d3a52-5f0e-4a61-9a37-2b9d4e1f6a16" source: "/retailnetwork/offer-availability" type: "com.retailnetwork.commerce.offer-availability.inventoryfeed.InventoryFeedApplied" subject: "feed-20261023-0007" time: "2026-10-23T14:05:12Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:offer-availability:events:InventoryFeedApplied:v1" data: feedId: "feed-20261023-0007" nodeId: "node-0f3a91" fullUpdate: true lineCount: 412 appliedAt: "2026-10-23T14:05:12Z" NodeRegistered: name: NodeRegistered title: Node registered (consumed) summary: node-topology registered a node in state PROPOSED. description: "Consumed. `type` = `com.retailnetwork.logistics.node-topology.node.NodeRegistered`. Only `nodeId` is read: it inserts the node into NodeStatusView as PROPOSED when the node is not known yet; for a known node it is a no-op. Every other field of the producer's payload is ignored." contentType: application/cloudevents+json tags: - name: node-topology payload: $ref: "#/components/schemas/NodeRegisteredIn" examples: - name: nodeRegistered summary: A node was registered. 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 NodeActivated: name: NodeActivated title: Node activated (consumed) summary: node-topology activated a node. description: "Consumed. `type` = `com.retailnetwork.logistics.node-topology.node.NodeActivated`. Sets the node ACTIVE in NodeStatusView at `activatedAt`, then restores every listing of the node suppressed for NODE_NOT_SELLABLE (one ListingRestored each), except a listing whose owner is SUSPENDED in SellerStatusView: its reason switches to OWNER_SUSPENDED (one ListingSuppressed, ADR 0013)." contentType: application/cloudevents+json tags: - name: node-topology payload: $ref: "#/components/schemas/NodeActivatedIn" examples: - name: nodeActivated summary: A node was activated. payload: specversion: "1.0" id: "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c41" source: "/retailnetwork/node-topology" type: "com.retailnetwork.logistics.node-topology.node.NodeActivated" subject: "node-0f3a91" time: "2026-10-22T13:10:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:node-topology:events:NodeActivated:v1" data: nodeId: "node-0f3a91" activatedAt: "2026-10-22T13:10:00Z" NodeSuspended: name: NodeSuspended title: Node suspended (consumed) summary: node-topology suspended a node. description: "Consumed. `type` = `com.retailnetwork.logistics.node-topology.node.NodeSuspended`. Sets the node SUSPENDED in NodeStatusView at `suspendedAt`, then suppresses every LIVE listing of the node and every listing suppressed for OWNER_SUSPENDED (reason NODE_NOT_SELLABLE, the higher cause; one ListingSuppressed each)." contentType: application/cloudevents+json tags: - name: node-topology payload: $ref: "#/components/schemas/NodeSuspendedIn" examples: - name: nodeSuspended summary: A node was suspended. payload: specversion: "1.0" id: "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c42" source: "/retailnetwork/node-topology" type: "com.retailnetwork.logistics.node-topology.node.NodeSuspended" subject: "node-0f3a91" time: "2026-10-23T08:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:node-topology:events:NodeSuspended:v1" data: nodeId: "node-0f3a91" suspendedAt: "2026-10-23T08:00:00Z" NodeRetired: name: NodeRetired title: Node retired (consumed) summary: node-topology retired a node. description: "Consumed. `type` = `com.retailnetwork.logistics.node-topology.node.NodeRetired`. Sets the node RETIRED (terminal) in NodeStatusView at `retiredAt`, then suppresses every LIVE listing of the node (reason NODE_NOT_SELLABLE)." contentType: application/cloudevents+json tags: - name: node-topology payload: $ref: "#/components/schemas/NodeRetiredIn" examples: - name: nodeRetired summary: A node was retired. payload: specversion: "1.0" id: "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1c43" source: "/retailnetwork/node-topology" type: "com.retailnetwork.logistics.node-topology.node.NodeRetired" subject: "node-0f3a91" time: "2026-10-23T18:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:node-topology:events:NodeRetired:v1" data: nodeId: "node-0f3a91" retiredAt: "2026-10-23T18:00:00Z" SellerSuspended: name: SellerSuspended title: Seller suspended (consumed) summary: seller-inbound suspended a seller. description: "Consumed. `type` = `com.retailnetwork.partner.seller-inbound.seller.SellerSuspended`. Sets the seller SUSPENDED in SellerStatusView at `suspendedAt` (an older event is ignored), then suppresses every LIVE listing whose ownerRef is `sellerId` (reason OWNER_SUSPENDED, one ListingSuppressed each). A listing already SUPPRESSED keeps its higher reason." contentType: application/cloudevents+json tags: - name: seller-inbound payload: $ref: "#/components/schemas/SellerSuspendedIn" examples: - name: sellerSuspended summary: A seller was suspended. payload: specversion: "1.0" id: "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1ca2" source: "/retailnetwork/seller-inbound" type: "com.retailnetwork.partner.seller-inbound.seller.SellerSuspended" subject: "seller-77" time: "2026-10-24T13:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:seller-inbound:events:SellerSuspended:v1" data: sellerId: "seller-77" suspendedAt: "2026-10-24T13:00:00Z" SellerReinstated: name: SellerReinstated title: Seller reinstated (consumed) summary: seller-inbound reinstated a suspended seller. description: "Consumed. `type` = `com.retailnetwork.partner.seller-inbound.seller.SellerReinstated`. Sets the seller ACTIVE in SellerStatusView at `reinstatedAt` (an older event is ignored), then restores every listing of the seller suppressed for OWNER_SUSPENDED (one ListingRestored each), unless its node is not sellable or its item discontinued: then the reason switches to that cause (one ListingSuppressed)." contentType: application/cloudevents+json tags: - name: seller-inbound payload: $ref: "#/components/schemas/SellerReinstatedIn" examples: - name: sellerReinstated summary: A seller was reinstated. payload: specversion: "1.0" id: "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1ca3" source: "/retailnetwork/seller-inbound" type: "com.retailnetwork.partner.seller-inbound.seller.SellerReinstated" subject: "seller-77" time: "2026-10-25T09:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:seller-inbound:events:SellerReinstated:v1" data: sellerId: "seller-77" reinstatedAt: "2026-10-25T09:00:00Z" InboundShipmentReceived: name: InboundShipmentReceived title: Inbound shipment received (consumed) summary: seller-inbound closed the receipt of an inbound shipment. description: "Consumed. `type` = `com.retailnetwork.partner.seller-inbound.inboundshipment.InboundShipmentReceived`. Creates, for each received item that has no listing of (item, `nodeId`, ownerRef = `sellerId`), the seller's listing (ListingCreated, availability 0 / UNKNOWN; ListingSuppressed when a cause holds). Lines resolve by `catalogItemId`, else by `gtin` through the catalogue's GTIN/packaging index; unresolvable lines and events without `received` are counted, never errors (ADR 0014)." contentType: application/cloudevents+json tags: - name: seller-inbound payload: $ref: "#/components/schemas/InboundShipmentReceivedIn" examples: - name: inboundShipmentReceived summary: A shipment received one resolved and one GTIN-only line. payload: specversion: "1.0" id: "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1ca4" source: "/retailnetwork/seller-inbound" type: "com.retailnetwork.partner.seller-inbound.inboundshipment.InboundShipmentReceived" subject: "shp-1" time: "2026-10-24T12:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:seller-inbound:events:InboundShipmentReceived:v1" data: shipmentId: "shp-1" sellerId: "S-1" nodeId: "n-1" status: "CLOSED" cartons: - sscc: "006141410000000012" status: "RECEIVED" receivedAt: "2026-10-24T12:00:00Z" received: - catalogItemId: "item-1" gtin: "00614141000012" qtyEaches: 24 - gtin: "00614141000036" qtyEaches: 6 ReturnCompleted: name: ReturnCompleted title: Return completed (consumed) summary: customer-returns closed a return at a node. description: "Consumed. `type` = `com.retailnetwork.commerce.customer-returns.returnauthorization.ReturnCompleted`. Each line's `qtyRestockable` is added to the available quantity of the listing of (catalogItemId, `nodeId`, ownerRef) — one ListingAvailabilityChanged per line, basis and state untouched. Lines with qtyRestockable <= 0, without a usable catalogItemId, or without a listing are counted in availability.customer_returns_events.ignored, never errors; `qtyUnsellable` is never applied (ADR 0015)." contentType: application/cloudevents+json tags: - name: customer-returns payload: $ref: "#/components/schemas/ReturnCompletedIn" examples: - name: returnCompleted summary: A return brought back two sellable and one unsellable unit. payload: specversion: "1.0" id: "3f6c2a9e-8b1d-4c7a-9e55-0d2f6b7a1cb1" source: "/retailnetwork/customer-returns" type: "com.retailnetwork.commerce.customer-returns.returnauthorization.ReturnCompleted" subject: "ret-1" time: "2026-11-14T12:00:00Z" datacontenttype: "application/json" dataschema: "urn:retailnetwork:customer-returns:events:ReturnCompleted:v1" data: authorizationId: "ret-1" outcome: "RECEIVED" nodeId: "n-1" lines: - catalogItemId: "item-1" ownerRef: "S-1" qtyRestockable: 2 qtyUnsellable: 1 receivedAt: "2026-11-14T12:00:00Z" 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, const: /retailnetwork/offer-availability } type: { type: string } subject: { type: string, description: The aggregate root id (catalogItemId, listingId or feedId). } time: { type: string, format: date-time } datacontenttype: { type: string, const: application/json } dataschema: { type: string } Basis: type: string description: Why the node gave the number; kept as the vendor declared it, never re-derived. enum: [PHYSICAL, THROUGHPUT_CONSTRAINED, UNKNOWN] SuppressionReason: type: string description: The highest active cause, by precedence DISCONTINUED > NODE_NOT_SELLABLE > OWNER_SUSPENDED (ADR 0013). enum: [NODE_NOT_SELLABLE, DISCONTINUED, OWNER_SUSPENDED] CatalogItemCreatedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: [catalogItemId, title, lengthMm, widthMm, heightMm, weightG, hazmat, fragile] properties: catalogItemId: { type: string } title: { type: string } lengthMm: { type: integer, minimum: 1 } widthMm: { type: integer, minimum: 1 } heightMm: { type: integer, minimum: 1 } weightG: { type: integer, minimum: 1 } hazmat: { type: boolean } fragile: { type: boolean } gtin: { type: string, pattern: "^[0-9]{14}$", description: The optional identifiers.gtin, normalised to 14 digits; omitted when the item has none. } CatalogItemPackagingDeclaredEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: [catalogItemId, level, gtin, unitsPerPack, declaredAt] properties: catalogItemId: { type: string } level: { $ref: "#/components/schemas/PackLevel" } gtin: { type: string, pattern: "^[0-9]{14}$" } childGtin: { type: string, pattern: "^[0-9]{14}$", description: The GTIN of the active lower level; omitted for EACH. } unitsPerPack: { type: integer, minimum: 1, maximum: 1000000, description: Eaches in one pack; 1 for EACH. } declaredAt: { type: string, format: date-time } CatalogItemPackLevelRetiredEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: [catalogItemId, level, gtin, retiredAt] properties: catalogItemId: { type: string } level: { $ref: "#/components/schemas/PackLevel" } gtin: { type: string, pattern: "^[0-9]{14}$" } retiredAt: { type: string, format: date-time } PackLevel: type: string enum: [EACH, INNER, CASE, PALLET] description: Packaging level, lowest first. CatalogItemDiscontinuedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: [catalogItemId] properties: catalogItemId: { type: string } ListingCreatedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: [listingId, catalogItemId, nodeId] properties: listingId: { type: string } catalogItemId: { type: string } nodeId: { type: string } ownerRef: { type: string, description: The owning seller (sellerId); omitted for an operator-owned listing. } ListingAvailabilityChangedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: [listingId, catalogItemId, nodeId, availableQty, basis, asOf, feedId] properties: listingId: { type: string } catalogItemId: { type: string } nodeId: { type: string } ownerRef: { type: string, description: The owning seller (sellerId); omitted for an operator-owned listing. } availableQty: { type: integer, minimum: 0 } basis: { $ref: "#/components/schemas/Basis" } asOf: { type: string, format: date-time, description: The instant the number is true for; strictly increasing per listing. } feedId: { type: string, description: The feed that carried the number. } ListingSuppressedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: [listingId, nodeId, reason] properties: listingId: { type: string } nodeId: { type: string } reason: { $ref: "#/components/schemas/SuppressionReason" } ListingRestoredEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: [listingId, nodeId] properties: listingId: { type: string } nodeId: { type: string } InventoryFeedAppliedEvent: allOf: - $ref: "#/components/schemas/CloudEventEnvelope" - type: object properties: data: type: object required: [feedId, nodeId, fullUpdate, lineCount, appliedAt] properties: feedId: { type: string } nodeId: { type: string } fullUpdate: { type: boolean } lineCount: { type: integer, minimum: 0, description: Lines in the feed as received. } appliedAt: { type: string, format: date-time } NodeRegisteredIn: type: object description: Tolerant copy of the node-topology NodeRegistered envelope; only the fields read are declared. required: [id, type, time, data] properties: id: { type: string } type: { type: string, const: com.retailnetwork.logistics.node-topology.node.NodeRegistered } time: { type: string, format: date-time } data: type: object required: [nodeId] properties: nodeId: { type: string } NodeActivatedIn: type: object description: Tolerant copy of the node-topology NodeActivated envelope; only the fields read are declared. required: [id, type, time, data] properties: id: { type: string } type: { type: string, const: com.retailnetwork.logistics.node-topology.node.NodeActivated } time: { type: string, format: date-time } data: type: object required: [nodeId, activatedAt] properties: nodeId: { type: string } activatedAt: { type: string, format: date-time } NodeSuspendedIn: type: object description: Tolerant copy of the node-topology NodeSuspended envelope; only the fields read are declared. required: [id, type, time, data] properties: id: { type: string } type: { type: string, const: com.retailnetwork.logistics.node-topology.node.NodeSuspended } time: { type: string, format: date-time } data: type: object required: [nodeId, suspendedAt] properties: nodeId: { type: string } suspendedAt: { type: string, format: date-time } NodeRetiredIn: type: object description: Tolerant copy of the node-topology NodeRetired envelope; only the fields read are declared. required: [id, type, time, data] properties: id: { type: string } type: { type: string, const: com.retailnetwork.logistics.node-topology.node.NodeRetired } time: { type: string, format: date-time } data: type: object required: [nodeId, retiredAt] properties: nodeId: { type: string } retiredAt: { type: string, format: date-time } SellerSuspendedIn: type: object description: Tolerant copy of the seller-inbound SellerSuspended envelope; only the fields read are declared (the producer's optional `reason` is not read). required: [id, type, data] properties: id: { type: string } type: { type: string, const: com.retailnetwork.partner.seller-inbound.seller.SellerSuspended } data: type: object required: [sellerId, suspendedAt] properties: sellerId: { type: string } suspendedAt: { type: string, format: date-time } SellerReinstatedIn: type: object description: Tolerant copy of the seller-inbound SellerReinstated envelope; only the fields read are declared. required: [id, type, data] properties: id: { type: string } type: { type: string, const: com.retailnetwork.partner.seller-inbound.seller.SellerReinstated } data: type: object required: [sellerId, reinstatedAt] properties: sellerId: { type: string } reinstatedAt: { type: string, format: date-time } InboundShipmentReceivedIn: type: object description: Tolerant copy of the seller-inbound InboundShipmentReceived envelope (seller-inbound ADR 0014); only the fields read are declared. `status`, `cartons` and `receivedAt` are not read. required: [id, type, data] properties: id: { type: string } type: { type: string, const: com.retailnetwork.partner.seller-inbound.inboundshipment.InboundShipmentReceived } data: type: object required: [sellerId, nodeId] properties: shipmentId: { type: string, description: Logged only. } sellerId: { type: string, description: The ownerRef of the listings created. } nodeId: { type: string } received: type: array description: The stock received per item, sorted by gtin, zero lines omitted. Absent on events published before seller-inbound ADR 0014, which create nothing (counted received_unknown). items: type: object required: [gtin, qtyEaches] properties: catalogItemId: { type: string, description: Omitted when the producer could not resolve it; the line then resolves by gtin. } gtin: { type: string, pattern: "^[0-9]{14}$", description: The EACH GTIN when the producer resolved it, otherwise the carton GTIN. } qtyEaches: { type: integer, minimum: 1, description: A line is used when > 0; the quantity is never applied as availability. } ReturnCompletedIn: type: object description: Tolerant copy of the customer-returns ReturnCompleted envelope; only the fields read are declared. `outcome` is not read (ReturnCompleted is published for one outcome only). required: [id, type, data] properties: id: { type: string } type: { type: string, const: com.retailnetwork.commerce.customer-returns.returnauthorization.ReturnCompleted } data: type: object required: [authorizationId, nodeId] properties: authorizationId: { type: string, description: The return's aggregate id; the provenance stamp of the restocked availability. } nodeId: { type: string, description: The node the return was received at; with catalogItemId and ownerRef it names the listing restocked. } receivedAt: { type: string, format: date-time, description: The restock instant; the CloudEvents time is used when absent. } lines: type: array description: The outcome per item. Absent counts lines_absent and restocks nothing. items: type: object required: [catalogItemId, qtyRestockable, qtyUnsellable] properties: catalogItemId: { type: string, description: The catalogue item the line returned. } ownerRef: { type: string, description: The seller whose stock was returned; omitted or empty means the operator-owned listing. } qtyRestockable: { type: integer, minimum: 0, description: Units the node can sell again; added to the listing's available quantity. } qtyUnsellable: { type: integer, minimum: 0, description: Units that cannot be sold again; never applied to any listing. }