> ## 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 merchant summary

> Get the summary of transactions by merchant for an end user for given categories or analytics groups



## OpenAPI

````yaml https://app.herondata.io/swagger get /api/end_users/{end_user_id_or_heron_id}/merchant_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}/merchant_summary:
    get:
      tags:
        - EndUserCalculations
      summary: Get EndUser merchant summary
      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
            nullable: true
            type: array
          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
              nullable: true
              type: string
            minItems: 1
            nullable: true
            type: array
          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:
            default: null
            items:
              example: '1234'
              type: string
            nullable: true
            type: array
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserMerchantSummary'
          description: OK
      security:
        - ApiKeyAuth: []
components:
  schemas:
    EndUserMerchantSummary:
      properties:
        by_merchant_summary:
          items:
            $ref: '#/components/schemas/MerchantSummaryRow'
          type: array
      type: object
    MerchantSummaryRow:
      properties:
        group:
          nullable: true
          type: string
        heron_id:
          type: string
        inflow_metrics:
          $ref: '#/components/schemas/MerchantSummaryRowMetrics'
        name:
          type: string
        net_metrics:
          $ref: '#/components/schemas/MerchantSummaryRowMetrics'
        outflow_metrics:
          $ref: '#/components/schemas/MerchantSummaryRowMetrics'
        transactions:
          items:
            $ref: '#/components/schemas/GroupedTransaction'
          type: array
      type: object
    MerchantSummaryRowMetrics:
      properties:
        amount:
          $ref: '#/components/schemas/Money'
        changed_in_last_90_days:
          type: boolean
        count:
          type: integer
        duration_days:
          type: integer
        estimated_monthly_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        frequency:
          enum:
            - not_enough_data
            - same_day
            - irregular
            - daily
            - weekly
            - biweekly
            - monthly
            - quarterly
            - annually
            - weekday
            - twice_weekly
            - null
          nullable: true
          type: string
        is_active:
          type: boolean
        max_amount:
          $ref: '#/components/schemas/Money'
        max_timestamp:
          format: date-time
          type: string
        mean_amount:
          $ref: '#/components/schemas/Money'
        mean_interval_days:
          nullable: true
          type: number
        median_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Deprecated. This field is no longer being populated
          nullable: true
        min_amount:
          $ref: '#/components/schemas/Money'
        min_timestamp:
          format: date-time
          type: string
        mode_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Deprecated. This field is no longer being populated
          nullable: true
        mode_interval_days:
          nullable: true
          type: integer
        std_dev_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
      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

````