GET
/accounts/code/{code}/balance/point-in-timeGet an account point-in-time balance for a single layer, by code
By-code form of the point-in-time balance: one layer, recomputed at as_of.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
coderequired | path | string | Account code (customer-defined identifier) |
as_ofrequired | query | string date-time | Point-in-time instant: ISO 8601 with an explicit timezone (Z or ±HH:MM) at SECOND precision, e.g. 2026-04-15T14:07:32Z. The balance is recomputed from the immutable entries as of this instant; ledger timestamps are second-granular. |
layer | query | string enum: settled | pending | encumbrance · default: "settled" | The single layer to reconstruct (defaults to settled). |
Responses
200Point-in-time balance retrieved successfully
{
"success": true,
"data": {
"account_id": "01234567-89ab-cdef-0123-456789abcdef",
"account_code": "1000",
"layer": "settled",
"balance": "150.00",
"currency": "GBP",
"as_of": "2026-04-15T14:07:32+00:00"
}
} 401Unauthenticated
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 403Forbidden
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 404Account not found
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 422Validation error
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} Examples
curl https://ledga.io/api/v1/accounts/code/{code}/balance/point-in-time?as_of=2026-04-15T14%3A07%3A32Z \
-H "Authorization: Bearer sk_xxxxxxxx_your_secret"