Overview

Posted-books cash balance series (daily, or completed-month with granularity=month)

Changed on

Returns the daily posted-books cash balance series behind the Home hero cash card's trend chart. Cash accounts resolve through the same rule the overview uses; the opening balance is the cumulative POSTED journal-line balance before the window start, and the series then walks the window's posted journal lines day by day — one point per day with activity, plus window-boundary points. Entity-scoped when entityId is given. available is false with series: [] when the company has no cash accounts or no posted cash journal lines at all.

get/companies/{companyId}/metrics/cash-history

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    HTTP bearer

Path parameters

companyId, string uuid required

Query parameters

entityId, string uuid

Optional concrete legal-entity scope for entity-scopable Home reads. Omitted means company-wide; when present it must be a legal entity the actor is authorized to read (the raw value is never trusted).

months, integer

Trailing window in months; the window starts on the first day of the month months-1 back. Clamped 1-24; invalid values fall back to the default. With granularity=month the accepted values are restricted to 1, 3, 6, or 12 (422 otherwise, default 12).

granularity, 'day' | 'month'

day (default) preserves the original daily contract. month returns the F02 completed-month contract: strict concrete legal entity, separate currentCash and completed-month history with per-point provenance; months is then restricted to 1, 3, 6, or 12 (422 otherwise, default 12) and never includes the current partial month.

Response

Cash-history payload

union required
CashHistoryResponse required
OR
MonthlyCashHistoryResponse required

Example response

{
  "data": {
    "currentCash": {
      "authority": {
        "startMonth": "2026-05",
        "endMonth": "2026-07",
        "monthKeys": [
          "2026-05"
        ]
      }
    },
    "history": {
      "value": {
        "slots": [
          {
            "month": "2026-05"
          }
        ]
      },
      "diagnostic": {
        "slots": [
          {
            "month": "2026-05"
          }
        ]
      },
      "authority": {
        "startMonth": "2026-05",
        "endMonth": "2026-07",
        "monthKeys": [
          "2026-05"
        ]
      }
    }
  }
}

Changes

    • info

      added the optional property oneOf[#/components/schemas/MonthlyCashHistoryResponse]/data/history/diagnostic/slots/items/reason to the response with the status

    • info

      added the optional property oneOf[#/components/schemas/MonthlyCashHistoryResponse]/data/history/diagnostic/slots/items/unclassifiedAccounts to the response with the status