Skip to content

Domain Events

All events share a common base structure and are stored as JSON files in the event store.

Base Structure

json
{
  "eventId": "uuid-v4",
  "occurredAt": "2026-03-20T10:00:00.000Z",
  "aggregateId": "uuid-v4",
  "version": 1
}

Event Catalogue

EventAggregateDescription
OrderReceivedOrderPlatform accepted a raw order from a source adapter
OrderValidatedOrderOrder passed all validation rules
OrderValidationFailedOrderOne or more validation rules failed
OrderSentToWarehouseOrderOrder successfully submitted to the warehouse adapter
ShipmentCreatedShipmentWarehouse confirmed a shipment for this order
TrackingAssignedShipmentCarrier tracking number assigned
SourceStatusUpdatedOrderSource adapter notified of status change
OrderCompletedOrderFull lifecycle complete
OrderFailedOrderNon-recoverable failure at any stage
CustomsDeclarationCreatedOrderCustoms plugin created a declaration
CustomsSubmittedOrderDeclaration submitted to customs authority
CustomsApprovedOrderCustoms authority approved the declaration
CustomsRejectedOrderCustoms authority rejected the declaration
WarehouseAssignedGroupActive warehouse changed for a company group

JSON Schemas

Machine-readable JSON Schema files for each event are in spec/events/.

Released under the MIT License.