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

# Search for CPF at the Receita Federal

> Endpoint that performs the query of CPF data in the Federal Revenue database, mandatory fields: Legitimuz Token and Client's CPF.



## OpenAPI

````yaml GET /receita-federal/cpf
openapi: 3.0.3
info:
  title: Legitimuz Parceiros (API Partners)
  description: >-
    The Legitimuz Partners API is developed in the REST style (opens new
    window). To connect to our API, we provide authentication through three main
    parameters: Username and Password. These will be provided via registration,
    which can be done through the SignUp endpoint.

    The API is accessed through standard RESTful HTTP requests. For more
    information, we are available to assist you.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.legitimuz.com
security: []
tags:
  - name: Auth
    description: >-
      Here we will discuss the authentication and registration of new Users; we
      have 3 main endpoints: Login, SignUp, and Me.


      **In Login,** you can authenticate by providing Username/Password and
      obtain the Bearer Token for authentication.


      **In SignUp,** you can register your account: company data, name, tax
      identification number (CNPJ), and the first user: name, personal
      identification number (CPF), username, date of birth.


      **In "Me",** you will have all the data related to your created account,
      and important IDs to use in subsequent requests.
  - name: Integrations
    description: >-
      Module that manages the API integration keys, where consultation of all
      created and active keys is available.

      **In List**, all queries of active keys are available.

      **In Create**, the creation of new integration keys that will be used in
      the following Endpoints is available.

      **Attention: Manage your API keys carefully, as they provide access to all
      Legitimuz product queries, and should be stored carefully to be used only
      in your product.**
  - name: SMS
    description: >-
      Here we will discuss the authentication and registration of new Users; we
      have 3 main endpoints: Login, SignUp, and Me.
  - name: AML
    description: >-
      Here we will discuss the authentication and registration of new Users; we
      have 3 main endpoints: Login, SignUp, and Me.
  - name: KYC
    description: >-
      In this module, the process of validation and knowledge of your clients
      (KYC, Know Your Client) is carried out.

      There are 4 main endpoints provided for client consultations and
      validations:


      - **OCR Document**
          The validation of the document sent along with the client's CPF (Personal Tax ID in Brazil) is conducted, where various databases and credit bureaus are consulted to verify if the client's provided data actually matches the document. If any inconsistency is found, a "**Manual Review**" alert is returned. If more than one inconsistency is detected, a "_Failed Analysis_" alert is displayed.

      - **Facematch**
          The validation of the client's face or facial features is conducted in comparison with the photo on the submitted document. It is necessary to submit a document with a clear, high-resolution photo so that the comparison can be accurately performed. After the validation, a percentage match between the two images is generated, where only a similarity of 80% or higher between the two faces is considered valid.

      - **CPF Enrichment**
          Endpoint designed for Enrichment / Consultation of client information through the CPF, returning various data such as Full Name, Mother's Name, Address, Phone Number, Email, Age, Date of Birth, etc.

      - **CEP (zip code) Enrichment**
          Returns address data from a call made using the zip code (CEP), returning the Street, State, City, and Neighborhood.
  - name: Receita Federal
paths:
  /receita-federal/cpf:
    get:
      tags:
        - Receita Federal
      summary: 'GET CPF: Receita Federal'
      description: >-
        Endpoint that performs the query of CPF data in the Federal Revenue
        database, mandatory fields: Legitimuz Token and Client's CPF.
      operationId: getCpfReceitaFederal
      parameters:
        - name: token
          in: query
          schema:
            type: string
            example: 8b7cccf0-9395-4e84-a20c-95b5e362205d
          description: Legitimuz Token (Created in Integrations -> Create).
        - name: cpf
          in: query
          schema:
            type: string
            example: '53477771842'
          description: CPF of the Client to be validated.
        - name: Origin
          in: header
          schema:
            type: string
            example: dashboard.legitimuz.com
      responses:
        '200':
          description: 'GET CPF: Receita Federal'
          headers:
            Connection:
              schema:
                type: string
                example: keep-alive
            Date:
              schema:
                type: string
                example: Thu, 14 Mar 2024 13:20:58 GMT
            Keep-Alive:
              schema:
                type: string
                example: timeout=5
            access-control-allow-credentials:
              schema:
                type: string
                example: 'true'
            access-control-allow-origin:
              schema:
                type: string
                example: dashboard.legitimuz.com
            content-length:
              schema:
                type: string
                example: '651'
          content:
            application/json:
              schema:
                type: object
                properties:
                  Result:
                    type: object
                    properties:
                      AnoObito:
                        type: number
                        example: 0
                      Celular:
                        type: string
                        example: '31997923070'
                      CodigoControleComprovante:
                        nullable: true
                        example: null
                      ConstaObito:
                        type: boolean
                        example: false
                      DataEmissao:
                        type: string
                        example: '2016-08-23T03:00:00.000Z'
                      DataInscricao:
                        type: string
                        example: '2003-09-25T03:00:00.000Z'
                      DataInscricaoAnterior1990:
                        type: boolean
                        example: false
                      DataNascimento:
                        type: string
                        example: '1987-05-16T00:00:00.000Z'
                      DataNascimentoInvalidaExistente:
                        type: boolean
                        example: false
                      DigitoVerificador:
                        type: string
                        example: '88'
                      Email:
                        type: string
                        example: viniciusribeiro.adm@gmail.com
                      NomePessoaFisica:
                        type: string
                        example: Vinicius Sinon Medeiros Ribeiro
                      NomeSocial:
                        type: string
                        example: Vinicius Ribeiro
                      NomesMeioNomeNorm:
                        type: string
                        example: Sinon Medeiros
                      NumeroCpf:
                        type: string
                        example: '07772019688'
                      Origem:
                        type: string
                        example: Receita Federal
                      PrimeirosNomesNorm:
                        type: string
                        example: Vinicius
                      QrCodeLink:
                        nullable: true
                        example: null
                      SituacaoCadastral:
                        type: string
                        example: Regular
                      SobrenomesNorm:
                        type: string
                        example: Ribeiro
              examples:
                'GET CPF: Receita Federal':
                  value:
                    Result:
                      AnoObito: 0
                      Celular: '31997923070'
                      CodigoControleComprovante: null
                      ConstaObito: false
                      DataEmissao: '2016-08-23T03:00:00.000Z'
                      DataInscricao: '2003-09-25T03:00:00.000Z'
                      DataInscricaoAnterior1990: false
                      DataNascimento: '1987-05-16T00:00:00.000Z'
                      DataNascimentoInvalidaExistente: false
                      DigitoVerificador: '88'
                      Email: viniciusribeiro.adm@gmail.com
                      NomePessoaFisica: Vinicius Sinon Medeiros Ribeiro
                      NomeSocial: Vinicius Ribeiro
                      NomesMeioNomeNorm: Sinon Medeiros
                      NumeroCpf: '07772019688'
                      Origem: Receita Federal
                      PrimeirosNomesNorm: Vinicius
                      QrCodeLink: null
                      SituacaoCadastral: Regular
                      SobrenomesNorm: Ribeiro

````