---
title: "Generate cash flow forecast · Reports · Practice Manager API · COUNT Partner API"
description: "Forecasts the workspace's cash for the next 13 weeks, with optional what-if scenarios. POST /firm-partners/workspace/reports/cash-flow-forecast"
canonical: "https://developers.getcount.com/practice-manager/reference/reports/generate-cash-flow-forecast"
source: "https://developers.getcount.com/practice-manager/reference/reports/generate-cash-flow-forecast"
---
[Reports](https://developers.getcount.com/practice-manager/reference/reports) / Generate cash flow forecast

# Generate cash flow forecast

POST `/firm-partners/workspace/reports/cash-flow-forecast`

Forecasts the workspace's cash for the next 13 weeks, with optional what-if scenarios.

Starting cash is the bank and cash balance the dashboard shows. Each week carries `openingBalance`, `inflows` and `outflows` (totals by source), `closingBalance`, and `forecastLines` — the individual items, each with `isEstimate`. The report also returns `lowestBalance`, `atRisk`, `beyondHorizon`, and `assumptions`, which say what is left out. Send an empty body for the base forecast. With a `scenario`, `scenarioForecast` holds the forecast with the scenario applied; re-run with a different scenario rather than adjusting figures yourself. No query parameters are accepted, and the body is strict: an unknown key is a 400.

HMAC signature only

[Chart of Accounts API](https://developers.getcount.com/practice-manager/reference/chart-of-accounts) [Tags API](https://developers.getcount.com/practice-manager/reference/tags) [Workspace Stats API](https://developers.getcount.com/practice-manager/reference/workspace-stats) [Fixed Assets API](https://developers.getcount.com/practice-manager/reference/fixed-assets)

#### Headers

`count-workspace-id` uuid required

UUID of the client workspace to act on. It must be one of your firm's client workspaces (or the firm's own workspace) and within the API key's client workspaces.

#### Request body

`scenario` object

What-if changes to apply on top of the base forecast. Send any of the three lists.

`customerPaymentDelays` array

Move a customer's expected payments later (or earlier). At most 100.

`customerUuid` uuid required

Customer UUID.

`delayDays` integer required

Days to move the customer's payments, -365 to 365.

`billPaymentDelays` array

Pay a bill on a different date. At most 100.

`billUuid` uuid required

Bill UUID.

`newPaymentDate` date required

YYYY-MM-DD payment date.

`adjustments` array

Extra cash in or out that the books do not hold yet, e.g. a loan or a new hire. At most 50.

`description` string required

Label, 1–200 characters.

`amount` string required

Positive decimal string with at most two places, e.g. `"6000.00"`.

`direction` enum required

Cash in or cash out.

One of: `inflow`, `outflow`

`startDate` date required

YYYY-MM-DD date of the first occurrence.

`cadence` enum required

How often it repeats.

One of: `once`, `weekly`, `monthly`

#### Responses

`200` The forecast. Amounts are decimal strings in `currency`. `scenarioForecast` has the same shape as `forecast`, and is null when no scenario was sent. `weeks` holds 13 entries; one is shown here.

`400` The body has an unknown key, or a scenario value is invalid.

`401` Missing signing headers, an invalid HMAC signature, or a timestamp more than 5 minutes off. [Troubleshoot](https://developers.getcount.com/practice-manager/authentication#errors)

`403` The key is inactive or its scope does not allow this request, the workspace is not managed by your firm or is outside the key's client workspaces, the workspace has no active subscription, or it is portal-only and the route needs bookkeeping. [Troubleshoot](https://developers.getcount.com/practice-manager/authentication#errors)

`404` No workspace exists with the `count-workspace-id` UUID.

`429` Rate limit exceeded (100 requests per minute per firm user of each app, or 10,000 per minute per app). [Troubleshoot](https://developers.getcount.com/practice-manager/authentication#errors)

[Previous POST Generate account transactions report](https://developers.getcount.com/practice-manager/reference/reports/generate-account-transactions) [Next GET Get GST return](https://developers.getcount.com/practice-manager/reference/reports/get-gst-return)

POST `https://api.getcount.com/firm-partners/workspace/reports/cash-flow-forecast`

Request

```javascript
import crypto from 'node:crypto';

const BASE_URL = 'https://api.getcount.com';
const CLIENT_ID = process.env.COUNT_CLIENT_ID;
const CLIENT_SECRET = process.env.COUNT_CLIENT_SECRET;

const method = 'POST';
const signingPath = '/workspace/reports/cash-flow-forecast';
const timestamp = Math.floor(Date.now() / 1000).toString();
const body = {
  "scenario": {
    "customerPaymentDelays": [
      {
        "customerUuid": "dfa3219e-6af8-4c53-997a-037534f63a35",
        "delayDays": 30
      }
    ],
    "adjustments": [
      {
        "description": "New hire salary",
        "amount": "6000.00",
        "direction": "outflow",
        "startDate": "2026-04-01",
        "cadence": "monthly"
      }
    ]
  }
};
const bodyString = JSON.stringify(body);

const bodyHash = crypto.createHash('sha256').update(bodyString).digest('hex');
const baseString = `${method}:${signingPath}:${timestamp}:${bodyHash}`;
const signature = crypto.createHmac('sha256', CLIENT_SECRET).update(baseString).digest('hex');

const response = await fetch(`${BASE_URL}/firm-partners/workspace/reports/cash-flow-forecast`, {
  method,
  headers: {
    'x-client-id': CLIENT_ID,
    'x-timestamp': timestamp,
    'x-signature': signature,
    'Content-Type': 'application/json',
    'count-workspace-id': '5e4d3c2b-1a09-4f8e-8d7c-6b5a49382716',
  },
  body: bodyString,
});

console.log(await response.json());
```

Response · 200

```json
{
  "status": "success",
  "message": "Success on generating cash flow forecast",
  "data": {
    "currency": "USD",
    "asOf": "2026-03-02",
    "exchangeRateDate": "2026-03-02",
    "startingCash": {
      "amount": "48250.00"
    },
    "forecast": {
      "weeks": [
        {
          "weekStart": "2026-03-02",
          "weekEnd": "2026-03-08",
          "openingBalance": "48250.00",
          "inflows": {
            "invoices": "1250.00",
            "recurringInvoices": "0.00",
            "gst": "0.00",
            "adjustments": "0.00",
            "total": "1250.00"
          },
          "outflows": {
            "bills": "2500.00",
            "recurringSpend": "180.00",
            "payroll": "0.00",
            "gst": "0.00",
            "adjustments": "0.00",
            "total": "2680.00"
          },
          "closingBalance": "46820.00",
          "forecastLines": [
            {
              "type": "invoice",
              "direction": "inflow",
              "date": "2026-03-05",
              "amount": "1250.00",
              "description": "Acme Corporation — INV-1042",
              "reference": "f6a7b8c9-d0e1-2345-fabc-456789012345",
              "isEstimate": false
            }
          ]
        }
      ],
      "lowestBalance": {
        "weekStart": "2026-03-02",
        "amount": "46820.00"
      },
      "atRisk": {
        "amount": "0.00",
        "invoices": []
      },
      "beyondHorizon": {
        "inflows": "0.00",
        "outflows": "0.00"
      }
    },
    "scenarioForecast": null,
    "assumptions": [
      {
        "code": "credit_cards_excluded",
        "message": "Starting cash counts bank and cash accounts only; credit card balances are not included."
      }
    ]
  }
}
```
