Cash balance format
The format of cash-balance: one message per tenant and business date, with the cash expected to remain in the drawers and cash changers of each store, per currency. What each field means for an integration, and how to consume the event, is in
Receiving the events.
The copy External Events links to is rec.public.event.cash-balance.v1.json.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"id": "hiiretail.contracts.rec.public.cash-balances.v1",
"title": "CashBalances",
"description": "Expected cash balances at end-of-day for all cash drawers and cash changers in each store for each currency under a tenant",
"type": "object",
"required": [
"tenantId",
"businessDate",
"cashBalances"
],
"properties": {
"tenantId": {
"type": "string",
"description": "Unique identifier of the tenant"
},
"businessDate": {
"type": "string",
"format": "date",
"description": "The date (not time) for the cash balances"
},
"cashBalances": {
"type": "array",
"description": "Expected cash balances for cash drawers and cash changers for each business unit (store)",
"items": {
"$ref": "#/$defs/StoreCashBalance"
}
}
},
"$defs": {
"StoreCashBalance": {
"type": "object",
"required": [
"businessUnitId",
"amounts"
],
"properties": {
"businessUnitId": {
"type": "string",
"description": "Identifier of the business unit (store)"
},
"amounts": {
"type": "array",
"description": "List of cash amounts by currency",
"items": {
"$ref": "#/$defs/CurrencyAmount"
}
}
}
},
"CurrencyAmount": {
"type": "object",
"required": [
"currencyId",
"amount"
],
"properties": {
"currencyId": {
"type": "string",
"description": "Three-letter ISO currency code",
"minLength": 3,
"maxLength": 3
},
"amount": {
"type": "number",
"description": "Expected cash balances at end-of-day for all cash drawers and cash changers in each store for each currency under a tenant"
}
}
}
}
}