> ## 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.

# Get Person Statistics

> Use this endpoint to fetch aggregated Pix statistics for a person identified by their tax ID (CPF or CNPJ).

**Notes:**
- Statistics include transaction settlement data, fraud markers, infraction reports, and entry information.
- Data is aggregated over different time periods: d90 (last 90 days), m12 (last 12 months), m60 (last 60 months).
- This endpoint queries the provider directly and does not store data locally.
- Use this information for risk assessment before processing Pix transactions.



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml get /v1/dict/statistics/persons/{tax_id}
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/statistics/persons/{tax_id}:
    get:
      tags:
        - Statistics
      summary: Get Person Statistics
      description: >-
        Use this endpoint to fetch aggregated Pix statistics for a person
        identified by their tax ID (CPF or CNPJ).


        **Notes:**

        - Statistics include transaction settlement data, fraud markers,
        infraction reports, and entry information.

        - Data is aggregated over different time periods: d90 (last 90 days),
        m12 (last 12 months), m60 (last 60 months).

        - This endpoint queries the provider directly and does not store data
        locally.

        - Use this information for risk assessment before processing Pix
        transactions.
      operationId: dict-get-person-statistics
      parameters:
        - description: 'Tax identifier (CPF: 11 digits or alphanumeric CNPJ)'
          in: path
          name: tax_id
          required: true
          schema:
            description: 'Tax identifier (CPF: 11 digits or alphanumeric CNPJ)'
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonStatisticsOutput'
          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:
    PersonStatisticsOutput:
      additionalProperties: false
      properties:
        entries:
          $ref: '#/components/schemas/PersonEntriesStatistics'
          description: Pix key entries statistics
        fraudMarkers:
          $ref: '#/components/schemas/FraudMarkersStatistics'
          description: Fraud marker statistics
        infractionReports:
          $ref: '#/components/schemas/InfractionReportsStatistics'
          description: Infraction report statistics
        spi:
          $ref: '#/components/schemas/SpiStatistics'
          description: SPI settlement statistics
      required:
        - fraudMarkers
        - infractionReports
        - entries
      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
    PersonEntriesStatistics:
      additionalProperties: false
      properties:
        registeredAccounts:
          description: Number of accounts with registered Pix keys
          examples:
            - 2
          format: int64
          type: integer
        watermark:
          description: Datetime of last considered event for entry statistics
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
      type: object
    FraudMarkersStatistics:
      additionalProperties: false
      properties:
        applicationFrauds:
          $ref: '#/components/schemas/TimeBasedValues'
          description: Counters for APPLICATION_FRAUD type markers
        distinctFraudReporters:
          $ref: '#/components/schemas/TimeBasedValues'
          description: Number of distinct fraud reporters
        muleAccounts:
          $ref: '#/components/schemas/TimeBasedValues'
          description: Counters for MULE_ACCOUNT type markers
        otherFrauds:
          $ref: '#/components/schemas/TimeBasedValues'
          description: Counters for OTHER type fraud markers
        scammerAccounts:
          $ref: '#/components/schemas/TimeBasedValues'
          description: Counters for SCAMMER_ACCOUNT type markers
        totalFraudTransactionAmount:
          $ref: '#/components/schemas/TimeBasedValues'
          description: Total fraud transaction amount (BRL)
        unknownFrauds:
          $ref: '#/components/schemas/TimeBasedValues'
          description: Counters for UNKNOWN type fraud markers (historical)
        watermark:
          description: Datetime of last considered event for fraud marker statistics
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
      type: object
    InfractionReportsStatistics:
      additionalProperties: false
      properties:
        openReports:
          description: Number of currently open infraction reports
          examples:
            - 0
          format: int64
          type: integer
        openReportsDistinctReporters:
          description: Number of distinct participants with open reports
          examples:
            - 0
          format: int64
          type: integer
        rejectedReports:
          $ref: '#/components/schemas/TimeBasedValues'
          description: Counters for rejected infraction reports
        watermark:
          description: Datetime of last considered event for infraction report statistics
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
      type: object
    SpiStatistics:
      additionalProperties: false
      properties:
        settlements:
          $ref: '#/components/schemas/TimeBasedValues'
          description: Settlement transaction counters
        watermark:
          description: Datetime of last considered event for SPI statistics
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
      type: object
    TimeBasedValues:
      additionalProperties: false
      properties:
        d90:
          description: Counter for the last 90 days
          examples:
            - '36'
          type: string
        m12:
          description: Counter for the last 12 months
          examples:
            - '51'
          type: string
        m60:
          description: Counter for the last 60 months (5 years)
          examples:
            - '44'
          type: string
      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.