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

# 2 - Cadastrar Vínculo

> Executa validações, persiste internamente e integra com BMP para pessoa e endereço.

Utilize este endpoint para executar validações, persiste internamente e integra com BMP para pessoa e endereço.


## OpenAPI

````yaml post /trabalhador/cadastrar-vinculo
openapi: 3.0.1
info:
  title: SwaggerProxy
  version: '1.0'
servers: []
security: []
paths:
  /trabalhador/cadastrar-vinculo:
    post:
      tags:
        - trabalhador
      summary: Cadastra/atualiza Trabalhador, Empregador e Vínculo
      description: >-
        Executa validações, persiste internamente e integra com BMP para pessoa
        e endereço.
      operationId: EConsignado.Lambda.CadastrarVinculo
      requestBody:
        content:
          application/json:
            schema:
              required:
                - CodigoCategoriaTrabalhador
                - CodigoInscricaoEmpregador
                - CPF
                - DadosContato
                - DataAdmissao
                - DataNascimento
                - Elegivel
                - Endereco
                - Matricula
                - Nome
                - NomeEmpregador
                - NumeroInscricaoEmpregador
                - PessoaExpostaPoliticamente
                - ValorBaseMargem
                - ValorMargemDisponivel
                - ValorTotalVencimentos
              type: object
              properties:
                CPF:
                  type: string
                  description: CPF do trabalhador (apenas dígitos).
                Matricula:
                  type: string
                  description: Matrícula do trabalhador.
                NumeroInscricaoEmpregador:
                  type: string
                  description: Inscrição do empregador (CPF/CNPJ, apenas dígitos).
                NomeEmpregador:
                  type: string
                  description: Nome/Razão social do empregador.
                CodigoInscricaoEmpregador:
                  enum:
                    - 1
                    - 2
                  type: integer
                  description: Tipo de inscrição do empregador. 1 = CPF, 2 = CNPJ.
                  format: int32
                Nome:
                  type: string
                  description: Nome completo (nome e sobrenome).
                Sexo:
                  type: string
                  description: Sexo (livre).
                DataNascimento:
                  type: string
                  description: Data de nascimento (ISO 8601).
                  format: date-time
                CodigoCategoriaTrabalhador:
                  type: integer
                  description: Código da categoria do trabalhador.
                  format: int32
                Elegivel:
                  type: boolean
                  description: Indica se o trabalhador é elegível.
                ValorTotalVencimentos:
                  type: number
                  description: Total de vencimentos.
                  format: double
                ValorBaseMargem:
                  type: number
                  description: Valor base para margem.
                  format: double
                ValorMargemDisponivel:
                  type: number
                  description: Margem disponível.
                  format: double
                DataAdmissao:
                  type: string
                  description: Data de admissão (YYYY-MM-DD).
                  format: date
                PessoaExpostaPoliticamente:
                  enum:
                    - 0
                    - 1
                    - 2
                  type: integer
                  description: 'PEP: 0 = Não, 1 = N1, 2 = N2.'
                  format: int32
                NomeMae:
                  type: string
                  description: Nome da mãe.
                PaisNacionalidade:
                  type: string
                  description: País de nacionalidade.
                CboDescricao:
                  type: string
                  description: Descrição do cargo (CBO).
                DadosContato:
                  required:
                    - Email
                    - TelefoneCelular1
                  type: object
                  properties:
                    Email:
                      type: string
                      description: Email (obrigatório).
                    TelefoneCelular1:
                      type: string
                      description: Telefone celular 1 (obrigatório).
                    TelefoneFixo1:
                      type: string
                      description: Telefone fixo 1 (opcional).
                  description: Dados de contato do trabalhador.
                DadosComplementares:
                  type: object
                  properties:
                    RG:
                      type: string
                      description: Número do RG (opcional).
                    RGOrgao:
                      type: string
                      description: Órgão emissor do RG (opcional).
                    RGUF:
                      type: string
                      description: UF emissora do RG (opcional).
                    EstadoCivil:
                      type: integer
                      description: Estado civil (opcional, inteiro).
                      format: int32
                  description: Documentos e informações complementares.
                Endereco:
                  required:
                    - CEP
                    - Logradouro
                    - Bairro
                    - Cidade
                    - UF
                  type: object
                  properties:
                    CEP:
                      type: string
                      description: CEP (obrigatório).
                    Logradouro:
                      type: string
                      description: Logradouro (obrigatório).
                    NroLogradouro:
                      type: string
                      description: Número do logradouro (opcional).
                    Bairro:
                      type: string
                      description: Bairro (obrigatório).
                    Complemento:
                      type: string
                      description: Complemento (opcional).
                    Cidade:
                      type: string
                      description: Cidade (obrigatório).
                    UF:
                      type: string
                      description: UF (obrigatório).
                  description: Endereço do trabalhador.
                NomeConjuge:
                  type: string
                  description: Nome do cônjuge (opcional, deve conter nome e sobrenome).
                CpfConjuge:
                  type: string
                  description: CPF do cônjuge (opcional, 11 dígitos numéricos).
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                  - mensagem
                type: object
                properties:
                  mensagem:
                    type: string
                    description: Mensagem de confirmação.
        '400':
          description: Bad Request - Erros de validação
          content:
            application/json:
              schema:
                type: object
                properties:
                  ErrorId:
                    type: string
                    format: uuid
                  ErrorCode:
                    type: string
                  ErrorCampo:
                    type: string
                  Error:
                    type: string
                  Origem:
                    type: string
        '401':
          description: Unauthorized - Não Autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  ErrorId:
                    type: string
                    format: uuid
                  ErrorCode:
                    type: string
                  ErrorCampo:
                    type: string
                  Error:
                    type: string
                  Origem:
                    type: string
        '403':
          description: Forbidden - Não Autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  ErrorId:
                    type: string
                    format: uuid
                  ErrorCode:
                    type: string
                  ErrorCampo:
                    type: string
                  Error:
                    type: string
                  Origem:
                    type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                required:
                  - Erro
                type: object
                properties:
                  Erro:
                    type: string
        '408':
          description: Request Timeout - Tempo Excedido
          content:
            application/json:
              schema:
                type: object
                properties:
                  ErrorId:
                    type: string
                    format: uuid
                  ErrorCode:
                    type: string
                  ErrorCampo:
                    type: string
                  Error:
                    type: string
                  Origem:
                    type: string
        '412':
          description: Precondition Failed - Pré-condição não atendida
          content:
            application/json:
              schema:
                required:
                  - Erro
                type: object
                properties:
                  Erro:
                    type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                required:
                  - Erro
                type: object
                properties:
                  Erro:
                    type: string

````