Get the profit and loss statement per month
The profit and loss statement (winst- en verliesrekening) per month (default the last 12 months): every profit and loss account's movement, grouped by RGS rubriek (e.g. WOmz netto-omzet, WKpr kostprijs, WPer personeelskosten) in the order of the Dutch P&L model, with totals per group and the result per month. Revenue is positive and costs negative, so result is the sum of the groups. Accounts without an RGS code are in unmapped-revenue / unmapped-expense. 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.
Requires the ledger:read scope (Lezen). Same operation as the MCP tool get-profit-and-loss.
bearerAuthorizationBearer <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.
ledgerId*stringLedger (administration) id, from list-ledgers
1 <= lengthfromMonth?stringFirst month; default 11 months before toMonth (YYYY-MM, inclusive)
^\d{4}-(0[1-9]|1[0-2])$toMonth?stringLast month; default the current month (YYYY-MM, inclusive)
^\d{4}-(0[1-9]|1[0-2])$OK
application/json- response
currency*|Base currency of the ledger
months*array<string>The months covered (YYYY-MM)
firstTransactionDate*|Date of the oldest synced line (YYYY-MM-DD)
groups*array<>Rubrieken with at least one account
result*array<number>Result per month (sum of the groups)
total*numberResult over the whole range
curl -X GET "https://example.com/ledgers/string/profit-and-loss"{ "currency": "string", "months": [ "string" ], "firstTransactionDate": "string", "groups": [ { "code": "string", "name": "string", "accounts": [ { "ledgerAccountId": "string", "code": "string", "name": "string", "rgsCode": "string", "amounts": [ 0 ], "total": 0 } ], "totals": [ 0 ], "total": 0 } ], "result": [ 0 ], "total": 0}