Skip to main content

Domain Events API 1.0.0 documentation

AsyncAPI documentation for domain change events. This API describes the structure of events when domain entities are created, updated, or deleted. Supported entity types:
  • Asset: Vehicles and equipment
  • User/Driver: People and drivers
  • HierarchyNode: Organization hierarchy groups
  • Customer: Customer accounts
The message format uses compact JSON with abbreviated field names for bandwidth efficiency. The fc, cv, and pv fields contain embedded JSON strings that must be parsed separately.

Table of Contents

Servers

kafka Server

  • URL: kafka://{brokerHost}:{brokerPort}/
  • Protocol: kafka-secure

URL Variables

NameDescriptionDefault valueAllowed values
brokerHostKafka broker hostnamelocalhostAny
brokerPortKafka broker port9092Any

Security

Security Requirement 1
  • security.protocol: SASL_SSL
  • sasl.mechanism: OAUTHBEARER

Operations

RECEIVE mn_domain_events Operation

Receive a domain event
  • Operation ID: receiveDomainEvent
Channel for domain change events. Events for all entity types (Asset, User/Driver, HierarchyNode, Customer) are published to this channel. Receives domain events when an entity is created, updated, deleted, or refreshed. The ety (entityType) field determines which entity type the event relates to:
  • Asset: Vehicle/equipment changes
  • User/Driver: Person/driver changes
  • HierarchyNode: Organization hierarchy changes
  • Customer: Customer account changes

Message Domain Event DomainEvent

A domain change event for any supported entity type
Payload
NameTypeDescriptionValueConstraintsNotes
(root)objectDomain event payload with compact field names. The fc, cv, and pv fields contain JSON strings that must be parsed. Their structure depends on the ety (entityType) field: - Asset: See AssetEntity schema - User/Driver: See PersonEntity schema - HierarchyNode: See HierarchyNodeEntity schema - Customer: See CustomerEntity schema--additional properties are allowed
etstringEvent timestamp - when the domain event occurred (ISO 8601 format)-format (date-time)required
unstringUsername - the user who made the change---
cidstringCustomer ID - identifier of the customer owning the entity--required
eidstringEntity ID - unique identifier of the changed entity--required
enstringEntity name - human-readable name of the entity (e.g., asset registration, person name)---
etystringEntity type - determines the structure of fc, cv, and pv fieldsallowed ("Asset", "User/Driver", "HierarchyNode", "Customer")-required
ddostringDomain data operation: - CREATED: New entity created - UPDATED: Existing entity modified - DELETED: Entity removed - REFRESH: Entity data refreshed (sync)allowed ("CREATED", "UPDATED", "DELETED", "REFRESH")-required
ipidsarray<string>Interested party IDs - list of interested party identifiers (omitted if empty)---
ipids (single item)string----
iptagsarray<string>Interested party tags - list of interested party tags (omitted if empty)---
iptags (single item)string----
fcstringField changes - JSON string containing an array of field change objects. Each object has fieldName, previousValue, and currentValue. Present for CREATED and UPDATED operations. See FieldChange schema for structure.---
cvstringCurrent version - JSON string containing the full entity state after the change. The structure depends on the ety field. Null for DELETED operations. See entity schemas (AssetEntity, PersonEntity, etc.).---
pvstringPrevious version - JSON string containing the full entity state before the change. The structure depends on the ety field. Null for CREATED operations. See entity schemas (AssetEntity, PersonEntity, etc.).---
Examples of payload (generated)
{
  "et": "2019-08-24T14:15:22Z",
  "un": "string",
  "cid": "string",
  "eid": "string",
  "en": "string",
  "ety": "Asset",
  "ddo": "CREATED",
  "ipids": [
    "string"
  ],
  "iptags": [
    "string"
  ],
  "fc": "string",
  "cv": "string",
  "pv": "string"
}

Download AsyncAPI Specification

Domain Events AsyncAPI Specification