> ## Documentation Index
> Fetch the complete documentation index at: https://bmpdocs.moneyp.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Consulta de Onboarding KYC

> Consulte o resultado mais recente do processo de KYC de uma pessoa ou empresa.

# Consulta de Onboarding KYC

Esta API consulta o onboarding KYC mais recente de uma pessoa física ou jurídica a partir do CPF ou CNPJ.

<Expandable title="Tabela de Erros">
  | Código  | Situação                     | Mensagem                                                  |
  | ------- | ---------------------------- | --------------------------------------------------------- |
  | `V0001` | Documento não informado      | `Documento federal deve ser informado.`                   |
  | `V0002` | CPF ou CNPJ inválido         | `Documento federal inválido.`                             |
  | `V0003` | Onboarding inexistente       | `Onboarding para o documento federal não foi encontrado.` |
  | —       | Token ausente ou inválido    | `Não autorizado.`                                         |
  | —       | Indisponibilidade momentânea | `Não foi possível consultar o onboarding KYC.`            |
</Expandable>


## OpenAPI

````yaml post /Pessoa/ConsultarOnboardingKYC
openapi: 3.0.1
info:
  title: BMPDigitalCore.ApiExterna.Pessoa.API
  version: '1.0'
servers: []
security:
  - Bearer: []
paths:
  /Pessoa/ConsultarOnboardingKYC:
    post:
      tags:
        - Pessoa
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsultaOnboardingKYCCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/ConsultaOnboardingKYCCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ConsultaOnboardingKYCCommand'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ConsultaOnboardingKYCResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ConsultaOnboardingKYCResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ConsultaOnboardingKYCResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ResponseBase'
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBase'
            text/json:
              schema:
                $ref: '#/components/schemas/ResponseBase'
components:
  schemas:
    ConsultaOnboardingKYCCommand:
      type: object
      properties:
        dto:
          $ref: '#/components/schemas/ConsultaOnboardingKYCDTO'
      additionalProperties: false
    ConsultaOnboardingKYCResponse:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        hasError:
          type: boolean
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
        documentoFederal:
          type: string
          nullable: true
        nome:
          type: string
          nullable: true
        dtInclusao:
          type: string
          format: date-time
        valido:
          type: boolean
        motivo:
          type: string
          nullable: true
        dtExecucaoKYC:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    ResponseBase:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        hasError:
          type: boolean
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
      additionalProperties: false
    ConsultaOnboardingKYCDTO:
      type: object
      properties:
        documentoFederal:
          type: string
          nullable: true
      additionalProperties: false
    Message:
      type: object
      properties:
        messageType:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          nullable: true
        context:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        field:
          type: string
          nullable: true
      additionalProperties: false
    ErrorType:
      enum:
        - 1
        - 2
        - 3
      type: integer
      format: int32
  securitySchemes:
    Bearer:
      type: apiKey
      description: Informe o token
      name: Authorization
      in: header

````