Get P&L Report
get_pl_reportGet a profit and loss summary grouped by category for a specified date range. Filter by customer or include a per-customer breakdown.
Instructions
Return a profit & loss summary grouped by category for a given date range. Excludes transactions marked exclude_from_reports. Pass customer_id to scope the report to a single attributed customer, or group_by_customer: true to include a per-customer rollup alongside the category breakdown. Transactions with no customer attribution bucket as 'Unattributed' in the rollup. Response includes a render field with tiered rendering guidance - check it before composing your reply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_date | Yes | End date (YYYY-MM-DD, inclusive). | |
| from_date | Yes | Start date (YYYY-MM-DD, inclusive). | |
| customer_id | No | Optional. Restrict the report to transactions attributed to this customer. | |
| group_by_customer | No | Optional. When true, include a `by_customer` rollup with per-customer income, expenses, and net. Transactions without a customer attribution bucket as 'Unattributed'. |