ForecastBalanceTimeSeries
Use this when the user asks where the bank balance is heading: the actual balance up to the cutover, then a projection built from planned transactions.
Authentication
Authorization<token>A SaaSFlow API key (format sf_…) or an OAuth bearer token. Paste only the key — the proxy adds the Bearer prefix. Create an API key in Settings → Company settings → API keys — see API keys.
companyId*string1 <= lengthapplication/json- body
startDate*stringStart of the window (YYYY-MM-DD). Defaults to the batch context start date.
^\d{4}-\d{2}-\d{2}endDate*stringEnd of the window (YYYY-MM-DD). Typically a future date so the forecast extends past today.
^\d{4}-\d{2}-\d{2}accountIds?array<string>Restrict to these account ids. Omit to include all accounts.
asOfDate?stringCutover between the actual and the projected balance (YYYY-MM-DD). Dates on or before asOfDate come from actual balances; the projection starts there and runs to endDate. Defaults to today.
^\d{4}-\d{2}-\d{2}forecastBalanceTimeSeries result
application/json- response
Daily account balance, split into actual (dates on or before asOfDate) and projected (asOfDate to endDate). The projection carries the last actual balance forward and applies planned-transaction occurrences as they fall due, so the two series join at asOfDate. It has a point only on days something is planned, plus the join and end anchors; read it as a line, not a dense daily series. Empty when endDate is not in the future or nothing is planned.
actual*array<>forecast*array<>curl -X POST 'https://api.saasflow.com/companies/string/data/forecastBalanceTimeSeries' \ -H 'Content-Type: application/json' \ -d '{ "startDate": "string", "endDate": "string"}'{ "actual": [ { "date": "string", "value": 0 } ], "forecast": [ { "date": "string", "value": 0 } ]}