Skip to content

Allowance Balances — Proposed Guide

Planned API — Reference Only

Allowance 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.

Proposed path parameters
NameTypeDescription
allowance_idrequiredstringStable 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, non-executing request examples
# 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

200 (proposed example)Static response fixture

Fictional documentation data only. No request was sent, record created, review performed, payment initiated or provider connection activated.

JSON
{
  "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.

422 (illustrative; final error contracts are undecided)Proposed error fixture

Synthetic diagnostic example. Human-readable messages must not be used as stable programmatic contracts.

JSON
{
  "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

Illustrative field dictionary
NameTypeDescription
allowance_idstringStable fictional allowance reference; not a secret and not evidence that a resource exists.
assigned_minorintegerAssigned allocation in minor units, not an assertion of withdrawable funds.
consumed_minorintegerConsumption attributed to the selected allowance period.
reserved_minorintegerProposed reservation amount kept separate from finalized consumption.
currencystringUppercase ISO 4217 currency code. Determine its minor-unit exponent before monetary conversion.