Read totals by customer or supplier
reports_totals_by_contactRead a company's sales by customer or purchases by supplier for a period: each contact, by its id and name, with what its invoices - or bills - dated in the period total, and the company's totals: on FreeAgent and Xero VAT included, the biggest first, in each currency apart. FreeAgent's and Xero's APIs total no period by contact, so there this is computed from every invoice or bill dated in the period - drafts and those cancelled or voided left out, credit notes not taken off, save that a FreeAgent bill refund, kept as a negative bill, lowers its supplier's total - and marked computed. On Zoho Books it is Zoho's own Sales by Customer or Purchases by Vendor report, never computed: each contact by its id where Zoho names one, in Zoho's own order and with no company totals, with Zoho's figures before and after tax and its counts - purchases counting bills, expenses, vendor credits and journals, spending that names no supplier standing as Others - in the organisation's base currency, which companies_list names. On QuickBooks it is QuickBooks' own Sales by Customer Summary, or Expenses by Supplier Summary, for the period - its figures before tax, in the company's home currency, a customer's sub-customers and projects in a section under it, the supplier summary counting every expense booked to a supplier, bill or not, and one booked to none in a row with an empty name and no id, never computed: report, from, to, currency, columns - their titles - and rows in QuickBooks' order, each with cells - its values in column order - and id, the QuickBooks record its first cell names, where it names one; a section carries header, its own rows and summary. For one company or several and at most four at once, read live from FreeAgent, Xero, QuickBooks or Zoho Books. A company that could not be read stands under unread with why, as bank_accounts_list answers it. A Zoho Books organisation whose sign-in Zoho refuses its reports stands under unread as zoho_reports, its note saying to add Zoho Books again signed in to Zoho as the same account.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kind": "<kind>",
"from": "<from>"
},
"name": "reports_totals_by_contact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | The last day of the period, as 2026-10-31; today where omitted. | |
| from | Yes | The first day of the period, as 2026-04-01. | |
| kind | Yes | sales for sales by customer, from invoices; purchases for purchases by supplier, from bills. On QuickBooks, purchases come from every expense. | |
| companies | No | The ids companies_list gives the companies to read; every company where omitted. |