> ## 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 positions summary for end user

> Returns positions with calculated metrics for an end user, optionally filtered by account IDs



## OpenAPI

````yaml https://app.herondata.io/swagger get /api/end_users/{end_user_id_or_heron_id}/positions
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}/positions:
    get:
      tags:
        - Positions
      summary: Get positions summary for end user
      description: >-
        Returns positions with calculated metrics for an end user, optionally
        filtered by account IDs
      parameters:
        - description: The end user ID or heron ID
          in: path
          name: end_user_id_or_heron_id
          required: true
          schema:
            type: string
        - description: Account IDs to filter positions by
          in: query
          name: account_ids
          schema:
            items:
              type: string
            type: array
        - description: >-
            If true, include investment/repayment/reversal transactions on each
            position
          in: query
          name: include_transactions
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserPositions'
          description: Positions summary retrieved successfully
        '404':
          description: End user not found
components:
  schemas:
    EndUserPositions:
      properties:
        llm_summary:
          nullable: true
          type: string
        positions:
          items:
            $ref: '#/components/schemas/PositionSummary'
          type: array
      type: object
    PositionSummary:
      properties:
        group:
          nullable: true
          type: string
        heron_id:
          type: string
        inflow_metrics:
          allOf:
            - $ref: '#/components/schemas/PositionInflowMetrics'
          nullable: true
        investment_transactions:
          description: >-
            Only populated when include_transactions=true is passed on the
            request
          items:
            $ref: '#/components/schemas/PositionTransaction'
          nullable: true
          type: array
        is_active:
          type: boolean
        is_renewal:
          nullable: true
          type: boolean
        llm_summary:
          nullable: true
          type: string
        merchant:
          nullable: true
          type: string
        missed_payments:
          items:
            format: date
            type: string
          nullable: true
          type: array
        nsf_fees:
          items:
            $ref: '#/components/schemas/AdversePayment'
          nullable: true
          type: array
        outflow_metrics:
          allOf:
            - $ref: '#/components/schemas/PositionOutflowMetrics'
          nullable: true
        parent_position_heron_id:
          nullable: true
          type: string
        product_type:
          enum:
            - mca
            - line_of_credit
            - reverse_consolidation
            - revenue_share
            - null
          nullable: true
          type: string
        repayment_transactions:
          description: >-
            Only populated when include_transactions=true is passed on the
            request
          items:
            $ref: '#/components/schemas/PositionTransaction'
          nullable: true
          type: array
        reversal_transactions:
          description: >-
            Only populated when include_transactions=true is passed on the
            request
          items:
            $ref: '#/components/schemas/PositionTransaction'
          nullable: true
          type: array
        reversals:
          items:
            $ref: '#/components/schemas/AdversePayment'
          nullable: true
          type: array
        status:
          enum:
            - none
            - active
            - inactive
            - defaulted
            - potential_default
            - renewal_active
            - renewal_inactive
            - new_position
            - likely_paid_off
          type: string
        stop_payments:
          items:
            $ref: '#/components/schemas/AdversePayment'
          nullable: true
          type: array
      type: object
    PositionInflowMetrics:
      properties:
        count:
          type: integer
        max_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        max_timestamp:
          format: date-time
          nullable: true
          type: string
        min_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        min_timestamp:
          format: date-time
          nullable: true
          type: string
        total_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
      type: object
    PositionTransaction:
      properties:
        amount:
          $ref: '#/components/schemas/Money'
        description:
          type: string
        heron_id:
          type: string
        timestamp:
          format: date-time
          type: string
      type: object
    AdversePayment:
      properties:
        amount:
          type: number
        date:
          format: date
          type: string
        merchant:
          nullable: true
          type: string
      type: object
    PositionOutflowMetrics:
      properties:
        changed_in_last_90_days:
          type: boolean
        confidence_reasons:
          description: Machine-readable reasons for the estimated confidence band
          items:
            type: string
          type: array
        count:
          type: integer
        duration_days:
          nullable: true
          type: integer
        estimated_confidence:
          description: 'Confidence band for outflow estimates: high, medium, low, or none'
          enum:
            - high
            - medium
            - low
            - none
            - null
          nullable: true
          type: string
        estimated_monthly_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        estimated_remaining_balance:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        estimated_right_to_receive_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        fallback_estimated_monthly_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: >-
            Monthly fallback amount using the latest repayment for low and
            medium confidence estimates
          nullable: true
        frequency:
          enum:
            - not_enough_data
            - same_day
            - irregular
            - daily
            - weekly
            - biweekly
            - monthly
            - quarterly
            - annually
            - weekday
            - twice_weekly
            - null
          nullable: true
          type: string
        has_repayment_modifications:
          type: boolean
        latest_estimated_monthly_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        latest_repayment_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        latest_repayment_frequency:
          enum:
            - not_enough_data
            - same_day
            - irregular
            - daily
            - weekly
            - biweekly
            - monthly
            - quarterly
            - annually
            - weekday
            - twice_weekly
            - null
          nullable: true
          type: string
        max_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        max_timestamp:
          format: date-time
          nullable: true
          type: string
        mean_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        mean_interval_days:
          nullable: true
          type: number
        min_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        min_timestamp:
          format: date-time
          nullable: true
          type: string
        mode_interval_days:
          nullable: true
          type: integer
        payments_per_month:
          nullable: true
          type: number
        remaining_repayment_duration_days:
          nullable: true
          type: integer
        std_dev_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        total_amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          nullable: true
        total_expected_duration_days:
          nullable: true
          type: integer
        total_expected_payments_to_date:
          nullable: true
          type: integer
      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

````