---
title: "Cash from the buy, a year of weeks on the terms clock"
method: GET
path: "/api/v1/finance/reports/cash-from-the-buy"
tags: ["finance_reports"]
---

# Cash from the buy, a year of weeks on the terms clock

`GET /api/v1/finance/reports/cash-from-the-buy`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/finance/reports/cash-from-the-buy`
- Auth: HTTP bearer

A year of retail weeks with the buy on each supplier's terms: what settles in, what a retailer has committed, what leaves the bank, what the plan of record still implies, and the balance and headroom walked against the declared cash floor. Four bands: the weeks, the suppliers with their terms and where those terms came from, the plan's own money, and the levers.

This is merchandise cash on the terms clock and not a cash flow statement, which `state_sentence` says on the report itself. There is no payroll, tax, rent or facility in it.

The balance is walked on shipped cash. A retailer's committed order is the retailer's option, so `committed_in` is served on every week and is in no balance here.

Absence is a word in the cell rather than a zero. A week the sales ledger has no reading for reads `Not on file`, and it leaves every week after it unreadable, because a balance cannot be carried across a gap; `coverage.weeks_not_on_file` names those weeks. An organisation that has declared no opening balance or no cash floor reads `Not declared` and gets no walk at all.

Scope: `reports:read`.

## Query parameters

- `as_of` string

## Headers

- `Tightly-Version` string

## Response `200`

The cash from the buy report

## Other responses

- `400`: The day could not be read
- `401`: No usable key: malformed, unknown, revoked, expired or stopped. One refusal covers all five, telling a caller which is which maps the surface for them. A request with no Authorization header at all is refused 400 before any key is looked for.
- `403`: The key may not reach this operation. `plan_excludes` when Reports is sold with Pro and this organisation's plan does not include it; `scope_missing` when the key does not hold Reports; `organization_mismatch` when the path names an organisation that is not the key's; `ip_not_allowed` when the caller's address is outside the key's allowlist.
- `429`: The key has spent its allowance for this minute. 600 reads and 120 writes a minute, counted per key, refused calls included. `Retry-After` says how long to wait.
- `503`: The database is briefly out of reach, which is what a failover or a full connection pool looks like from outside. Wait the seconds `Retry-After` names and send the request again. A read is safe to repeat. A write is not, because the connection was lost in the middle of it, so read the object back before sending it a second time. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` from one of the two seams that raise this and `SERVICE_UNAVAILABLE` from the other.

---

[API](https://skmtc.dev/tightly/apis/tightly-api.md) · [All operations](https://skmtc.dev/tightly/apis/tightly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tightly/apis/tightly-api/revisions/199f7eb35afb?raw)
