---
title: "Largest expense accounts across companies"
method: GET
path: "/reports/firm-expense-breakdown"
tags: ["Reports"]
---

# Largest expense accounts across companies

`GET /reports/firm-expense-breakdown`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/reports/firm-expense-breakdown`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Read-only firm staff report. Runs Transaction Detail by Account for each selected accessible company (client companies only by default; firm books need explicit opt-in and permission), groups expense accounts by name across companies, and ranks them. Returns companies (organizationId, name, basis, expenseTotalCents, excludedCents, includedCents, error when one company's report failed), includedTotalCents, accounts (rank, name, totalCents, shareOfIncludedPct, lineCount, byCompany, topPayees), otherAccounts, and excludedAccounts. Amounts are positive integer cents matching each company's Profit & Loss for the same dates and basis.

## Query parameters

- `companyIds` string
- `includeFirmBooks` boolean
- `period` 'this_month' | 'last_month' | 'this_quarter' | 'last_quarter' | 'ytd' | 'this_year' | 'last_year'
- `startDate` string, date
- `endDate` string, date
- `basis` 'accrual' | 'cash'
- `excludeAccounts` string
- `top` integer
- `payeesPerAccount` integer
- `includeAskClient` boolean

## Response `200`

Ranked expense accounts across companies with payees and exclusions

## Other responses

- `400`: Invalid parameters or startDate after endDate
- `403`: Firm staff access is required
- `404`: A requested company is not one you can access
- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
