> ## 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 transactions grouped by counterparty or merchant

> Get a report of transactions grouped by merchant or counterparty for an end user



## OpenAPI

````yaml https://app.herondata.io/swagger get /api/end_users/{end_user_id_or_heron_id}/grouped_transactions_report
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}/grouped_transactions_report:
    get:
      tags:
        - EndUserCalculations
      summary: Get EndUser transactions grouped by counterparty or merchant
      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: []
components:
  schemas:
    EndUserGroupedTransactionsReport:
      properties:
        counterparty:
          type: string
        merchant:
          $ref: '#/components/schemas/GroupedTransactionMerchant'
        transaction_groups:
          items:
            $ref: '#/components/schemas/EndUserTransactionGroup'
          type: array
      type: object
    GroupedTransactionMerchant:
      properties:
        categories:
          items:
            $ref: '#/components/schemas/MerchantCategory'
          readOnly: true
          type: array
        group_id:
          enum:
            - Uber
            - Google
            - Intuit
            - debt.mca_or_rbf
            - debt.non_bank_business
            - debt.equipment_and_auto_leasing
            - debt.mortgage
            - debt.personal_non_mortgage
            - debt.collections
            - debt.bank
            - invoice_factoring
            - fuel_provider
            - gambling_and_betting
            - null
          nullable: true
          type: string
        heron_id:
          example: mrc_LwLGjsNcxuKSz5zCZcBvi7
          readOnly: true
          type: string
        icon_url:
          format: url
          readOnly: true
          type: string
        logo_url:
          format: url
          readOnly: true
          type: string
        name:
          type: string
      type: object
    EndUserTransactionGroup:
      properties:
        frequency:
          enum:
            - not_enough_data
            - same_day
            - irregular
            - daily
            - weekly
            - biweekly
            - monthly
            - quarterly
            - annually
            - weekday
            - twice_weekly
          type: string
        transactions:
          items:
            $ref: '#/components/schemas/GroupedTransaction'
          type: array
      type: object
    MerchantCategory:
      properties:
        code:
          example: '7311'
          readOnly: true
          type: string
        description:
          example: Advertising services
          nullable: true
          readOnly: true
          type: string
        slug:
          example: advertising_services
          nullable: true
          readOnly: true
          type: string
      required:
        - code
      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
    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
    GroupedTransactionsCategory:
      properties:
        heron_id:
          type: string
        label:
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````