Allowance Balances — Proposed Guide
Planned API — Reference OnlyAllowance Balances: A balance would explain assigned, consumed and remaining amounts for a defined period. Pending expenses may require a separate…
Overview
A balance would explain assigned, consumed and remaining amounts for a defined period. Pending expenses may require a separate reserved amount rather than being counted as final consumption.
Key concepts
State the balance formula and source record cutoff. Include currency and period context.
Implementation considerations
The illustrative balance is not withdrawable cash. A future calculation must handle corrections and prevent double counting.
Proposed API behavior
GET /v1/allowances/{allowance_id}/balance is an illustrative design for this topic. Path and field names may change before implementation. Access would require an authorized organization context and operation-specific permission; no public API or authorization grant is available here.
| Name | Type | Description |
|---|---|---|
| allowance_idrequired | string | Stable fictional allowance reference; not a secret and not evidence that a resource exists. |
No additional request fields are illustrated; this is not a finalized contract.
Static example requests
# Proposed request text only; this reserved host is not a live API.
curl -X GET 'https://api.remizen.example/v1/allowances/allowance_example_123/balance' \
-H 'Authorization: Bearer YOUR_API_KEY'Fictional response example
Fictional documentation data only. No request was sent, record created, review performed, payment initiated or provider connection activated.
{
"data": {
"allowance_id": "allowance_example_123",
"assigned_minor": 20000,
"consumed_minor": 12550,
"reserved_minor": 0,
"currency": "USD",
"id": "allowances_example_123",
"organization_id": "org_example_123"
},
"meta": {
"request_id": "req_example_123",
"reference_only": true
}
}Illustrative error case
Review this failure case in context: The illustrative balance is not withdrawable cash. A future calculation must handle corrections and prevent double counting.
Synthetic diagnostic example. Human-readable messages must not be used as stable programmatic contracts.
{
"error": {
"code": "validation_error",
"message": "The proposed allowance balances operation requires review of its input or authorization.",
"request_id": "req_example_123"
}
}Proposed data types
| Name | Type | Description |
|---|---|---|
| allowance_id | string | Stable fictional allowance reference; not a secret and not evidence that a resource exists. |
| assigned_minor | integer | Assigned allocation in minor units, not an assertion of withdrawable funds. |
| consumed_minor | integer | Consumption attributed to the selected allowance period. |
| reserved_minor | integer | Proposed reservation amount kept separate from finalized consumption. |
| currency | string | Uppercase ISO 4217 currency code. Determine its minor-unit exponent before monetary conversion. |