---
title: "Customer posted-books cash series (accountant mirror)"
method: GET
path: "/accountant/companies/{customerId}/metrics/cash-history"
tags: ["Overview"]
---

# Customer posted-books cash series (accountant mirror)

`GET /accountant/companies/{customerId}/metrics/cash-history`

## Request

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

Accountant-scoped mirror of `GET /companies/{companyId}/metrics/cash-history`. Entity scope is resolved from the customer's own entity roster (accountants hold no per-user entity grants): an explicit `entityId` must be one of the customer's concrete (non-group) entities; absent, the customer's single concrete entity is used; a multi-entity customer without `entityId` gets 422 ENTITY_SELECTION_REQUIRED and a customer with no entity gets 422 ENTITY_SCOPE_UNAVAILABLE.

## Query parameters

- `entityId` string, uuid
- `months` integer

## Response `200`

Cash-history envelope (same shape as the customer mount)

- CashHistoryResponse
  - `success` true, required
  - `data` CashHistoryData, required
    - `available` boolean, required: False when the company has no cash accounts or no posted cash journal lines at all (series empty).
    - `basis` 'posted-books', required
    - `series` CashHistoryPoint[], required: Ascending by date; one point per day with activity plus window-boundary points (a flat window is just the boundary points).
      - `date` string, date, required
      - `balanceCents` integer, required: Cumulative posted cash balance at the end of this date, in cents.

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Unknown customer or an explicit entityId not belonging to the customer
- `422`: Request failed validation

---

[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)
