---
title: "Revenue sub-ledger view"
method: GET
path: "/companies/{companyId}/sub-ledgers/revenue"
tags: ["Sub-Ledgers"]
---

# Revenue sub-ledger view

`GET /companies/{companyId}/sub-ledgers/revenue`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/sub-ledgers/revenue`
- Auth: HTTP bearer

Demo-parity customer route for an explicitly allowlisted active or test company.
Range-driven revenue sub-ledger composing the P&L recognized total (posted JE lines on Revenue accounts) with booked documents (invoices in `processed` or `reviewed` status) and direct categorized transactions. Returns tiles (recognized, booked, and deferred carrying), a 6-month-floor monthly chart, and a drill-down grouped by customer. All amounts in cents. Posted-only.

## Query parameters

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

## Response `200`

Revenue sub-ledger payload

- object
  - `success` boolean
  - `data` SubLedgerRevenueView
    - `companyId` string, uuid, required
    - `entityId` string, uuid, required
    - `range` SubLedgerRange, required
      - `startDate` string, date, required
      - `endDate` string, date, required
      - `monthsInRange` integer, required
    - `tiles` SubLedgerRevenueTiles, required
      - `recognizedCents` integer, required: Operating revenue recognized in the range: /reports/pl totalRevenue (which excludes other income since #2745) minus 4999 Uncategorized Income (answered 2026-09-24), so the page ties to the Books hub.
      - `bookedCents` integer, required: Sum of processed/reviewed invoices (by docDate) plus direct operating-revenue transactions in range. A receipt whose journal entries were all voided is not booked.
      - `deferredCarryingCents` integer, required: Cumulative GL balance of deferred-revenue liability accounts (detail type or name) at range.end (point-in-time carrying).
      - `uncategorizedIncomeCents` integer: 4999 Uncategorized Income recognized in the range, shown apart from revenue ("Excluded from Revenue until categorized").
    - `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` SubLedgerRevenueGroup[], required: All customer groups sorted by bookedCents desc
        - `name` string, required: Customer name (invoice customer, or the Stripe/QBO customer on a direct receipt); receipts with no customer are grouped per account as "Receipts without a customer · {account}". "(Unknown)" for an invoice with no customer.
        - `recognizedCents` integer, nullable, required: null when invoice-level recognition timing lacks entity authority.
        - `deferredCents` integer, nullable, required: null when invoice-level recognition timing lacks entity authority.
        - `bookedCents` integer, required
        - `invoices` SubLedgerInvoiceRow[], required
          - `id` string, uuid, required
          - `number` string, nullable
          - `docDate` string, date, nullable
          - `amountCents` integer, required
          - `customerName` 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
- `404`: Resource not found
- `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)
