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

# 16 - Incluir Pessoa Onboarding

Por meio deste endpoint ocorre a Integração entre as plataformas BMP e BTG, onde o processo do onboarding acontece de forma automática.

## Mensagens de erro

A tabela abaixo representa as mensagens de erro que podem ser retornadas ao tentar realizar uma requisição.

<Expandable title="Mensagens de requisições com erro">
  O retorno de uma requisição com status HTTP 400 (Bad Request) pode incluir as seguintes mensagens de erro:

  <Note>No exemplo de retorno ao lado, o campo `code` representa a coluna **Código** desta tabela; o campo `context` representa a coluna **Código Detalhado**; e o campo `message` representa a coluna **Mensagem**.</Note>

  | Categoria | Operação                 | Ação                    | Código | Código Detalhado | Mensagem                                                    |
  | --------- | ------------------------ | ----------------------- | ------ | ---------------- | ----------------------------------------------------------- |
  | Pessoa    | RegistraPessoaOnBoarding | IncluirPessoaOnBoarding | C0042  | V0001            | Cliente não encontrado                                      |
  | Pessoa    | RegistraPessoaOnBoarding | IncluirPessoaOnBoarding | C0042  | V0002            | Configuração de Onboarding não cadastrada                   |
  | Pessoa    | RegistraPessoaOnBoarding | IncluirPessoaOnBoarding | C0042  | V0003            | Documento do cliente não encontrado                         |
  | Pessoa    | RegistraPessoaOnBoarding | IncluirPessoaOnBoarding | C0042  | V0004            | Onboarding já cadastrado para esta pessoa                   |
  | Pessoa    | RegistraPessoaOnBoarding | IncluirPessoaOnBoarding | C0108  | V0001            | Documento Federal deve ser informado                        |
  | Pessoa    | RegistraPessoaOnBoarding | IncluirPessoaOnBoarding | C0108  | V0002            | Cliente não encontrado com o documento `{documentoCliente}` |
  | Pessoa    | RegistraPessoaOnBoarding | IncluirPessoaOnBoarding | C0108  | V0003            | Cliente não cadastrado pelo parceiro de integração          |
</Expandable>


## OpenAPI

````yaml post /Pessoa/IncluirPessoaOnBoarding
openapi: 3.0.1
info:
  title: BMPDigitalCore.ApiExterna.Pessoa.API
  version: '1.0'
servers:
  - url: https://api.bmpdigital.moneyp.dev.br/
    description: Localhost
security:
  - Bearer: []
paths:
  /Pessoa/IncluirPessoaOnBoarding:
    post:
      tags:
        - Pessoa
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegistraPessoaOnBoardingCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/RegistraPessoaOnBoardingCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/RegistraPessoaOnBoardingCommand'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RegistraPessoaOnBoardingResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/RegistraPessoaOnBoardingResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/RegistraPessoaOnBoardingResponse'
        '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:
    RegistraPessoaOnBoardingCommand:
      type: object
      properties:
        dto:
          $ref: '#/components/schemas/PessoaOnboardingDTO'
      additionalProperties: false
    RegistraPessoaOnBoardingResponse:
      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
        codigo:
          type: string
          format: uuid
      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
    PessoaOnboardingDTO:
      required:
        - documentoFederal
      type: object
      properties:
        documentoFederal:
          maxLength: 20
          minLength: 0
          type: string
          description: Documento federal do cliente
          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

````