AsyncAPI specification for invoicing 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 invoicing domain events from ERP.
ERP publishes InvoiceWasCreated when a new invoice is created.
Accepts the following message:
Full invoice snapshot (header + line items) emitted after creation.
Envelope carrying a newly created two-line invoice
{
"specVersion": "1",
"messageId": "3f6a1d2e-8b4c-4e5f-9a7b-1c2d3e4f5a6b",
"eventType": "InvoiceWasCreated",
"eventVersion": 1,
"producer": "erp",
"occurredAt": "2026-09-30T15:40:42Z",
"aggregateType": "Invoice",
"aggregateId": "01a0f2e4-17e5-7192-beb1-88096f9fbefd",
"payload": {
"invoice": {
"id": "01a0f2e4-17e5-7192-beb1-88096f9fbefd",
"type": "INVOICE",
"status": "POSTED",
"dueDate": null,
"vendorId": 1253,
"amountNet": 513882,
"amountTax": 92498,
"createdAt": "2026-09-30T15:17:09+00:00",
"updatedAt": "2026-09-30T15:40:42+00:00",
"amountGross": 606380,
"blockReason": null,
"companyCode": "MTC",
"postingDate": "2026-09-30",
"documentDate": "2026-09-30",
"paymentBlock": false,
"lineItemCount": 2,
"quantityTotal": 2,
"documentNumber": "inv/test/123",
"businessPlaceCode": "P_DL01",
"sourceOfSupply": "01a0f2e4-17e5-7192-beb1-88096f9fbefd"
},
"items": [
{
"id": "01a0f2e4-1939-70c5-ab9a-fc08ee015b98",
"mrp": 669500,
"uom": "pcs",
"lineNo": 10,
"hsnCode": "87080808",
"netPrice": 510636,
"quantity": 1,
"createdAt": "2026-09-30T15:17:10+00:00",
"updatedAt": "2026-09-30T15:40:42+00:00",
"amountBase": 510636,
"gstPercent": 18,
"materialId": 58334236,
"description": "68001M55R02",
"materialCode": "68001M55R02",
"manufacturerId": 2456,
"manufacturerCode": "MARUTI SUZUKI"
},
{
"id": "01a0f2ed-ac06-73d4-9c86-47a5ab86f8b0",
"mrp": null,
"uom": "pcs",
"lineNo": 20,
"hsnCode": "11111111",
"netPrice": 3246,
"quantity": 1,
"createdAt": "2026-09-30T15:27:37+00:00",
"updatedAt": "2026-09-30T15:40:42+00:00",
"amountBase": 3246,
"gstPercent": 18,
"materialId": null,
"description": "Platform Charges",
"materialCode": null,
"manufacturerId": null,
"manufacturerCode": null
}
]
}
}
Channel carrying all invoicing domain events from ERP.
ERP publishes InvoiceWasUpdated when an existing invoice is updated.
Accepts the following message:
Full invoice snapshot (header + line items) emitted after an update.
Envelope carrying an updated two-line invoice
{
"specVersion": "1",
"messageId": "9c8b7a6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"eventType": "InvoiceWasUpdated",
"eventVersion": 1,
"producer": "erp",
"occurredAt": "2026-09-30T15:40:42Z",
"aggregateType": "Invoice",
"aggregateId": "01a0f2e4-17e5-7192-beb1-88096f9fbefd",
"payload": {
"invoice": {
"id": "01a0f2e4-17e5-7192-beb1-88096f9fbefd",
"type": "INVOICE",
"status": "POSTED",
"dueDate": null,
"vendorId": 1253,
"amountNet": 513882,
"amountTax": 92498,
"createdAt": "2026-09-30T15:17:09+00:00",
"updatedAt": "2026-09-30T15:40:42+00:00",
"amountGross": 606380,
"blockReason": null,
"companyCode": "MTC",
"postingDate": "2026-09-30",
"documentDate": "2026-09-30",
"paymentBlock": false,
"lineItemCount": 2,
"quantityTotal": 2,
"documentNumber": "inv/test/123",
"businessPlaceCode": "P_DL01",
"sourceOfSupply": "01a0f2e4-17e5-7192-beb1-88096f9fbefd"
},
"items": [
{
"id": "01a0f2e4-1939-70c5-ab9a-fc08ee015b98",
"mrp": 669500,
"uom": "pcs",
"lineNo": 10,
"hsnCode": "87080808",
"netPrice": 510636,
"quantity": 1,
"createdAt": "2026-09-30T15:17:10+00:00",
"updatedAt": "2026-09-30T15:40:42+00:00",
"amountBase": 510636,
"gstPercent": 18,
"materialId": 58334236,
"description": "68001M55R02",
"materialCode": "68001M55R02",
"manufacturerId": 2456,
"manufacturerCode": "MARUTI SUZUKI"
},
{
"id": "01a0f2ed-ac06-73d4-9c86-47a5ab86f8b0",
"mrp": null,
"uom": "pcs",
"lineNo": 20,
"hsnCode": "11111111",
"netPrice": 3246,
"quantity": 1,
"createdAt": "2026-09-30T15:27:37+00:00",
"updatedAt": "2026-09-30T15:40:42+00:00",
"amountBase": 3246,
"gstPercent": 18,
"materialId": null,
"description": "Platform Charges",
"materialCode": null,
"manufacturerId": null,
"manufacturerCode": null
}
]
}
}
Full invoice snapshot (header + line items) emitted after creation.
Full invoice snapshot (header + line items) emitted after an update.