{"asyncapi":"2.6.0","id":"urn:ord-playground:events:all","info":{"title":"Shop Events","version":"1.0.0","description":"All business events of the ORD playground shop.\n\nEvents are [CloudEvents 1.0](https://cloudevents.io) in structured JSON mode."},"servers":{"local":{"url":"events-ord.zazukoians.org","protocol":"wss","description":"Event stream of the playground"}},"defaultContentType":"application/cloudevents+json","channels":{"/ws/orders":{"description":"Lifecycle events of sales orders. `orderId` joins to the Orders OData service, `customerId` to the Customers API.","subscribe":{"operationId":"onOrdersEvent","message":{"$ref":"#/components/messages/OrderStatusChanged"}},"bindings":{"ws":{"bindingVersion":"0.1.0"}}},"/ws/shipments":{"description":"Tracking updates of shipments. `shipmentId` / `trackingNumber` join to the Shipping SOAP service, `orderId` to the Orders OData service.","subscribe":{"operationId":"onShipmentsEvent","message":{"$ref":"#/components/messages/ShipmentTrackingUpdated"}},"bindings":{"ws":{"bindingVersion":"0.1.0"}}},"/ws/inventory":{"description":"Stock level changes. `productId` joins to the Products GraphQL API.","subscribe":{"operationId":"onInventoryEvent","message":{"$ref":"#/components/messages/ProductStockChanged"}},"bindings":{"ws":{"bindingVersion":"0.1.0"}}}},"components":{"messages":{"OrderStatusChanged":{"name":"OrderStatusChanged","title":"Order Status Changed","summary":"The status of a sales order changed","contentType":"application/cloudevents+json","payload":{"allOf":[{"$ref":"#/components/schemas/CloudEvent"},{"type":"object","properties":{"type":{"type":"string","const":"zazuko.shop.Order.StatusChanged.v1"},"data":{"type":"object","required":["orderId","customerId","previousStatus","status"],"properties":{"orderId":{"type":"string","example":"O1008"},"customerId":{"type":"string","example":"C004"},"previousStatus":{"$ref":"#/components/schemas/OrderStatus"},"status":{"$ref":"#/components/schemas/OrderStatus"}}}}}]}},"ShipmentTrackingUpdated":{"name":"ShipmentTrackingUpdated","title":"Shipment Tracking Updated","summary":"A shipment passed a new tracking checkpoint","contentType":"application/cloudevents+json","payload":{"allOf":[{"$ref":"#/components/schemas/CloudEvent"},{"type":"object","properties":{"type":{"type":"string","const":"zazuko.shop.Shipment.TrackingUpdated.v1"},"data":{"type":"object","required":["shipmentId","orderId","trackingNumber","carrier","status","location"],"properties":{"shipmentId":{"type":"string","example":"SH5007"},"orderId":{"type":"string","example":"O1007"},"trackingNumber":{"type":"string"},"carrier":{"type":"string","example":"DHL"},"status":{"type":"string","enum":["IN_TRANSIT","OUT_FOR_DELIVERY","DELIVERED"]},"location":{"type":"string","example":"Berlin Hub"}}}}}]}},"ProductStockChanged":{"name":"ProductStockChanged","title":"Product Stock Changed","summary":"The stock level of a product changed","contentType":"application/cloudevents+json","payload":{"allOf":[{"$ref":"#/components/schemas/CloudEvent"},{"type":"object","properties":{"type":{"type":"string","const":"zazuko.shop.Product.StockChanged.v1"},"data":{"type":"object","required":["productId","delta","reason"],"properties":{"productId":{"type":"string","example":"P003"},"delta":{"type":"integer","example":-2},"reason":{"type":"string","enum":["sale","restock","return"]}}}}}]}}},"schemas":{"OrderStatus":{"type":"string","enum":["OPEN","PROCESSING","SHIPPED","DELIVERED","CANCELLED"]},"CloudEvent":{"type":"object","required":["specversion","id","source","type","time","data"],"properties":{"specversion":{"type":"string","const":"1.0"},"id":{"type":"string","format":"uuid"},"source":{"type":"string","example":"/ord-playground/order-events"},"type":{"type":"string"},"subject":{"type":"string","description":"ID of the business object the event is about"},"time":{"type":"string","format":"date-time"},"datacontenttype":{"type":"string","const":"application/json"},"data":{"type":"object"}}}}}}