Evaluate report
evaluate_reportResolve a report template OR an insight view against a period. Templates: every field measured off the ledger or derived by its formula, each with a drilldown — name a statutory template by source (e.g. locale:za/vat201) or a stored template by templateid. Views (view: payables, receivables, profit-and-loss, balance-sheet, cash-flow, trial-balance, salestax-summary, salestax-activity, … — see the view param for the full list; e.g. payables returns every outstanding bill with supplier, amount, due date and currency, receivables the same for invoices): the data-driven insight feeds stub-web's screens render. With snapshotid the period evaluates FROZEN from the snapshot's filed listing — the filed numbers, immutable; without, LIVE from the current books.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asAt | No | For as-at views (account-totals-as-at, balance-sheet, clearing-residual): the position date (YYYY-MM-DD), inclusive. Synonym for periodEnd. | |
| mode | No | trial-balance: "cumulative" (default — closing balances as at periodEnd, opening/retained included, ties to the balance sheet) or "period"/"range" (period-movement only within [periodStart..periodEnd], for error-checking a window). | |
| view | No | An insight view instead of a template: account-totals, account-totals-as-at, trial-balance, profit-and-loss, balance-sheet, cash-flow, receivables, payables, customer-totals, supplier-totals, product-totals, salestax-summary, salestax-activity, income-tax-summary, inventory, clearing-residual. Provide this OR a template, not both. | |
| basis | No | income-tax-summary: "profit" (default) or "turnover". | |
| source | No | A statutory template source, e.g. "locale:za/vat201". Provide this or templateid. | |
| compare | No | profit-and-loss: true = two columns, the equal-length prior period and the current one. | |
| filters | No | Row filters: [{"property": "tags"|"customer"|"supplier"|"product"|"account", "value": ...}]; tags value "none" means untagged. | |
| journal | No | account-totals and entity totals: restrict to one journal (1 income, 2 expenses, 3 assets, 4 liabilities, 5 equity). | |
| monthly | No | Views with columns (profit-and-loss, cash-flow): true = one column per calendar month in the period. | |
| version | No | Template version. Omit for the version in effect at the period end. | |
| constants | No | Constants a template's formulas name ($salesTaxRate → {"salesTaxRate": 0.15}). Undeclared here, coercion would strip them and the formula would silently evaluate with 0. | |
| dimension | No | cash-flow: "category" (default — counterpart categories) or "baseaccount" (per bank/cash account). | |
| periodEnd | No | ||
| snapshotid | No | Evaluate FROZEN against this snapshot's filed listing (the period must sit inside its window) instead of the live books. | |
| templateid | No | A stored user template id. Provide this or source. | |
| periodStart | No |