> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Tracking Graph

> Use this endpoint to retrieve the tracking graph for a funds recovery request. The tracking graph shows the flow of funds from the root transaction.

**Notes:**
- The query parameters min_transaction_amount, max_transactions, hop_window and max_hops are deprecated: accepted for compatibility and ignored, because BTG returns the graph built with the parameters used when the funds recovery was created
- The graph includes persons, accounts, and transactions related to the fraud



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml get /v1/dict/funds-recoveries/{funds_recovery_id}/tracking-graph
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    API for Pix Indirect via BTG. It covers DICT keys and claims; MED infraction
    reports, fraud markers, refund requests, and funds recoveries; DICT
    statistics and reconciliation; Pix transfers, refunds, and schedules; static
    QR codes and QR code decoding; immediate and due-date collections; Pix
    Automático for the payer; transaction reports and TemposTransacoes
    statistics; and inbound and outbound webhook records.
  license:
    name: Lerian Studio General License
  title: Pix BTG API
  version: 1.14.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
paths:
  /v1/dict/funds-recoveries/{funds_recovery_id}/tracking-graph:
    get:
      tags:
        - Funds Recovery
      summary: Retrieve Tracking Graph
      description: >-
        Use this endpoint to retrieve the tracking graph for a funds recovery
        request. The tracking graph shows the flow of funds from the root
        transaction.


        **Notes:**

        - The query parameters min_transaction_amount, max_transactions,
        hop_window and max_hops are deprecated: accepted for compatibility and
        ignored, because BTG returns the graph built with the parameters used
        when the funds recovery was created

        - The graph includes persons, accounts, and transactions related to the
        fraud
      operationId: dict-get-funds-recovery-tracking-graph
      parameters:
        - description: Funds Recovery ID (UUID format)
          in: path
          name: funds_recovery_id
          required: true
          schema:
            description: Funds Recovery ID (UUID format)
            format: uuid
            type: string
        - description: Account ID (UUID) from X-Account-Id header
          in: header
          name: X-Account-Id
          schema:
            description: Account ID (UUID) from X-Account-Id header
            format: uuid
            type: string
        - deprecated: true
          description: >-
            Minimum transaction amount to include in the graph. Accepted for
            compatibility and ignored: BTG returns the graph built with the
            parameters used when the funds recovery was created.
          explode: false
          in: query
          name: min_transaction_amount
          schema:
            deprecated: true
            description: >-
              Minimum transaction amount to include in the graph. Accepted for
              compatibility and ignored: BTG returns the graph built with the
              parameters used when the funds recovery was created.
            type: string
        - deprecated: true
          description: >-
            Maximum number of transactions to include. Accepted for
            compatibility and ignored: BTG returns the graph built with the
            parameters used when the funds recovery was created.
          explode: false
          in: query
          name: max_transactions
          schema:
            deprecated: true
            description: >-
              Maximum number of transactions to include. Accepted for
              compatibility and ignored: BTG returns the graph built with the
              parameters used when the funds recovery was created.
            format: int64
            type: integer
        - deprecated: true
          description: >-
            Time window for hop analysis (ISO 8601 duration). Accepted for
            compatibility and ignored: BTG returns the graph built with the
            parameters used when the funds recovery was created.
          explode: false
          in: query
          name: hop_window
          schema:
            deprecated: true
            description: >-
              Time window for hop analysis (ISO 8601 duration). Accepted for
              compatibility and ignored: BTG returns the graph built with the
              parameters used when the funds recovery was created.
            type: string
        - deprecated: true
          description: >-
            Maximum number of hops to follow. Accepted for compatibility and
            ignored: BTG returns the graph built with the parameters used when
            the funds recovery was created.
          explode: false
          in: query
          name: max_hops
          schema:
            deprecated: true
            description: >-
              Maximum number of hops to follow. Accepted for compatibility and
              ignored: BTG returns the graph built with the parameters used when
              the funds recovery was created.
            format: int64
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrackingGraphOutput'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Internal Server Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Error
components:
  schemas:
    TrackingGraphOutput:
      additionalProperties: false
      properties:
        accounts:
          description: Accounts involved in the transaction graph
          items:
            $ref: '#/components/schemas/TrackingGraphAccountOutput'
          type: array
        creationTime:
          description: Graph creation timestamp
          examples:
            - '2023-11-07T05:31:56Z'
          format: date-time
          type: string
        fundsRecoveryId:
          description: Funds recovery identifier
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        parameters:
          $ref: '#/components/schemas/TrackingGraphParametersOutput'
          description: Parameters used for graph generation
        persons:
          description: Persons involved in the transaction graph
          items:
            $ref: '#/components/schemas/TrackingGraphPersonOutput'
          type: array
        rootTransactionId:
          description: Root transaction ID
          examples:
            - E12345678202411241430ABCDEFGHIJK
          type: string
        transactions:
          description: Transactions in the graph
          items:
            $ref: '#/components/schemas/TrackingGraphTxOutput'
          type: array
      required:
        - fundsRecoveryId
        - rootTransactionId
        - parameters
        - persons
        - accounts
        - transactions
        - creationTime
      type: object
    LegacyErrorBody:
      additionalProperties: false
      properties:
        code:
          type: string
        fields:
          additionalProperties:
            type: string
          type: object
        headers:
          additionalProperties:
            type: string
          type: object
        message:
          type: string
        paths:
          additionalProperties:
            type: string
          type: object
        queryParams:
          additionalProperties:
            type: string
          type: object
        raw:
          type: string
        title:
          type: string
      required:
        - code
        - title
        - message
      type: object
    TrackingGraphAccountOutput:
      additionalProperties: false
      properties:
        id:
          description: Identifier of the account node in the graph
          examples:
            - 1
          format: int64
          type: integer
        openingDate:
          description: Date the account was opened
          examples:
            - '2020-01-15'
          type: string
        ownerId:
          description: Identifier of the owning person node
          examples:
            - 1
          format: int64
          type: integer
        participant:
          description: ISPB of the participant institution (8 digits)
          examples:
            - '12345678'
          type: string
      required:
        - id
        - ownerId
        - participant
        - openingDate
      type: object
    TrackingGraphParametersOutput:
      additionalProperties: false
      properties:
        hopWindow:
          description: Time window for hop analysis
          examples:
            - PT24H
          type: string
        maxHops:
          description: Maximum number of hops followed
          examples:
            - 2
          format: int64
          type: integer
        maxTransactions:
          description: Maximum number of transactions included in the graph
          examples:
            - 5
          format: int64
          type: integer
        minTransactionAmount:
          description: Minimum transaction amount included in the graph
          examples:
            - '200.00'
          type: string
      required:
        - minTransactionAmount
        - maxTransactions
        - hopWindow
        - maxHops
      type: object
    TrackingGraphPersonOutput:
      additionalProperties: false
      properties:
        entityCreationDate:
          description: Date the person entity was created
          examples:
            - '2020-01-15'
          type: string
        id:
          description: Identifier of the person node in the graph
          examples:
            - 1
          format: int64
          type: integer
        type:
          description: Person type (NATURAL_PERSON or LEGAL_PERSON)
          examples:
            - NATURAL_PERSON
          type: string
      required:
        - id
        - type
      type: object
    TrackingGraphTxOutput:
      additionalProperties: false
      properties:
        amount:
          description: Transaction amount in BRL
          examples:
            - 1000.5
          format: double
          type: number
        creditorAccountId:
          description: Identifier of the creditor account node
          examples:
            - 2
          format: int64
          type: integer
        debtorAccountId:
          description: Identifier of the debtor account node
          examples:
            - 1
          format: int64
          type: integer
        id:
          description: Transaction End-to-End identifier
          examples:
            - E12345678202411241430ABCDEFGHIJK
          type: string
        refundableAmount:
          description: Refundable amount in BRL
          examples:
            - 1000.5
          format: double
          type: number
        settlementTime:
          description: Settlement timestamp (ISO 8601 UTC)
          examples:
            - '2023-11-07T05:31:56Z'
          type: string
        transactionDepth:
          description: >-
            Depth of the transaction in the DICT tracking graph (root = 1). Set
            by DICT.
          examples:
            - 1
          format: int64
          type: integer
      required:
        - id
        - debtorAccountId
        - creditorAccountId
        - amount
        - refundableAmount
        - settlementTime
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

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