askledgerDocs
REST-APIAdministrations
Documentatie

List balances per ledger account per month (by administration)

GET
/administrations/{administrationId}/balances

Balances of general ledger accounts per month: opening balance, debit, credit, movement and closing balance, for every month in the range (default the last 12 months). Filter by ledgerAccount, classification or kind; accounts without any lines are left out. Answers questions like 'how did our revenue develop per month' or 'what was the balance of account 1300 at the end of June'. For profit and loss accounts use movement per month: their balance keeps adding up over the years. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.

Same as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience urn:ledgersuite:askledger, scope askledger:read) for administrations that include them; company group API keys and OAuth tokens work too.

Requires the ledger:read scope (Lezen). Same operation as the MCP tool list-account-balances.

Authorization

bearer
headerAuthorizationBearer <token>

A company group API key (al_live_…, created at /dashboard/api), an OAuth access token from the same authorization flow MCP clients use, or (other LedgerSuite products, /administrations routes only) a LedgerSuite client_credentials token.

Path Parameters

administrationId*string

LedgerSuite administration id; its linked ledger is used

Query Parameters

fromMonth?string

First month; default 11 months before toMonth (YYYY-MM, inclusive)

Match^\d{4}-(0[1-9]|1[0-2])$
toMonth?string

Last month; default the current month (YYYY-MM, inclusive)

Match^\d{4}-(0[1-9]|1[0-2])$
ledgerAccount?string

Ledger account id (lac_…) or account code, e.g. 1100

Length1 <= length
classification?string
Value in"asset""liability""equity""revenue""expense""unknown"
kind?string

balance or pnl (profit and loss)

Value in"balance""pnl""unknown"
limit?integer

Max accounts (default 20, max 100)

Range1 <= value <= 100
cursor?string

nextCursor of the previous page

Length1 <= length

Response Body

OK

application/json
  1. response
items*array<>
total*|

Total matching records; null for a free-text search, which ranks instead of counting

nextCursor*|

Pass as cursor to get the next page; null on the last page

currency*|

Base currency of the ledger

months*array<string>

The months covered (YYYY-MM)

firstTransactionDate*|

Date of the oldest synced line (YYYY-MM-DD)

curl -X GET "https://example.com/administrations/string/balances"
{  "items": [    {      "ledgerAccountId": "string",      "code": "string",      "name": "string",      "classification": "asset",      "kind": "balance",      "rgsCode": "string",      "openingBalance": 0,      "closingBalance": 0,      "months": [        {          "month": "string",          "openingBalance": 0,          "debit": 0,          "credit": 0,          "movement": 0,          "closingBalance": 0        }      ]    }  ],  "total": 0,  "nextCursor": "string",  "currency": "string",  "months": [    "string"  ],  "firstTransactionDate": "string"}