invoiceninja_run_report
Run aggregated reports for invoices, payments, expenses, profit & loss, and tax summaries to return rows. If not ready, returns a report ID for later retrieval.
Instructions
Run an Invoice Ninja report (invoices, payments, expenses, profit & loss, aged receivables, tax summaries, product sales, …) and return its rows. Best for aggregates over many records. Reports are generated asynchronously: if not ready within max_wait_seconds a report_id is returned for invoiceninja_get_report_result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| extra | No | Additional report parameters, e.g. {'product_key': 'X'} | |
| report | Yes | Which report to run | |
| date_key | No | Date column the period applies to, e.g. 'date' or 'due_date' | |
| end_date | No | Date as YYYY-MM-DD | |
| max_rows | No | Maximum rows to return | |
| client_id | No | Restrict to one client (hashed id) | |
| date_range | No | Period; 'custom' requires start_date and end_date | this_year |
| start_date | No | Date as YYYY-MM-DD | |
| include_tax | No | profitloss only: include taxes | |
| report_keys | No | Columns to include, e.g. ['invoice.number','invoice.balance']. Empty = all columns (keys are listed in every result) | |
| include_deleted | No | ||
| response_format | No | 'markdown' (default) for a readable summary, 'json' for complete machine-readable data (empty fields removed) | markdown |
| is_income_billed | No | profitloss only: true = income from invoices, false = from payments | |
| max_wait_seconds | No | Seconds to wait for the report before returning its id |