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

# 43 - Gerar Link de Onboarding

O Onboarding tem como objetivo apoiar os processos de compliance e prevenção a fraudes.

Ele compara os dados do documento enviado com as informações fornecidas pelo cliente e avalia a autenticidade do documento, verificando originalidade, possíveis manipulações e indícios de fraude.

O Onboarding pode ser realizado em qualquer momento da jornada do integrador, no início, para validar o cliente; durante a solicitação de crédito; ou ao final, para confirmar os dados fornecidos.

O processo é iniciado por um link gerado na requisição inicial, que leva o integrador a uma tela com etapas pré determinadas e customizáveis conforme a necessidade.

<Expandable title="Exemplo de retorno completo">
  O exemplo de retorno, mostrado no lado direito desta tela, está resumido. Na linha `"json": "<string>"` o retorno do Bureau vem de forma serializada, sendo necessário deserializar para melhor visualização. Aqui está um exemplo do retorno deserializado que vem no campo `"json":`.

  ```json theme={null}
  {
      "Token": "String",
      "Status": {
          "Report": "String",
          "Uuid": "String",
          "StatusReasons": [
              {
                  "Category": "String",
                  "Description": "String",
                  "ResultStatus": "String",
                  "ResultCustomStatus": "String",
                  "Code": "String",
                  "Status": "String",
                  "ManualReprovalReasons": "String"
              }
          ],
          "TemplateId": "String",
          "OnboardingId": "String",
          "Type": "String",
          "Date": "Date"
      }
  }
  ```
</Expandable>


## OpenAPI

````yaml post /Bureau/GeraLinkCAFOnboarding
openapi: 3.0.1
info:
  title: BMPDigitalCore.ApiExterna.Bureau.API
  version: '1.0'
servers:
  - url: https://api.bmpdigital.moneyp.dev.br/
    description: Localhost
security:
  - Bearer: []
paths:
  /Bureau/GeraLinkCAFOnboarding:
    post:
      tags:
        - BureauAsync
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateLinkCAFCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/GenerateLinkCAFCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/GenerateLinkCAFCommand'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/GenerateLinkCAFResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateLinkCAFResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/GenerateLinkCAFResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/GenerateLinkCAFResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateLinkCAFResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/GenerateLinkCAFResponse'
components:
  schemas:
    GenerateLinkCAFCommand:
      type: object
      properties:
        dto:
          $ref: '#/components/schemas/GenerateLinkCAFRequest'
      additionalProperties: false
    GenerateLinkCAFResponse:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
        hasError:
          type: boolean
        falha:
          type: boolean
        json:
          type: string
          nullable: true
      additionalProperties: false
    GenerateLinkCAFRequest:
      type: object
      properties:
        webhookId:
          type: string
          nullable: true
        idLayout:
          type: string
          nullable: true
        naoExpira:
          type: boolean
        atributos:
          $ref: '#/components/schemas/CafAtributos'
        tipo:
          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
    CafAtributos:
      type: object
      properties:
        cpf:
          type: string
          nullable: true
        cnpj:
          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

````