AsyncAPI specification for purchasing domain events published by the ERP integration layer. JSON Schema files under schemas/ are the authoritative contract. Every message uses the common integration envelope (schemas/common/integration_envelope.v1.schema.json); event-specific business data is embedded in the envelope payload field.
Channel carrying all purchasing domain events from ERP.
ERP publishes PurchaseOrderWasCreated when a new purchase order is created.
Accepts the following message:
Full purchase-order snapshot emitted after creation.
Envelope carrying a newly created two-line purchase order
{
"specVersion": "1",
"messageId": "7b9f1c34-1c2d-4f7a-9b2e-2c3a4d5e6f70",
"eventType": "PurchaseOrderWasCreated",
"eventVersion": 1,
"producer": "erp",
"occurredAt": "2026-04-28T05:30:00Z",
"aggregateType": "PurchaseOrder",
"aggregateId": "01f63420-4214-44e0-ba9b-10daf956aacd",
"payload": {
"id": "01f63420-4214-44e0-ba9b-10daf956aacd",
"number": "PO-4500012345",
"vendorId": "V-1001",
"companyCode": "1000",
"businessPlaceCode": "BP-MUM",
"delivery": {
"name": "Boodmo Mumbai Warehouse",
"addressLine1": "Warehouse Road 12",
"city": "Mumbai",
"state": "MH",
"postalCode": "400001"
},
"poDate": "2026-04-28",
"status": "New",
"confirmationDueAt": "2026-04-29T05:30:00Z",
"items": [
{
"id": "c2ca1be7-3122-45f0-97b2-0b7243fcfbcf",
"materialId": 12345,
"materialCode": "ABC123",
"vendorPn": "SUP-11",
"manufacturerId": "M-100",
"manufacturerCode": "BOSCH",
"hsnCode": "87089900",
"gstRate": "18.000000",
"orderedQty": "5.000000",
"remainingQty": "5.000000",
"cancelledQty": "0.000000",
"receivedQty": "0.000000",
"status": "New",
"confirmationStatus": "WAITING",
"dispatchDueAt": "2026-04-30T12:30:00Z",
"invoiceDueAt": "2026-05-05T12:30:00Z",
"stockType": "STOCK",
"sourcePriceListId": "0ceb9e33-ea4f-40be-ab5f-f96a691469b4",
"netPriceCents": 4500,
"requestCancelQuantity": "0.000000",
"version": 1
},
{
"id": "802f7a9d-cc7b-4f25-9544-fb6428eab3a2",
"materialId": 67890,
"materialCode": "XYZ555",
"vendorPn": "SUP-99",
"manufacturerId": "M-200",
"manufacturerCode": "DENSO",
"hsnCode": "84099900",
"gstRate": "12.000000",
"orderedQty": "3.000000",
"remainingQty": "3.000000",
"cancelledQty": "0.000000",
"receivedQty": "0.000000",
"status": "New",
"confirmationStatus": "WAITING",
"dispatchDueAt": "2026-05-02T12:30:00Z",
"invoiceDueAt": "2026-05-07T12:30:00Z",
"stockType": "STOCK",
"sourcePriceListId": "0ceb9e33-ea4f-40be-ab5f-f96a691469b4",
"netPriceCents": 3200,
"requestCancelQuantity": "0.000000",
"version": 1
}
]
}
}
Channel carrying all purchasing domain events from ERP.
ERP publishes PurchaseOrderChanged when purchase-order header fields change.
Accepts the following message:
Purchase-order header snapshot emitted when header fields change.
Envelope carrying a changed purchase-order header snapshot
{
"specVersion": "1",
"messageId": "4ea5a22c-0d83-4a30-85c4-8cf31d6ffd1d",
"eventType": "PurchaseOrderChanged",
"eventVersion": 1,
"producer": "erp",
"occurredAt": "2026-04-28T05:30:00Z",
"aggregateType": "PurchaseOrder",
"aggregateId": "01f63420-4214-44e0-ba9b-10daf956aacd",
"payload": {
"id": "01f63420-4214-44e0-ba9b-10daf956aacd",
"number": "PO-4500012345",
"vendorId": "V-1001",
"companyCode": "1000",
"businessPlaceCode": "BP-MUM",
"delivery": {
"name": "Boodmo Mumbai Warehouse",
"addressLine1": "Warehouse Road 12",
"city": "Mumbai",
"state": "MH",
"postalCode": "400001"
},
"poDate": "2026-04-28",
"status": "New",
"confirmationDueAt": "2026-04-29T05:30:00Z"
}
}
Channel carrying all purchasing domain events from ERP.
ERP publishes PurchaseOrderItemChanged when a purchase-order line item changes.
Accepts the following message:
Single purchase-order line-item snapshot emitted when an item changes.
Envelope carrying one changed purchase-order line item
{
"specVersion": "1",
"messageId": "0dd4e038-cd3d-477d-8dd8-874433ece656",
"eventType": "PurchaseOrderItemChanged",
"eventVersion": 1,
"producer": "erp",
"occurredAt": "2026-04-28T05:45:00Z",
"aggregateType": "PurchaseOrderItem",
"aggregateId": "c2ca1be7-3122-45f0-97b2-0b7243fcfbcf",
"payload": {
"id": "c2ca1be7-3122-45f0-97b2-0b7243fcfbcf",
"materialId": 12345,
"materialCode": "ABC123",
"vendorPn": "SUP-11",
"manufacturerId": "M-100",
"manufacturerCode": "BOSCH",
"hsnCode": "87089900",
"gstRate": "18.000000",
"orderedQty": "5.000000",
"remainingQty": "4.000000",
"cancelledQty": "0.000000",
"receivedQty": "1.000000",
"status": "Processing",
"confirmationStatus": "PARTIALLY_CONFIRMED",
"dispatchDueAt": "2026-04-30T12:30:00Z",
"invoiceDueAt": "2026-05-05T12:30:00Z",
"stockType": "STOCK",
"sourcePriceListId": "0ceb9e33-ea4f-40be-ab5f-f96a691469b4",
"netPriceCents": 4500,
"requestCancelQuantity": "0.500000",
"version": 1
}
}
Channel carrying all purchasing domain events from ERP.
ERP publishes PurchaseOrderItemCancellationRequested when a line-item cancellation is requested.
Accepts the following message:
Cancellation request emitted for a single purchase-order line item.
Envelope carrying a line-item cancellation request
{
"specVersion": "1",
"messageId": "6bc4f6a7-9c5e-4f33-8ed5-7d81a1f0a2a9",
"eventType": "PurchaseOrderItemCancellationRequested",
"eventVersion": 1,
"producer": "erp",
"occurredAt": "2026-04-28T06:00:00Z",
"aggregateType": "PurchaseOrderItem",
"aggregateId": "c2ca1be7-3122-45f0-97b2-0b7243fcfbcf",
"payload": {
"id": "c2ca1be7-3122-45f0-97b2-0b7243fcfbcf",
"requestedCancelQty": "2.000000",
"reasonCode": "CUSTOMER_REQUEST"
}
}
Full purchase-order snapshot emitted after creation.
Purchase-order header snapshot emitted when header fields change.
Single purchase-order line-item snapshot emitted when an item changes.
Cancellation request emitted for a single purchase-order line item.