---
api: 'Business API'
---

# Search cashflow reports

Get business cashflow over the requested period as income and spending time series, together with the period totals.

The results can be filtered by accounts.

:::info
The Analytics endpoints are read-only.
The search requests are safe to retry and do not require an `Idempotency-Key`.
:::

For more information, see the guide: [Analytics](https://developer.revolut.com/docs/guides/manage-accounts/analytics).

### Required API key permissions
To call this endpoint, your API key must have the following permissions (scopes):

| Product | Resource | Permission | Mapped scope |
|---------|----------|-------------|--------------|
| **Analytics** | Analytics | Read | `analytics:read` |

For more information, see: [Authentication](https://developer.revolut.com/docs/api/business#authentication).

## Endpoint

POST `/analytics/cashflow/search`

## Request body

### Attributes

- `from` (string)
    The start date of the reporting period (inclusive).
    Interpreted in the business's timezone.
    Cannot be in the future.
- `to` (string)
    The end date of the reporting period (exclusive).
    Interpreted in the business's timezone.
    Must be 1-365 days after `from`.
    Cannot be in the future.
    For example, to cover all of January 2025, set the dates as follows: `from` -> `2025-01-01`, `to` -> `2025-02-01`.
- `aggregation_cycle` (enum)
    The length of the interval that each returned data point covers, for example `month` returns one data point per month in the requested period.
    Possible enum values:

    - `day`
    - `week`
    - `month`
    - `quarter`
    - `year`
- `filter` (object, optional)
    Filters for the cashflow report.
  - `filter.account_id` (array of string, optional)
      Restricts the analytics to transactions on the given accounts. If not provided, the analytics cover all accounts of the business.

## Returns

### 200

Cashflow report for the requested period

#### Response attributes

- `summary` (object)
    The period totals of a cashflow report.
  - `summary.total` (object)
      The net cashflow, calculated as income minus spending.
      Expressed in the business's base currency.
    - `summary.total.amount` (string)
        The monetary amount as a decimal string.
    - `summary.total.currency` (string)
        The currency of the amount, provided as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code or a standard cryptocurrency code such as `BTC` or `ETH`.
  - `summary.total_income` (object)
      The total income for the requested period.
      Expressed in the business's base currency.
    - `summary.total_income.amount` (string)
        The monetary amount as a decimal string.
    - `summary.total_income.currency` (string)
        The currency of the amount, provided as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code or a standard cryptocurrency code such as `BTC` or `ETH`.
  - `summary.total_spent` (object)
      The total spending for the requested period.
      Expressed in the business's base currency.
    - `summary.total_spent.amount` (string)
        The monetary amount as a decimal string.
    - `summary.total_spent.currency` (string)
        The currency of the amount, provided as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code or a standard cryptocurrency code such as `BTC` or `ETH`.
- `income` (object)
    The income time series.
  - `income.data_points` (array of object)
      Data points for the requested aggregation cycle.
    - `income.data_points[].from` (string)
        The start date of this data point (inclusive). Interpreted in the business's timezone.
    - `income.data_points[].to` (string)
        The end date of this data point (exclusive). Interpreted in the business's timezone.
    - `income.data_points[].total` (object)
        The total for this data point's interval, i.e. the sum of the transactions in this interval.
        Expressed in the business's base currency.
      - `income.data_points[].total.amount` (string)
          The monetary amount as a decimal string.
      - `income.data_points[].total.currency` (string)
          The currency of the amount, provided as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code or a standard cryptocurrency code such as `BTC` or `ETH`.
- `spent` (object)
    The spending time series.
  - `spent.data_points` (array of object)
      Data points for the requested aggregation cycle.
    - `spent.data_points[].from` (string)
        The start date of this data point (inclusive). Interpreted in the business's timezone.
    - `spent.data_points[].to` (string)
        The end date of this data point (exclusive). Interpreted in the business's timezone.
    - `spent.data_points[].total` (object)
        The total for this data point's interval, i.e. the sum of the transactions in this interval.
        Expressed in the business's base currency.
      - `spent.data_points[].total.amount` (string)
          The monetary amount as a decimal string.
      - `spent.data_points[].total.currency` (string)
          The currency of the amount, provided as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code or a standard cryptocurrency code such as `BTC` or `ETH`.

## Error responses

| HTTP status code | Description |
| --- | --- |
| 400 | Bad Request  Returned when the request contains invalid fields or a date range that is empty, reversed, or includes future dates. |
| 401 | Unauthorized – authentication credentials are missing or invalid  Returned when the request was not fulfilled because authentication has failed or has not been provided. |
| 403 | Forbidden  Returned when your API key is missing the required `analytics:read` permission. |
| 422 | Unprocessable entity  Returned when the Analytics capability is not enabled for your business.  For more information, see the guide: [Analytics](https://developer.revolut.com/docs/guides/manage-accounts/analytics). |
| 429 | Too many requests  Returned when the request rate limit has been exceeded. The response includes a `Retry-After` header: check it for the number of seconds to wait, and retry only after that time has passed - not earlier. |
