---
title: "The firm's own business for the p17 Business screen (#4366)"
method: GET
path: "/accountant/business-metrics"
tags: ["Accountant Portal"]
---

# The firm's own business for the p17 Business screen (#4366)

`GET /accountant/business-metrics`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/business-metrics`
- Auth: HTTP bearer

Firm admin only (a super-admin reads as Firm admin; a preparer or reviewer gets 403). Every figure covers the clients the caller can see (a human super-admin: every client), read in four SQL statements whatever the client count. `top.liveClients` counts clients whose client status is `active`. Plan revenue reads only each Median subscription's quoted amount, a year divided by 12; a live subscription without a quoted amount (or with an interval other than month or year) is counted in `unpricedClients`, never priced from the plan list. A subscription is live in a month when it was created before the month ends and not ended by then (by now, for the current month). A scheduled cancel stays live while its status is still active; for an ended subscription the cancel request date stands in for the end date, so history can drop a client early. Test clients count in no revenue, plan or trend figure. `closesOnTime` counts the first final package carrying a reviewer sign-off for each client and month. It is on time when issued by the confirmed client close target (the Close board's default applies if no target is confirmed). `top` uses each client's last 3 such closes and `trend` uses the closes for that month's period. Penny cost is the cost of Penny's runs started in the UTC month; `budgetCents` is the firm's monthly Penny cap. `asksPerClient` is Penny's questions raised in the month over that month's live clients, null when none. Rows with no source yet come back as `{ tracked: false }`. `byOwner` groups the p4 roster (#4365) by each client's primary owner, with the roster's status rule for `onTrack` and the open Inbox items. Display only: nothing is written. A signed-in person only: every API key is refused, the service token included (404).

## Query parameters

- `months` integer

## Response `200`

The p17 Business metrics

- object
  - `success` true, required
  - `data` object, required
    - `top` object, required
      - `liveClients` integer, required
      - `planRevenueMonthCents` integer, required
      - `unpricedClients` integer, required
      - `closesOnTime` object, required
        - `rate` number, nullable, required: Percent, one decimal; null when nothing closed
        - `onTime` integer, required
        - `closed` integer, required
        - `withoutDeadline` integer, required
      - `pennyCost` object, required
        - `spentCents` integer, required
        - `budgetCents` integer, required
        - `onPaceCents` integer, required: #2587 p17: this month's spend carried to the month's end at the daily rate so far (UTC; the first hours count as one day).
    - `trend` object[], required
      - `month` string, required
      - `liveClients` integer, required
      - `planRevenueCents` integer, required
      - `closesOnTime` object, required
        - `rate` number, nullable, required: Percent, one decimal; null when nothing closed
        - `onTime` integer, required
        - `closed` integer, required
        - `withoutDeadline` integer, required
      - `packagesSentAgain` object, required
        - `tracked` false, required
      - `asksPerClient` number, nullable, required
      - `reviewHoursPerClient` number, nullable, required: #2587 p17 (migration 667): hours recorded on the month's close reviews (POST …/review-time), per live client, two decimals; null when nothing was recorded for the month or no client was live.
      - `pennyCostCents` integer, required
    - `byPlan` object[], required
      - `plan` string, nullable, required: The plan as checkout shows it: the retired tier (name and price) as "Median Accounting"
      - `clients` integer, required
      - `monthCents` integer, required
    - `byOwner` object[], required
      - `owner` object, nullable, required
        - `accountantId` string, uuid, required
        - `userId` string, uuid, nullable, required
        - `name` string, required
        - `initials` string, required
      - `clients` integer, required
      - `onTrack` integer, required
      - `inInbox` integer, required
      - `oldestItemAt` string, date-time, nullable, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `422`: Validation error

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/business-metrics/get.md)

---

[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/4f4c2d34276b?raw)
