> ## 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
        total_holdback_percentage:
          description: >-
            Current positions' expected monthly repayments divided by average
            monthly true revenue, as a percentage
          nullable: true
          type: number
      type: object
    PositionSummary:
      properties:
        collecting_accounts:
          description: Every account a repayment was debited from, most-collected first
          items:
            $ref: '#/components/schemas/CollectingAccount'
          type: array
        funder_holdback_percentage:
          description: >-
            Funder expected monthly repayments divided by average monthly true
            revenue, as a percentage
          nullable: true
          type: number
        group:
          nullable: true
          type: string
        has_possible_payoff:
          description: >-
            A lump was left out of the estimate but lacks the corroboration
            needed to call the position paid off
          type: boolean
        heron_id:
          type: string
        holdback_percentage:
          description: >-
            Position expected monthly repayment divided by average monthly true
            revenue, as a percentage
          nullable: true
          type: number
        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/RelatedPayment'
          nullable: true
          type: array
        outflow_metrics:
          allOf:
            - $ref: '#/components/schemas/PositionOutflowMetrics'
          nullable: true
        parent_position_heron_id:
          nullable: true
          type: string
        payoffs:
          description: Payments that settled the position rather than servicing it
          items:
            $ref: '#/components/schemas/RelatedPayment'
          nullable: true
          type: array
        primary_collecting_account:
          allOf:
            - $ref: '#/components/schemas/CollectingAccount'
          description: >-
            The account most repayments were debited from. Ties go to the larger
            total debited, then to the account with the most recent repayment.
            Null when no repayment is linked to an account.
          nullable: true
        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/RelatedPayment'
          nullable: true
          type: array
        servicing_fees:
          items:
            $ref: '#/components/schemas/RelatedPayment'
          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/RelatedPayment'
          nullable: true
          type: array
      type: object
    CollectingAccount:
      properties:
        account_owner_name:
          description: >-
            Name the bank statement lists as the owner of the account the money
            was collected from
          example: ACME TRADING LLC
          nullable: true
          type: string
        display_account_id:
          description: >-
            Human-readable label for the bank account the money was collected
            from: the last four digits of the account number (falling back to
            the account title). Not unique and not a key.
          example: '7505'
          nullable: true
          type: string
      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:
        account_owner_name:
          description: >-
            Name the bank statement lists as the owner of the account the money
            was collected from
          example: ACME TRADING LLC
          nullable: true
          type: string
        amount:
          $ref: '#/components/schemas/Money'
        description:
          type: string
        display_account_id:
          description: >-
            Human-readable label for the bank account the money was collected
            from: the last four digits of the account number (falling back to
            the account title). Not unique and not a key.
          example: '7505'
          nullable: true
          type: string
        heron_id:
          type: string
        timestamp:
          format: date-time
          type: string
      type: object
    RelatedPayment:
      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'
          description: >-
            Expected monthly repayment. An MCA with a regular cadence: the
            latest payment times the payments that cadence makes in a month. A
            line of credit, a revenue share, or an MCA with no regular cadence:
            the repayments in the 30 days ending where the paying accounts' bank
            data ends. An open MCA with no repayment in that window reports its
            latest payment
          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'
          description: >-
            A regular-cadence MCA: the latest repayment times
            payments_per_month. A line of credit, a revenue share, or an MCA
            with no regular cadence: the same window total as
            estimated_monthly_amount
          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:
          description: >-
            Payments a month. A regular-cadence MCA: the payments its cadence
            makes in a month. A line of credit, a revenue share, or an MCA with
            no regular cadence: the repayment days counted in the window
            estimated_monthly_amount sums
          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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.