SolariumSolariumDocs
Browse The Docs

Docs/API Reference/Reports

POST

Spending By Vendor

Expenses grouped by vendor, one column per month or quarter. Uses the same posted expense lines as the Profit & Loss (Cost of Goods Sold, Operating and Other Expenses, before tax), so the grand total always equals the P&L's total expenses. A line belongs to its transaction's vendor, else the line's own contact (QuickBooks history), else its known business, else its cleaned bank text; anything left is "No Vendor" (key "none"). Vendors are sorted biggest first. To list one vendor's entries, call accountLines with the returned accountIds and vendor set to the row's key.

Parameters

organizationIdUUID!required

Organization ID

startDateDate!required

Start of range (YYYY-MM-DD)

endDateDate!required

End of range (YYYY-MM-DD)

granularityString

"month" (default) or "quarter"

Request
query {
  spendingByVendor(
    organizationId: "a1b2c3d4-..."
    startDate: "2026-01-01"
    endDate: "2026-02-28"
  ) {
    currency
    periods { key label startDate endDate }
    vendors { key name logoUrl amounts total percent count }
    totals
    total
    accountIds
  }
}
Response
{
  "data": {
    "spendingByVendor": {
      "currency": "CAD",
      "periods": [
        { "key": "2026-01", "label": "Jan 2026", "startDate": "2026-01-01", "endDate": "2026-01-31" },
        { "key": "2026-02", "label": "Feb 2026", "startDate": "2026-02-01", "endDate": "2026-02-28" }
      ],
      "vendors": [
        { "key": "c:7f3e...", "name": "Hall Properties", "logoUrl": null, "amounts": ["900.00", "900.00"], "total": "1800.00", "percent": "62.1", "count": 2 },
        { "key": "g:41aa...", "name": "Slack", "logoUrl": "https://...", "amounts": ["12.00", "12.00"], "total": "24.00", "percent": "0.8", "count": 2 },
        { "key": "none", "name": "No Vendor", "logoUrl": null, "amounts": ["0", "40.00"], "total": "40.00", "percent": "1.4", "count": 1 }
      ],
      "totals": ["1430.00", "1470.00"],
      "total": "2900.00",
      "accountIds": ["..."]
    }
  }
}