{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","title":"BalanceUpdatedEvent","description":"Event emitted when account balances are updated after transaction posting or other operations","properties":{"accountId":{"type":"object","description":"Account identifier","properties":{"value":{"type":"string","format":"uuid","description":"The unique account UUID"}},"required":["value"]},"balanceUpdates":{"type":"array","description":"List of balance updates for different account types","items":{"type":"object","properties":{"accountDefinitionId":{"type":"integer","description":"Account definition identifier"},"accountDefinitionName":{"type":"string","description":"Account definition name"},"previousBalance":{"type":"integer","description":"Previous balance amount (in smallest currency unit, e.g., 100 = 1.00)"},"newBalance":{"type":"integer","description":"New balance amount (in smallest currency unit, e.g., 100 = 1.00)"},"change":{"type":"integer","description":"Balance change amount (in smallest currency unit, e.g., 100 = 1.00)"}},"required":["accountDefinitionId","accountDefinitionName","previousBalance","newBalance","change"]}},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"Currency of the balances (ISO 4217)","example":"EUR"},"timestamp":{"type":"string","format":"date-time","description":"Timestamp when the balances were updated"}},"required":["accountId","balanceUpdates","currency","timestamp"],"additionalProperties":false}