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

# Generate cash flow forecast

POST `/partners/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 + Bearer access token

[Try this request](https://developers.getcount.com/tools/try-it?method=POST&path=%2Fpartners%2Freports%2Fcash-flow-forecast&body=%7B%0A++%22scenario%22%3A+%7B%0A++++%22customerPaymentDelays%22%3A+%5B%0A++++++%7B%0A++++++++%22customerUuid%22%3A+%22dfa3219e-6af8-4c53-997a-037534f63a35%22%2C%0A++++++++%22delayDays%22%3A+30%0A++++++%7D%0A++++%5D%2C%0A++++%22adjustments%22%3A+%5B%0A++++++%7B%0A++++++++%22description%22%3A+%22New+hire+salary%22%2C%0A++++++++%22amount%22%3A+%226000.00%22%2C%0A++++++++%22direction%22%3A+%22outflow%22%2C%0A++++++++%22startDate%22%3A+%222026-04-01%22%2C%0A++++++++%22cadence%22%3A+%22monthly%22%0A++++++%7D%0A++++%5D%0A++%7D%0A%7D)

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

#### 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 or invalid HMAC signature, expired timestamp, or invalid Bearer token. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-401)

`403` The credential does not have access to this workspace or resource. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-403)

`429` Rate limit exceeded (100 requests per minute per user of each app, or 10,000 per minute per app). Retry after the Retry-After header. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-429)

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

POST `https://api.getcount.com/partners/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 ACCESS_TOKEN = process.env.COUNT_ACCESS_TOKEN;

const method = 'POST';
const signingPath = '/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}/partners/reports/cash-flow-forecast`, {
  method,
  headers: {
    'x-client-id': CLIENT_ID,
    'x-timestamp': timestamp,
    'x-signature': signature,
    'Content-Type': 'application/json',
    Authorization: `Bearer ${ACCESS_TOKEN}`,
  },
  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."
      }
    ]
  }
}
```
