> ## 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 debt candidates

> Identify potential debt candidates.




## OpenAPI

````yaml https://app.herondata.io/swagger get /api/end_users/{end_user_id_or_heron_id}/debt_candidates
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}/debt_candidates:
    get:
      tags:
        - EndUserCalculations
      summary: Get EndUser debt candidates
      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: []
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

````