Skip to main content
GET
Summarise cash flow

Authorizations

Authorization
string
header
required

A workspace API key created in ThinkOut settings. One key reads one workspace.

Query Parameters

period
enum<string>

A named window, resolved against the workspace's local day and echoed in the response. Takes precedence over from and to. A named window resolved on the server. last_30_days and last_90_days end today and include it; last_12_months starts the day after today minus twelve months. next_month, next_quarter and next_year cover the whole next calendar month, quarter or year.

Available options:
this_month,
last_month,
this_quarter,
last_quarter,
this_year,
last_year,
month_to_date,
quarter_to_date,
year_to_date,
last_30_days,
last_90_days,
last_12_months,
next_month,
next_quarter,
next_year
from
string<date>

First day of the window, inclusive. Required with to unless period is given.

to
string<date>

Last day of the window, inclusive. Required with from unless period is given.

interval
enum<string>
default:month

The period bucket rows are grouped into. A period bucket for report rows.

Available options:
day,
week,
month
group_by
enum<string>

A second dimension to group by, alongside the period bucket. Omit it for one row per period. A dimension to group cash flow rows by, alongside the period bucket. There is no account, because forecasts have none.

Available options:
category,
counterparty,
label,
activity,
direction
currency
string

Currency to report in. Defaults to the workspace currency. An unknown code is rejected. ISO 4217 alphabetic currency code.

Pattern: ^[A-Z]{3}$
Example:

"RON"

bank_id
string<uuid>[]

Only rows on the accounts fed by these bank connections. Comma-separated for several.

account_id
string<uuid>[]

Only rows on these accounts. Comma-separated for several.

category_id
string<uuid>[]

Only rows in these categories. Comma-separated for several. On /transactions this also matches a split transaction whose pieces are in one of them. Subcategories are included only on the summaries.

label_id
string<uuid>[]

Only rows carrying at least one of these labels. Comma-separated for several.

counterparty_id
string<uuid>[]

Only rows attributed to these counterparties. Comma-separated for several.

direction
enum<string>

Whether money comes in or goes out. On a transaction or forecast it follows the sign of amount.

Available options:
inflow,
outflow
activity
enum<string>[]

Only rows whose category sits in these cash flow statement sections. Comma-separated for several.

Cash flow statement section the category belongs to.

Available options:
operating,
investing,
financing
include_overdue
boolean
default:false

Whether overdue forecasts, those dated before today and still unrealised, count in the rows of the periods they fall in. Off, they only appear in totals.overdue_inflow and totals.overdue_outflow.

Response

The summary.

object
string
required
Allowed value: "cash_flow_summary"
period
object
required

The window actually computed.

conversion
object
required

What was done to make amounts comparable.

group_by
enum<string> | null
required

A dimension to group cash flow rows by, alongside the period bucket. There is no account, because forecasts have none.

Available options:
category,
counterparty,
label,
activity,
direction
bank_ids
string<uuid>[]
required

The bank_id filter echoed, empty when none was given.

account_ids
string<uuid>[]
required

The account_id filter echoed, empty when none was given.

forecast_scope
string
required

What the forecast half and the overdue totals cover. Always the whole workspace: a forecast has no account, so bank_ids and account_ids narrow only the actual half and the balances.

Allowed value: "workspace"
include_overdue
boolean
required

Whether overdue forecasts counted in the rows, as requested.

has_data
boolean
required

false when no transaction and no forecast matched.

totals
object
required

The whole window added up, over the same transactions and forecasts as the rows.

data
object[]
required