> ## Documentation Index
> Fetch the complete documentation index at: https://docs.herondata.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get EndUser bank statement summary

> Get the bank statement summary by month for an end user



## OpenAPI

````yaml https://app.herondata.io/swagger get /api/end_users/{end_user_id_or_heron_id}/bank_statement_summary
openapi: 3.0.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data API
  version: '2021-07-19'
servers:
  - description: Production
    url: https://app.herondata.io
security:
  - ApiKeyAuth:
      - key_XXX
externalDocs:
  description: Read Tutorial
  url: https://docs.herondata.io/
paths:
  /api/end_users/{end_user_id_or_heron_id}/bank_statement_summary:
    get:
      tags:
        - EndUserCalculations
      summary: Get EndUser bank statement summary
      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
            type: string
        - description: Number of full calendar months to show in the summary
          in: query
          name: num_full_calendar_months
          required: false
          schema:
            default: null
            minimum: 1
            nullable: true
            type: integer
        - 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:
            default: null
            items:
              example: '1234'
              type: string
            nullable: true
            type: array
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserBankStatementSummary'
          description: OK
      security:
        - ApiKeyAuth: []
components:
  schemas:
    EndUserBankStatementSummary:
      properties:
        average:
          $ref: '#/components/schemas/BankStatementSummaryRow'
        by_data_source_account_heron_id:
          additionalProperties:
            allOf:
              - $ref: '#/components/schemas/BankStatementSummaryRow'
            nullable: true
          description: >-
            Summary of bank statement by data source account. Keys are heron ids
            of the data source account
          type: object
        by_month:
          additionalProperties:
            allOf:
              - $ref: '#/components/schemas/BankStatementSummaryRow'
            nullable: true
          description: >-
            Summary of bank statement by month (only populated when grouping is
            calendar_month))
          type: object
        by_month_by_data_source_account_heron_id:
          additionalProperties:
            additionalProperties:
              allOf:
                - $ref: '#/components/schemas/BankStatementSummaryRow'
              nullable: true
            type: object
          description: >-
            Summary of bank statement by month and data source account. Keys are
            the start date of the month and heron ids of the data source account
          type: object
        grouping:
          description: >-
            Describes how the report was grouped. It supports either by calendar
            month or rolling 30-day period
          readOnly: true
          type: string
        rolling_30_days_from_last_txn:
          additionalProperties:
            allOf:
              - $ref: '#/components/schemas/BankStatementSummaryRow'
            nullable: true
          description: >-
            Summary of bank statement by rolling 30 days (only populated when
            grouping is rolling_30_days). Keys are the start date of the 30-day
            period using latest transaction date date as the end date
          type: object
        rolling_30_days_from_today:
          additionalProperties:
            allOf:
              - $ref: '#/components/schemas/BankStatementSummaryRow'
            nullable: true
          description: >-
            Summary of bank statement by rolling 30 days (only populated when
            grouping is rolling_30_days_from_today). Keys are the start date of
            the 30-day period using today as the end date
          type: object
        total:
          $ref: '#/components/schemas/BankStatementSummaryRow'
      required:
        - grouping
      type: object
    BankStatementSummaryRow:
      properties:
        actual_holdback_percentage:
          description: Actual MCA payments to revenue as % (raw repayment amounts)
          nullable: true
          type: number
        additional_no_od:
          description: >-
            Overdraft-item count a bank reports as a statement value (extracted
            from the statement), separate from the transaction-derived no_od
            above. Surfaced for banks (e.g. Chase Premium Business) that report
            overdrafts outside the transaction list. Null when the statement
            reports none.
          nullable: true
          type: integer
        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
          nullable: true
        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)
          nullable: true
          type: number
        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)
          nullable: true
          type: boolean
        low_balance_days:
          description: >-
            Number of days where end of day balance falls below low balance
            threshold
          type: integer
        mca_credits:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: MCA credits amount
        mca_debits:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: MCA debits amount
        negative_balance_days:
          description: Number of days with negative balance
          type: integer
        no_deposits:
          description: Number of deposit transactions
          type: integer
        no_mca_credits:
          description: Number of MCA credit transactions
          type: integer
        no_mca_debits:
          description: Number of MCA debit transactions
          type: integer
        no_nsf:
          description: Number of NSF transactions (unambiguous NSF-only category labels).
          type: integer
        no_od:
          description: >-
            Number of overdraft transactions (unambiguous OD-only category
            labels).
          type: integer
        no_od_nsf:
          description: >-
            Number of overdraft or NSF transactions across all matching category
            labels
          type: integer
        no_overdraft_transactions:
          description: Number of transactions where the resulting balance falls below 0
          type: integer
        no_revenue:
          description: Number of revenue transactions
          type: integer
        no_withdrawals:
          description: Number of withdrawals transactions
          type: integer
        non_revenue:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Non-revenue amount
        period_end_date:
          description: >-
            The last day covered by the statement period (e.g. a partial April
            statement covering Apr 1–15 has period_end_date=Apr 15, while a full
            April statement with data only through Apr 15 would still show Apr
            30)
          format: date
          nullable: true
          type: string
        period_start_date:
          description: >-
            The first day covered by the statement period (e.g. a partial April
            statement covering Apr 5–15 has period_start_date=Apr 5)
          format: date
          nullable: true
          type: string
        starting_balance:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Starting balance for the period
        total_deposits:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Total deposit amount
        total_revenue:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Total revenue amount
        total_withdrawals:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Total withdrawal amount
      type: object
    Money:
      properties:
        amount:
          description: The amount of money
          example: '1234.56'
          type: number
        currency:
          description: The currency of the money
          example: USD
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````