Get Weekly Headroom
GET/api/cash-buying/headroom
Weekly spendable-cash strip.
purchase-orders:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Per week: capacity = cash on hand + available credit − that week's reserve (the highest dated reserve override covering the week, else the base reserve floor); payables = supplier payments scheduled that week (overdue payments count in week 1); spendable = capacity − cumulative payables (+ cumulative estimated payouts when inflows are enabled); headroom = the lowest spendable from that week on — what you can commit in that week without breaching any later week. binding_week is the tightest week. Undated payables are reported in unscheduled_payables and, by default, come off week 1.
Only a confirmed cash position is used. stale is true when an accounting balance is older than 24 hours.
Balance inputs (cash_on_hand, credit_line_limit, credit_line_drawn, available_credit, reserve_floor, snapshot_id, reserve_periods, and each week's capacity, spendable, spendable_after, reserve and reserve_label) are only present for users holding the cash_buying.view_balances permission. Without it these keys are omitted entirely (not null), because capacity together with the reserve or credit figures would reveal the bank balance, and per-week capacity changes would reveal the reserve schedule. Without it each week keeps week_start, payables, inflows, headroom and headroom_after; the top-level capacity, binding_week and binding_spendable stay.
Permission: cash_buying.index. Token scope: purchase-orders:read.
Request
Responses
- 200
- 401
- 403
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.