> ## 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 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 /en/openapi/v3-current/indirect-pix.yaml get /v1/dict/statistics/persons/{tax_id}
openapi: 3.0.3
info:
  title: Plugin BR Pix Indirect - Complete API
  description: |
    Complete API for Brazilian Pix instant payment system including
    Pix key dictionary operations, QR code generation/decoding, transactions and
    transaction limits.
  version: 1.0.0
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/dict/statistics/persons/{tax_id}:
    get:
      tags:
        - MED API
      summary: Retrieve 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.
      parameters:
        - $ref: '#/components/parameters/TaxId'
      responses:
        '200':
          description: Person statistics retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonStatisticsOutput'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0001:
                  $ref: '#/components/examples/ErrorPIX0001'
                ErrorPIX0008:
                  $ref: '#/components/examples/ErrorPIX0008'
                ErrorPIX0260:
                  $ref: '#/components/examples/ErrorPIX0260'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX1090:
                  $ref: '#/components/examples/ErrorPIX1090'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0000:
                  $ref: '#/components/examples/ErrorPIX0000'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX1000:
                  $ref: '#/components/examples/ErrorPIX1000'
                ErrorPIX1007:
                  $ref: '#/components/examples/ErrorPIX1007'
                ErrorPIX1099:
                  $ref: '#/components/examples/ErrorPIX1099'
      deprecated: false
      security:
        - bearerAuth: []
components:
  parameters:
    TaxId:
      name: tax_id
      in: path
      description: 'Tax identifier (CPF: 11 digits or CNPJ: 14 digits).'
      required: true
      example: '12345678901'
      schema:
        type: string
  schemas:
    PersonStatisticsOutput:
      type: object
      properties:
        taxId:
          type: string
          description: CPF or CNPJ.
          example: '12345678901'
        statistics:
          type: object
          description: Aggregated statistics.
    ErrorFormat:
      type: object
      description: The response message error.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
  examples:
    ErrorPIX0001:
      summary: Missing Headers in Request
      value:
        code: PIX-0001
        title: Missing Headers in Request
        message: >-
          Your request is missing one or more required header params. Please
          refer to the documentation to ensure all necessary header params are
          included in your request.
    ErrorPIX0008:
      summary: Invalid Path Parameter in Request
      value:
        code: PIX-0008
        title: Invalid Path Parameter in Request
        message: >-
          One or more path parameters are invalid. Please refer to the
          documentation to verify the expected format and allowed values for
          each path parameter.
    ErrorPIX0260:
      summary: Invalid Tax ID Format
      value:
        code: PIX-0260
        title: Invalid Tax ID Format
        message: >-
          The taxIdNumber must be a valid CPF (11 digits) or CNPJ (14 digits)
          format.
    ErrorPIX1090:
      summary: Person Statistics Not Found
      value:
        code: PIX-1090
        title: Person Statistics Not Found
        message: >-
          The provider reports that no statistics were found for the specified
          tax ID.
    ErrorPIX0000:
      summary: Internal Server Error
      value:
        code: PIX-0000
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
    ErrorPIX1000:
      summary: Provider Connection Error
      value:
        code: PIX-1000
        title: Provider Connection Error
        message: Failed to connect to provider.
    ErrorPIX1007:
      summary: Provider Internal Error
      value:
        code: PIX-1007
        title: Provider Internal Error
        message: Provider returned an internal error.
    ErrorPIX1099:
      summary: Provider Unmapped Error
      value:
        code: PIX-1099
        title: Provider Unmapped Error
        message: Provider returned an unmapped error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````