Heron End User Calculations API

The EndUserCalculations API from Heron — 18 operation(s) for endusercalculations.

Business capability
Credit Underwriting & Decisioning Management BC-1320.20

Operations 18

GET /api/end_users/balance Get EndUser balance
GET /api/end_users/forecast Get EndUser forecasts
GET /api/end_users/statistics Get EndUser statistics
GET /api/end_users/{end_user_id_or_heron_id}/anomalies Get EndUser anomalies
GET /api/end_users/{end_user_id_or_heron_id}/bank_statement_summary Get EndUser bank statement summary
GET /api/end_users/{end_user_id_or_heron_id}/benchmarks Get EndUser metric benchmarks
GET /api/end_users/{end_user_id_or_heron_id}/debt_candidates Get EndUser debt candidates
GET /api/end_users/{end_user_id_or_heron_id}/export_spreadsheet Export as a spreadsheet
GET /api/end_users/{end_user_id_or_heron_id}/grouped_transactions_report Get EndUser transactions grouped by counterparty or merchant
GET /api/end_users/{end_user_id_or_heron_id}/heron_score Get EndUser Heron Score (beta)
GET /api/end_users/{end_user_id_or_heron_id}/merchant_summary Get EndUser merchant summary
GET /api/end_users/{end_user_id_or_heron_id}/named_dates Get EndUser named dates
GET /api/end_users/{end_user_id_or_heron_id}/profit_and_loss Get EndUser cashflow P&L
PUT /api/end_users/{end_user_id_or_heron_id}/profit_and_loss_layout Update EndUser P&L layout
GET /api/end_users/{end_user_id_or_heron_id}/recurring_transactions_report Get EndUser recurring transactions report
GET /api/end_users/{end_user_id_or_heron_id}/scorecard Get EndUser scorecard
POST /api/end_users/{end_user_id_or_heron_id}/scorecard/async Request EndUser scorecard
GET /api/end_users/{end_user_id_or_heron_id}/transaction_data_coverage Get EndUser transaction data coverage

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/heron-endusercalculations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

heron-endusercalculations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data End User Calculations API
  version: '2021-07-19'
servers:
- description: Production
  url: https://app.herondata.io
security:
- ApiKeyAuth:
  - key_XXX
tags:
- name: EndUserCalculations
paths:
  /api/end_users/balance:
    get:
      description: Get balance for given EndUser on a daily and account granularity
      parameters:
      - description: end_user_id for statistics; either end_user_id or end_user_heron_id is required
        in: query
        name: end_user_id
        required: false
        schema:
          example: your_end_user_id
          type:
          - string
          - 'null'
      - description: Heron-generated id for end user; either end_user_id or end_user_heron_id is required
        in: query
        name: end_user_heron_id
        required: false
        schema:
          example: eus_XsMoQMVt5wBnMZmnaAYy3v
          type:
          - string
          - 'null'
      - description: ISO 4217 currency code to convert to
        in: query
        name: to_currency
        required: false
        schema:
          enum:
          - GBP
          - USD
          - EUR
          - CAD
          - AUD
          - null
          example: USD
          type:
          - string
          - 'null'
      - description: Deprecated (use date_min instead). Filter for transactions with timestamp after the input value
        in: query
        name: timestamp_min
        required: false
        schema:
          example: '2026-08-14T12:24:38.244422'
          format: date-time
          type:
          - string
          - 'null'
      - description: Filter for transactions with timestamp after the input value (inclusive). It has precedence over timestamp_min
        in: query
        name: date_min
        required: false
        schema:
          example: '2026-08-14'
          format: date
          type:
          - string
          - 'null'
      - description: Deprecated (use date_max instead). Filter for transactions with timestamp earlier than the input value
        in: query
        name: timestamp_max
        required: false
        schema:
          example: '2026-08-13T12:24:38.244497'
          format: date-time
          type:
          - string
          - 'null'
      - description: Filter for transactions with date earlier than the input value (inclusive). It has precedence over timestamp_max
        in: query
        name: date_max
        required: false
        schema:
          example: '2026-08-13'
          format: date
          type:
          - string
          - 'null'
      - description: If true, forecasts the balances of each account
        in: query
        name: include_forecast
        required: false
        schema:
          default: false
          type: boolean
      - description: Filter by specific account reference IDs
        explode: true
        in: query
        name: account_ids
        required: false
        schema:
          default: []
          example:
          - '1234'
          - '5678'
          items:
            type: string
          type: array
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserBalanceOutputSchema'
          description: OK. Empty balances include a warning reason when no balance data is available.
        '404':
          description: EndUser not found or inaccessible
      security:
      - ApiKeyAuth: []
      summary: Get EndUser balance
      tags:
      - EndUserCalculations
  /api/end_users/forecast:
    get:
      description: Get forecast amounts for a given EndUser and category
      parameters:
      - description: end_user_id for statistics; either end_user_id or end_user_heron_id is required
        in: query
        name: end_user_id
        required: false
        schema:
          example: your_end_user_id
          type:
          - string
          - 'null'
      - description: Heron-generated id for end user; either end_user_id or end_user_heron_id is required
        in: query
        name: end_user_heron_id
        required: false
        schema:
          example: eus_XsMoQMVt5wBnMZmnaAYy3v
          type:
          - string
          - 'null'
      - description: ISO 4217 currency code to convert to
        in: query
        name: to_currency
        required: false
        schema:
          enum:
          - GBP
          - USD
          - EUR
          - CAD
          - AUD
          - null
          example: USD
          type:
          - string
          - 'null'
      - description: Aggregate results over time, i.e., aggregate by week or by month
        in: query
        name: date_granularity
        required: false
        schema:
          default: month
          enum:
          - week
          - month
          example: month
          type: string
      - description: Heron ID of category to be forecasted; either category_heron_id or category_label must be present
        in: query
        name: category_heron_id
        required: false
        schema:
          example: ctg_SX2NJfurA6YLH3ybRifPuD
          type: string
      - description: Label of category to be forecasted; either category_heron_id or category_label must be present
        in: query
        name: category_label
        required: false
        schema:
          example: Revenue
          type: string
      - description: The earliest transaction timestamp date to use in forecasting
        in: query
        name: from_date
        required: false
        schema:
          example: '2022-01-01'
          format: date
          type:
          - string
          - 'null'
      - description: The latest transaction timestamp date to use in forecasting
        in: query
        name: to_date
        required: false
        schema:
          example: '2022-01-31'
          format: date
          type:
          - string
          - 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/EndUserForecastOutputSchema'
                type: array
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser forecasts
      tags:
      - EndUserCalculations
  /api/end_users/statistics:
    get:
      description: Get summarized statistics for a given EndUser
      parameters:
      - description: end_user_id for statistics; either end_user_id or end_user_heron_id is required
        in: query
        name: end_user_id
        required: false
        schema:
          example: your_end_user_id
          type:
          - string
          - 'null'
      - description: Heron-generated id for end user; either end_user_id or end_user_heron_id is required
        in: query
        name: end_user_heron_id
        required: false
        schema:
          example: eus_XsMoQMVt5wBnMZmnaAYy3v
          type:
          - string
          - 'null'
      - description: ISO 4217 currency code to convert to
        in: query
        name: to_currency
        required: false
        schema:
          enum:
          - GBP
          - USD
          - EUR
          - CAD
          - AUD
          - null
          example: USD
          type:
          - string
          - 'null'
      - description: Filter for transactions with timestamp after the input value (as date)
        in: query
        name: from_date
        required: false
        schema:
          example: '2026-08-14'
          format: date
          type:
          - string
          - 'null'
      - description: Filter for transactions with timestamp before the input value (as date)
        in: query
        name: to_date
        required: false
        schema:
          example: '2026-08-13'
          format: date
          type:
          - string
          - 'null'
      - description: Aggregate results over time, e.g., by week or by quarter
        in: query
        name: date_granularity
        required: false
        schema:
          default: month
          enum:
          - day
          - week
          - month
          - quarter
          - year
          example: month
          type: string
      - description: Pivot results by merchant or by category
        in: query
        name: group_by
        required: false
        schema:
          default: category
          enum:
          - category
          - merchant
          example: category
          type: string
      - description: Filter by specific categories
        explode: true
        in: query
        name: category_heron_ids
        required: false
        schema:
          default: []
          example:
          - ctg_YodeQEhL98tvWeNCGbeQxu
          - ctg_6pfMRQGrRpErs9EQ2xVvUP
          items:
            type: string
          type: array
        style: form
      - description: Filter by specific merchants
        explode: true
        in: query
        name: merchant_heron_ids
        required: false
        schema:
          default: []
          example:
          - mrc_PFXgVK7KLCvKQiyaypxZuz
          - mrc_DbDnfPgb3qSMsrKBdFQMuh
          items:
            type: string
          type: array
        style: form
      - description: Filter by specific account reference IDs
        explode: true
        in: query
        name: account_ids
        required: false
        schema:
          default: []
          example:
          - '1234'
          - '5678'
          items:
            type: string
          type: array
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  statistics:
                    items:
                      $ref: '#/components/schemas/EndUserStatsOutputSchema'
                    type: array
                type: object
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser statistics
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/anomalies:
    get:
      description: Get anomalies for given EndUser given a category label or heron id
      parameters:
      - description: The `end_user_id` or `heron_id` of EndUser to upload
        in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      - description: Label or Heron ID of category to find anomalies for
        in: query
        name: category_label_or_heron_id
        required: true
        schema:
          example: Revenue
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AnomalySchema'
                type: array
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser anomalies
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/bank_statement_summary:
    get:
      description: Get the bank statement summary by month for an end user
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      - description: Determines how to group transactions. It supports calendar month (by_month) or rolling 30-day period (from last txns with rolling_30_days_from_last_txn or from today with rolling_30_days_from_today)
        in: query
        name: grouping
        required: false
        schema:
          default: by_month
          enum:
          - by_month
          - by_data_source_account_heron_id
          - rolling_30_days_from_last_txn
          - rolling_30_days_from_today
          - by_month_by_data_source_account_heron_id
          - by_month_by_account
          type: string
      - description: Number of full calendar months to show in the summary
        in: query
        name: num_full_calendar_months
        required: false
        schema:
          minimum: 1
          type:
          - integer
          - 'null'
      - description: Account ids to include in the summary, if not provided, all accounts are included
        explode: true
        in: query
        name: account_ids
        required: false
        schema:
          items:
            example: '1234'
            type: string
          type:
          - array
          - 'null'
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserBankStatementSummary'
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser bank statement summary
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/benchmarks:
    get:
      description: Get the benchmarks for each metric for an end user
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  benchmarks:
                    items:
                      $ref: '#/components/schemas/MetricBenchmarksSchema'
                    type: array
                type: object
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser metric benchmarks
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/debt_candidates:
    get:
      description: 'Identify potential debt candidates.

        '
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserMerchantSummary'
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser debt candidates
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/export_spreadsheet:
    get:
      description: 'Export a spreadsheet for an end user containing key metrics and reports

        '
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                format: binary
                type: string
          description: OK
        '400':
          description: No transaction data available for the end user
        '500':
          description: Spreadsheet generation failed
      security:
      - ApiKeyAuth: []
      summary: Export as a spreadsheet
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/grouped_transactions_report:
    get:
      description: Get a report of transactions grouped by merchant or counterparty for an end user
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/EndUserGroupedTransactionsReport'
                type: array
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser transactions grouped by counterparty or merchant
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/heron_score:
    get:
      description: Get Heron Score for end user with a breakdown of the feature group contributions which resulted in the score. The score is calculated for the day of last transaction. This is a beta feature and is subject to change.
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      - description: Minimum company categorisation confidence to calculate Heron Score
        in: query
        name: min_category_confidence
        required: false
        schema:
          example: 0.8
          type:
          - number
          - 'null'
      - description: Cut-off date to consider transactions to for calculating heron score (inclusive)
        in: query
        name: date
        required: false
        schema:
          example: '2023-01-19'
          format: date
          type:
          - string
          - 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeronScoreSchema'
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser Heron Score (beta)
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/merchant_summary:
    get:
      description: Get the summary of transactions by merchant for an end user for given categories or analytics groups
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      - explode: true
        in: query
        name: category_label_or_heron_id
        required: false
        schema:
          items:
            type: string
          minItems: 1
          type:
          - array
          - 'null'
        style: form
      - explode: true
        in: query
        name: analytics_group
        required: false
        schema:
          items:
            description: The category analytics group
            enum:
            - revenue
            - cost_of_goods_sold
            - operational_expenses
            - tax_expenses
            - intra_company
            - debt
            - equity
            - other_income
            - special_items
            - other
            - null
            example: debt
            type:
            - string
            - 'null'
          minItems: 1
          type:
          - array
          - 'null'
        style: form
      - description: Whether to group by counterparty transaction clusters
        in: query
        name: group_by_counterparty_txn_clusters
        required: false
        schema:
          default: false
          type: boolean
      - description: Account ids to include in the summary, if not provided, all accounts are included
        explode: true
        in: query
        name: account_ids
        required: false
        schema:
          items:
            example: '1234'
            type: string
          type:
          - array
          - 'null'
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserMerchantSummary'
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser merchant summary
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/named_dates:
    get:
      description: Get the named dates associated with an end user, e.g., date of last transaction
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  named_dates:
                    items:
                      $ref: '#/components/schemas/NamedDateSchema'
                    type: array
                type: object
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser named dates
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/profit_and_loss:
    get:
      description: 'Calculates the cashflow profit & loss table for an end user, based on the layout defined (if any)

        '
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      - description: The earliest transaction timestamp date to use
        in: query
        name: from_date
        required: false
        schema:
          example: '2022-01-01'
          format: date
          type:
          - string
          - 'null'
      - description: The latest transaction timestamp date to use
        in: query
        name: to_date
        required: false
        schema:
          example: '2022-01-31'
          format: date
          type:
          - string
          - 'null'
      - description: If true, dates are sorted left to right by ascending order. False by default, i.e., by default sorted in descending date order so more recent dates are first
        in: query
        name: dates_ascending
        required: false
        schema:
          default: false
          type: boolean
      - description: ISO 4217 currency code for balance
        in: query
        name: currency
        required: false
        schema:
          enum:
          - GBP
          - USD
          - EUR
          - CAD
          - AUD
          - null
          example: USD
          type:
          - string
          - 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfitAndLossSchema'
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser cashflow P&L
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/profit_and_loss_layout:
    put:
      description: 'Update the profit and loss layout for the end user, which determines how the profit and loss table is calculated

        '
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfitAndLossLayoutUpdateSchema'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfitAndLossLayoutSchema'
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Update EndUser P&L layout
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/recurring_transactions_report:
    get:
      description: Get a report of recurring transactions grouped by merchant or counterparty for an end user
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      - description: Account ids to include in the report, if not provided, all accounts are included
        explode: true
        in: query
        name: account_ids
        required: false
        schema:
          items:
            example: '1234'
            type: string
          type:
          - array
          - 'null'
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/EndUserRecurringTransactionsReport'
                type: array
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser recurring transactions report
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/scorecard:
    get:
      description: Get scorecard metrics and rule violations for a user
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      - description: Cut-off date to consider transactions to for calculating scorecard (inclusive)
        in: query
        name: date
        required: false
        schema:
          example: '2023-01-19'
          format: date
          type:
          - string
          - 'null'
      - description: Qualitative description for date to calculate scorecard
        in: query
        name: named_date
        required: false
        schema:
          enum:
          - end_user_created
          - end_user_last_updated
          - last_transaction
          - end_user_last_enriched
          - last_data_source_end_date_or_transaction_timestamp
          - custom_date
          - null
          example: end_user_created
          type:
          - string
          - 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  metrics:
                    items:
                      $ref: '#/components/schemas/Metric'
                    type: array
                  rule_violations:
                    items:
                      $ref: '#/components/schemas/RuleViolation'
                    type: array
                type: object
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser scorecard
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/scorecard/async:
    post:
      description: Request scorecard metrics for a date and end user
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      - description: Cut-off date to consider transactions to for calculating scorecard (inclusive)
        in: query
        name: date
        required: true
        schema:
          example: '2023-01-19'
          format: date
          type: string
      responses:
        '202':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                type: object
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Request EndUser scorecard
      tags:
      - EndUserCalculations
  /api/end_users/{end_user_id_or_heron_id}/transaction_data_coverage:
    get:
      description: Information about dates covered by any transaction data source
      parameters:
      - in: path
        name: end_user_id_or_heron_id
        required: true
        schema:
          type: string
      - in: query
        name: start_date
        required: true
        schema:
          format: date
          type: string
      - in: query
        name: end_date
        required: true
        schema:
          format: date
          type: string
      - in: query
        name: include_disabled_data_sources
        required: false
        schema:
          default: true
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserTransactionDataCoverageSchema'
          description: OK
      security:
      - ApiKeyAuth: []
      summary: Get EndUser transaction data coverage
      tags:
      - EndUserCalculations
components:
  schemas:
    ProfitAndLossLayoutUpdateSchema:
      properties:
        category_labels:
          description: List of category labels to assign to a different section
          example:
          - Postage
          items:
            type: string
          minItems: 1
          type: array
        section_slug:
          description: Slug of section to assign labels to
          example: operational_expenses
          type: string
      required:
      - category_labels
      - section_slug
      type: object
    MerchantCategory:
      properties:
        code:
          example: '7311'
          readOnly: true
          type: string
        description:
          example: Advertising services
          readOnly: true
          type:
          - string
          - 'null'
        slug:
          example: advertising_services
          readOnly: true
          type:
          - string
          - 'null'
      required:
      - code
      type: object
    DataSourceAccountReconciliationMetric:
      properties:
        category_label:
          type: string
        metric:
          enum:
          - num_txns
          - num_inflow_txns
          - num_outflow_txns
          - num_txns_with_balance
          - num_txns_with_negative_balance
          - num_overdraft_fee_units
          - num_nsf_fee_units
          - num_ambiguous_od_nsf_fee_units
          - amount__sum
          - amount_inflow__sum
          - amount_outflow__sum
          - amount_inflow__max
          - amount_outflow__max
          - amount_inflow__min
          - amount_outflow__min
          - amount_inflow_squared__sum
          - amount_outflow_squared__sum
          - confidence_x_amount_inflow__sum
          - confidence_x_amount_outflow__sum
        value:
          $ref: '#/components/schemas/Money'
      required:
      - category_label
      - metric
      - value
      type: object
    PnlSection:
      properties:
        metrics:
          description: Ordered list of P&L metrics
          items:
            $ref: '#/components/schemas/PnlMetric'
          type: array
        name:
          description: Name of P&L section, e.g,. Operating Expenses
          type: string
        slug:
          description: Slugified version of the name
          type: string
      type: object
    RuleViolation:
      properties:
        metric:
          $ref: '#/components/schemas/Metric'
        rule:
          $ref: '#/components/schemas/Rule'
      type: object
    GroupedTransaction:
      properties:
        amount:
          $ref: '#/components/schemas/Money'
        category:
          $ref: '#/components/schemas/GroupedTransactionsCategory'
        description:
          type: string
        heron_id:
          type: string
        timestamp:
          format: date-time
          type: string
      type: object
    AccountBalance:
      properties:
        closing_amount:
          allOf:
          - $ref: '#/components/schemas/Money'
          description: The closing balance for the day
          example: 25000.45
        currency:
          description: Currency of the balance
          example: USD
          type: string
        date:
          description: Date of the balance
          example: '2022-01-01'
          format: date
          type: string
      required:
      - closing_amount
      type: object
    BankStatementSummaryRow:
      properties:
        actual_holdback_percentage:
          description: Actual MCA payments to revenue as % (raw repayment amounts)
          type:
          - number
          - 'null'
        additional_no_od:
          description: Overdraft-item count a bank reports as a statement value for items absent from the transaction list. These items are not included in the transaction-derived no_od field. Null when the statement does not report a count.
          type:
          - integer
          - 'null'
        average_balance:
          allOf:
          - $ref: '#/components/schemas/Money'
          description: Average balance
        average_balance_to_revenue_ratio:
          description: Average balance divided by total revenue
          type: number
        business_day_average_balance:
          allOf:
          - $ref: '#/components/schemas/Money'
          description: Average balance over weekdays excluding public holidays
        dd_reversals:
          description: Number of DD Reversals
          type: integer
        ending_balance:
          allOf:
          - $ref: '#/components/schemas/Money'
          description: Ending balance
        expected_mca_debits:
          allOf:
          - $ref: '#/components/schemas/Money'
          description: Expected MCA debits amount
        holdback_percentage:
          description: Expected MCA payments to revenue as % (with frequency multiplier)
          type:
          - number
          - 'null'
        is_mtd:
          description: Whether this row represents a month-to-date (MTD) partial statement
          type: boolean
        is_unreconcilable:
          description: True when the statement period has no usable balance data for reconciliation (e.g. an unreconciled partial-month statement)
          type:
          - boolean
          - 'null'
        low_balance_days:
          description: Number of days where end of day balance falls below low balance threshold
          type: integer
        mca_credits:
        

# --- truncated at 32 KB (79 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/heron/refs/heads/main/openapi/heron-endusercalculations-api-openapi.yml