1. Balances
| Field | Description | Used in |
|---|---|---|
| key | Unique identifier for the balance within the account context | Midaz |
| available | Amount available for transactions | Midaz |
| onHold | Amount currently reserved or on hold | Midaz |
| version | Balance version, updated with each transaction (for optimistic concurrency) | Midaz |
| accountType | Type of account that holds this balance | Midaz |
| allowSending | Whether the balance can be used to send transactions | Midaz |
| allowReceiving | Whether the balance can be used to receive transactions | Midaz |
| assetCode | Asset or currency code (ISO 4217, 3 characters) | Midaz |
| alias | Account alias for quick identification | Midaz |
2. Transaction routes
| Field | Description | Used in |
|---|---|---|
| title | Short text summarizing the route’s purpose (max 50 characters) | Midaz |
| description | Detailed description of the transaction route (max 250 characters) | Midaz |
| operationRoutes | Array of operation route IDs that define source and destination logic | Midaz |
3. Operation routes
| Field | Description | Used in |
|---|---|---|
| operationType | Route direction: source or destination | Midaz |
| code | External reference code for the operation route | Midaz |
| account | Account selection rule for the operation | Midaz |
| ruleType | Account selection method: alias or account_type | Midaz |
| validIf | Condition that must be satisfied for the rule to match | Midaz |
4. Metadata indexes
| Field | Description | Used in |
|---|---|---|
| metadataKey | Metadata key to index (max 100 characters, must match the field name in entities) | Midaz |
| unique | Whether the index enforces uniqueness (duplicate values rejected when true) | Midaz |
| sparse | Whether the index is sparse (only indexes entities containing the field) | Midaz |
| indexName | Name of the created index | Midaz |
| entityName | Name of the entity collection the index applies to | Midaz |

