---
title: "Get Cash Flow"
method: GET
path: "/insights/v3/cashflow-patterns"
tags: ["Cashflow Patterns (NEW)"]
---

# Get Cash Flow

`GET /insights/v3/cashflow-patterns`

## Request

- Base URL: `https://sandbox.leantech.me`
- URL: `https://sandbox.leantech.me/insights/v3/cashflow-patterns`
- Auth: HTTP bearer

Detects recurring inflow and outflow transactions and groups them into structured patterns, surfacing frequency, 
expected timing, and whether each pattern is ongoing, new, or stopped.

## Query parameters

- `entity_id` string, uuid, required
- `start_date` string, date
- `end_date` string, date

## Response `200`

OK

- object
  - `status` 'OK' | 'PENDING' | 'FAILED' | 'CONSENT_EXPIRED' | 'RECONNECT_REQUIRED' | 'PROCESSING_STARTED', required: The status of the request
  - `results_id` string, uuid, required: The unique identifier for the request
  - `message` string, required: A message describing the status of the request
  - `meta` object, nullable: Meta information about the request
  - `timestamp` string, date-time, required: The datetime of when the request was made
  - `status_detail` StatusDetail, nullable
    - `granular_status_code` string, nullable: Granular status code
    - `status_additional_info` string, nullable: Additional information about the status
  - `insights` CashflowPatterns: Cashflow pattern analysis results.
    - `cashflow_patterns` CashflowPattern[], required: List of identified cashflow patterns.
      - `credit_debit_indicator` 'CREDIT' | 'DEBIT', required: Indicates whether the cashflow pattern is a credit or debit.
      - `primary_category` string, required: The primary category of the cashflow pattern.
      - `secondary_category` string, required: The secondary category of the cashflow pattern.
      - `counter_party` string, required: The merchant, employer, sender, or receiver associated with the cashflow pattern.
      - `total_amount` CurrencyAmount, required
        - `currency` string, required: The ISO 3 letter currency code
        - `amount` number, required: The amount of money in the currency specified.
      - `transaction_count` integer, required: The total number of transactions over the analysis period.
      - `monthly_totals` CashFlowPatternMonthlyTotal[], required: Monthly breakdown over the analysis period.
        - `month` string, required: The month in YYYY-MM format.
        - `amount` CurrencyAmount, required
          - `currency` string, required: The ISO 3 letter currency code
          - `amount` number, required: The amount of money in the currency specified.
        - `transaction_count` integer, required: The number of transactions in this month.
      - `regularity` CashflowRegularity, required
        - `days_of_month_numbers` integer[], required: The day(s) of the month when the transaction typically occurs.
        - `days_of_month_names` string[], required: The day name(s) of the week (e.g. Sunday, Monday) on which the transaction typically occurs.
        - `interval` CashflowInterval, required
          - `minimum_days` integer, required: The minimum number of days between transactions.
          - `maximum_days` integer, required: The maximum number of days between transactions.
        - `average_interval_days` number, required: The average number of days between transactions.
        - `frequency` 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'ANNUALLY', required: The frequency of the cashflow pattern.
        - `activity_status` 'STARTED_AND_ONGOING' | 'STARTED_AND_STOPPED' | 'STOPPED' | 'ONGOING', required: The lifecycle status of the cashflow pattern within the analysis window: `STARTED_AND_ONGOING` — the pattern first appeared inside the window and is still active; `STARTED_AND_STOPPED` — the pattern both started and stopped within the window; `STOPPED` — the pattern predates the window and has since stopped; `ONGOING` — the pattern predates the window and is still active.
  - `type` 'income' | 'employment' | 'cashflow' | 'credits-obligations' | 'non-credits-obligations' | 'expenses' | 'cash-balances' | 'freelancer-cashflow' | 'cashflow-patterns' | 'credit-assessments' | 'account-controls' | 'credit-obligations' | 'spending': type of insight

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `408`: Request Timeout
- `500`: Internal Server Error

---

[API](https://skmtc.dev/leantech/apis/insights-api-account-controls.md) - [All operations](https://skmtc.dev/leantech/apis/insights-api-account-controls/llms.txt) - [OpenAPI document](https://skmtc.dev/leantech/apis/insights-api-account-controls/revisions/6a904c24f1e4?raw)
