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

# Search income reports

Get business income as a time series over the requested period.

The results can be filtered. See the request body for the full list of filters.

:::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/income/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 income 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.
  - `filter.currency` (array of string, optional)
      Restricts the analytics to transactions in the given currencies.
  - `filter.transaction_type` (array of string, optional)
      Restricts the analytics to transactions of the given types.

## Returns

### 200

Income report for the requested period

#### Response attributes

- `total` (object)
    The total income for the whole requested period.
    Equals the sum of all data point totals.
    Expressed in the business's base currency.
  - `total.amount` (string)
      The monetary amount as a decimal string.
  - `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`.
- `data_points` (array of object)
    Data points for the requested aggregation cycle.
  - `data_points[].from` (string)
      The start date of this data point (inclusive). Interpreted in the business's timezone.
  - `data_points[].to` (string)
      The end date of this data point (exclusive). Interpreted in the business's timezone.
  - `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.
    - `data_points[].total.amount` (string)
        The monetary amount as a decimal string.
    - `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. |
