Run a report
liveRun any report from listReports by its code. The result is one table shape for every report: typed columns and rows whose values are keyed by column. Rows that aggregate postings have a stable key for listReportRowEntries.
Details
Large listings (the general ledger) are paginated. format=pdf, csv or xlsx answers 303 to a short-lived link to the same report as a file. A parameter the report does not read is refused. Some codes need more than reports:read, what the records' own operations need: trial-balance, general-ledger and control-totals ledger:read; contact-balances and aging invoices:read; billing-run-comparison billing:read; meter-reconciliation objects:read. control-totals leaves out the sections the token or the organization's modules would not show (documents and open items: invoices:read; payments: payments:read; fixed assets: assets:read) and names them in parameters.omitted. A report of a module the organization does not use (the dimension crosstab, the billing comparison, the meter reconciliation) is refused.
Parameters
path and queryReport code from listReports, e.g. balance-sheet or trial-balance.
Balance date, for reports of state (balance sheet, trial balance, contact balances, aging).
Up to 12 period columns, each a balance date (2026-12-31) or an inclusive range (2026-01-01..2026-12-31). Replaces as_of/date_from/date_to.
Adds a comparative column to one period: the year before, or the period before (a balance date one month back; a range of whole months by its own number of months, any other range by its length).
One of none, prior_period, prior_year
Only postings carrying these dimension values, <dimension_id>:<value_id> each, at most one value per dimension.
A statement split into one column per value of this dimension (one period); required by dimension-crosstab.
dimension-crosstab only, required there; the code of the statement layout whose lines are the rows.
billing-run-comparison only, required there; the run compared with the plan's previous run.
Rendition. Anything but json answers 303 to the file. Accept asks for one too (application/pdf, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet); format wins when both are sent.
One of json, pdf, csv, xlsx
Responses
errors use the error envelope| 200 | ReportResult · The report. |
| 303 | The report as a file (format pdf, csv or xlsx), at a short-lived link. Follow it without your Authorization header: the link is pre-signed. |
| 400 | The request fails validation. This operation's own codes: REPORT_TOO_LARGE. |
| 401 | No token, an expired token, or a token for another audience (UNAUTHENTICATED). |
| 402 | The organization's subscription is not active (SUBSCRIPTION_INACTIVE): the trial ended without a plan, a payment is overdue, the subscription was cancelled, or the accounting firm that paid for it stopped. context.reason says which (trial_ended, not_paid, cancelled, payer_stopped; accept values you do not know) and context.export_until the last day (ISO date) the organization's data can still be exported. Every operation is refused, reads included, except reading the current user and the organization and the data export. A retry unchanged fails the same way: an owner reopens the subscription in the app. |
| 403 | The token lacks a scope (INSUFFICIENT_SCOPE; WWW-Authenticate names it), the user's role or membership does not allow it (PERMISSION_DENIED, OPERATION_NOT_PERMITTED, ORG_MEMBERSHIP_REQUIRED, ORGANIZATION_MISMATCH), it needs a stronger sign-in (STEP_UP_REQUIRED), the feature is off for the organization (CAPABILITY_DISABLED), the organization's plan does not include the feature (PLAN_FEATURE_NOT_INCLUDED: write operations; for an API credential without the API feature, every operation that names an organization; context.capability names the feature and context.required_plan the plan that includes it), a demo company refuses it (DEMO_ORG_ACTION_BLOCKED), or a test copy of a company refuses handing out an e-MTA file (SANDBOX_ACTION_BLOCKED, context.action); FORBIDDEN when nothing more specific applies. |
| 404 | Not found. This operation's own codes: REPORT_NOT_FOUND. |
| 429 | Rate limit exceeded (RATE_LIMITED). Wait Retry-After seconds. |
Errors this operation can return
switch oncode, never on message| Code | Status | When |
|---|---|---|
REPORT_TOO_LARGE | 400 | The file would be too large to make at once. |
REPORT_NOT_FOUND | 404 | This report does not exist. |
Plus the general codes every operation can answer (UNAUTHENTICATED, RATE_LIMITED …): handle them once.