Totals of transactions, grouped
query_transactionsAdds up transactions that match a search, grouped by up to two of: month, week (starting Monday), quarter, year, day, category, counterparty, account, company, direction, kind. Measures: sum, count, avg, min, max, money_in, money_out, per currency (currencies are never added together). Filters are the same as search_transactions (query, company, from, to), so a group can be opened with search_transactions to see its rows. Voided rows are left out; expected (not yet happened) rows only with include_expected. Payroll rows of companies where this connection can't see payroll are left out, and the answer names those companies. Money moved between the user's own accounts or companies (transfers, card payments, payouts, intercompany, owner loans and contributions, reimbursements) is left out unless include_transfers is true, so totals are income and spending.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| from | No | ||
| limit | No | Groups returned (default 50, max 200). | |
| order | No | key: by group (default when grouping by a date); largest/smallest: by absolute sum (default otherwise). | |
| query | No | Same as search_transactions, e.g. out category:software or counterparty:"AWS" -refund. | |
| company | No | Company name or id, "Personal", or "all". Omit for every company this connection can see. | |
| group_by | No | Up to two, e.g. ["month","category"]. Empty: one total. | |
| measures | No | ||
| include_expected | No | ||
| include_transfers | No | Also count transfers, card payments, payouts, intercompany and owner money. |