---
title: "Expenses sub-ledger view (accountant mirror)"
method: GET
path: "/accountant/companies/{customerId}/sub-ledgers/expenses"
tags: ["Sub-Ledgers"]
---

# Expenses sub-ledger view (accountant mirror)

`GET /accountant/companies/{customerId}/sub-ledgers/expenses`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/sub-ledgers/expenses`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Accountant-scoped mirror of `GET /companies/{companyId}/sub-ledgers/expenses`. Same payload for the same company; requires the accountant to be assigned to the customer (403 otherwise). All amounts in cents. Posted-only.

## Query parameters

- `startDate` string, date
- `endDate` string, date
- `entityId` string, uuid

## Response `200`

Expenses sub-ledger payload

- object
  - `success` boolean
  - `data` SubLedgerExpensesView
    - `companyId` string, uuid, required
    - `entityId` string, uuid, required
    - `range` SubLedgerRange, required
      - `startDate` string, date, required
      - `endDate` string, date, required
      - `monthsInRange` integer, required
    - `tiles` SubLedgerExpensesTiles, required
      - `recognizedCents` integer, required: Sum of posted JE debits on Expense GL accounts within the range. Equals /reports/pl totalExpenses × 100 within 1 cent.
      - `bookedCents` integer, required: Sum of processed/reviewed bills (by docDate) plus direct expense-categorized transactions in range.
      - `prepaidCarryingCents` integer, required: Cumulative GL balance of Prepaid Expense asset accounts at range.end.
      - `accruedCarryingCents` integer, required: Cumulative GL balance of Accrued Liability accounts at range.end.
    - `chart` object, required
      - `data` SubLedgerChartPoint[], required: Monthly series; at least 6 points (6-month floor)
        - `label` string, required: Month label in YYYY-MM format
        - `recognizedCents` integer, required
        - `bookedCents` integer, required
    - `drill` object, required
      - `groups` SubLedgerExpenseGroup[], required: All expense category groups sorted by bookedCents desc
        - `categoryGlAccountId` string, uuid, nullable
        - `name` string, required: GL account name, or "(Uncategorized)"
        - `bookedCents` integer, required
        - `bills` SubLedgerBillRow[], required
          - `id` string, uuid, required
          - `number` string, nullable
          - `docDate` string, date, nullable
          - `amountCents` integer, required
          - `vendorName` string, nullable
          - `categoryGlAccountId` string, uuid, nullable
          - `categoryGlAccountName` string, nullable
          - `recognition` RecognitionMarker, required: How a document (invoice revenue or bill expense) is recognized. `immediate` = single-period recognition; `amortize` = spread across `months` calendar periods via an entity-keyed schedule; `unavailable` means the legacy schedule source cannot authorize the selected entity.
            - `type` 'immediate' | 'amortize' | 'unavailable', required
            - `months` integer: Only present when type = amortize. Total periods in the schedule.
            - `monthsPosted` integer: Only present when type = amortize. Posted schedule runs.
            - `reason` 'schedule_authority_not_entity_scoped': Only present when type = unavailable.
        - `direct` SubLedgerDirectRow[], required
          - `id` string, uuid, required
          - `occurredOn` string, date, required
          - `amountCents` integer, required
          - `description` string, required
          - `categoryGlAccountId` string, uuid, nullable

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `422`: Invalid query parameters (missing or malformed date range)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
