General ledger
general_ledgerThe general ledger for a date range — every account, or ONE account with accountCode — the same figures as Reports → General Ledger and its CSV. Per account: opening (its balance before from, from the first entry — there is no year-end close), the posted rows in date order (each: date, reference, memo, debit, credit, the running balance after it, and journalEntryId), totalDebit / totalCredit for the range, movement and closing. Balances are signed by the account's statement section (positive = a debit balance for assets and expenses, a credit balance for liabilities, equity and revenue), so closing equals that account's balance in trial_balance as of to. An account with no line in the range and a zero opening is left out and counted in accountsOmitted. ROWS ARE CAPPED: at most 300 rows come back across all accounts, in account-code then date order. When more is true the rows were cut short — but every account's opening, totals and closing are STILL EXACT, and hiddenRows on an account says how many of its lines are not shown. Never add up the rows you got as if they were the whole range; narrow the dates or ask for one accountCode to see the rest.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| accountCode | No | One account code (exact, e.g. "1010"). Omit for every account. |