---
title: "Legal metrics envelope (three GL-only cards)"
method: GET
path: "/companies/{companyId}/metrics/legal"
tags: ["Overview"]
---

# Legal metrics envelope (three GL-only cards)

`GET /companies/{companyId}/metrics/legal`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/metrics/legal`
- Auth: HTTP bearer

Returns the Home legal-metrics pack (#3927), every figure scoped to the one legal entity resolved exactly as /overview resolves it (`entityId` when given, else the actor's single authorized entity; echoed as `data.entityId`). Owner draws against profit (year to date — from the saved fiscal year start when `companies.fiscal_year_end` is set, else January 1, the window's `label` says which — and trailing 12 months): `drawsCents` is the debits to the chart's active owner-draw / member-distribution equity accounts over posted, non-closing entries in the window that move something other than equity; credits to those accounts are reported separately as `returnedCents` and never netted, and an entry whose every line is equity (a year-end sweep of draws into capital) is skipped; `netIncomeCents` is the P&L's net income for the same dates. Cash after card balances is the overview's `operatingCashAvailable` (posted cash less short-term debt) for the same entity, as /overview serves it. Collections for the trailing 3 and 12 months is the P&L's revenue for the window; `kind` is `collections` only when the configured statement basis is cash (the ledger's revenue, which is cash collected while the ledger carries no receivables); on accrual or unset books it is `recognized_revenue`, and `basisSource` says whether a basis was saved at all. Draws are equity, never an expense: no P&L or burn figure changes. Honest denominators: a card whose input is absent reports `available: false` with a reason and a readable detail (a chart with no active owner-draw account reports `no_owner_draw_account`, never a zero). Each card carries the proven `minorUnitExponent` of its currency and each window the inclusive dates the reports tie to. Returns 404 unless `legal_metrics` is in the company's `additionalMetrics` list; the surface does not exist for an unlisted company.

## Path parameters

- `companyId` string, uuid, required

## Query parameters

- `entityId` string, uuid

## Response `200`

Legal metrics envelope

- LegalMetricsEnvelopeResponse
  - `success` true, required
  - `data` object, required
    - `businessModel` string, nullable, required: The company's stored business model (#1967).
    - `entityId` string, uuid, required: The legal entity every figure is scoped to, resolved as /overview resolves it.
    - `basis` 'cash' | 'accrual' | 'unknown', required: The configured statement basis the Collections label follows.
    - `basisSource` 'statement_basis' | 'tax_settings' | 'company' | 'missing' | 'unavailable', required: Where that basis came from; `missing` = none saved (enable a basis before relying on the collections card).
    - `fiscalYearEnd` string, nullable, required: companies.fiscal_year_end (MM-DD) when saved; the year-to-date window starts the day after the most recent fiscal year end.
    - `asOf` string, date, required
    - `cards` object, required
      - `ownerDrawsVsProfit` union, required
        - LegalCardUnavailable
          - `available` false, required
          - `reason` 'no_owner_draw_account' | 'mixed_currency' | 'not_configured' | 'failed', required
          - `detail` string, required: Customer-readable sentence for the card's unavailable state.
        - object
          - `available` true, required
          - `currency` string, nullable, required
          - `minorUnitExponent` integer, nullable, required: The proven ISO 4217 scale of `currency` (2 for USD); null with a null currency. Clients format with it, never with an assumed 2.
          - `drawAccounts` object[], required: The chart's ACTIVE owner-draw / member-distribution equity accounts the figure was read from.
            - `id` string, required
            - `code` string, required
            - `name` string, required
          - `windows` intersection[], required
            - intersection
              - …
      - `cashAfterCards` union, required
        - LegalCardUnavailable
          - `available` false, required
          - `reason` 'no_owner_draw_account' | 'mixed_currency' | 'not_configured' | 'failed', required
          - `detail` string, required: Customer-readable sentence for the card's unavailable state.
        - object
          - `available` true, required
          - `currency` string, nullable, required
          - `minorUnitExponent` integer, nullable, required: The overview's `minorUnitExponent` for `currency`; null with a null currency.
          - `operatingCashAvailable` number, required: The overview's `metrics.operatingCashAvailable` (major units) for the same legal entity, posted cash less short-term debt, as /overview serves it.
          - `glCashBalance` number, required: The overview's `metrics.glCashBalance` (major units).
          - `shortTermDebt` number, required: The overview's `metrics.shortTermDebt` (major units).
          - `asOf` string, date, required
      - `collections` union, required
        - LegalCardUnavailable
          - `available` false, required
          - `reason` 'no_owner_draw_account' | 'mixed_currency' | 'not_configured' | 'failed', required
          - `detail` string, required: Customer-readable sentence for the card's unavailable state.
        - object
          - `available` true, required
          - `kind` 'collections' | 'recognized_revenue', required: `collections` only on a cash-basis company (the ledger's revenue, cash collected while no receivables are carried); otherwise the figure is recognized revenue and the card is labelled so.
          - `basis` 'cash' | 'accrual' | 'unknown', required
          - `basisSource` 'statement_basis' | 'tax_settings' | 'company' | 'missing' | 'unavailable', required: Where the configured basis came from (#2911). `missing` means no basis is saved, so the card must not be captioned as accrual.
          - `currency` string, nullable, required
          - `minorUnitExponent` integer, nullable, required: The P&L's proven scale for `currency`; null with a null currency.
          - `windows` intersection[], required
            - intersection
              - …

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: legal_metrics is not in this company's additionalMetrics list
- `422`: Request failed validation
- `503`: The legal-entity scope authority could not be read

## Changes

- **2026-10-31** `9f070569ef03`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/companies/:companyId/metrics/legal/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)
