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

# 9 - Gerar Contrato

> Recebe dados da proposta e gera um contrato, integrando com o sistema Corban.



## OpenAPI

````yaml post /contrato/oferta-ativa/gerar-contrato
openapi: 3.0.1
info:
  title: SwaggerProxy
  version: '1.0'
servers: []
security: []
paths:
  /contrato/oferta-ativa/gerar-contrato:
    post:
      tags:
        - contrato/oferta-ativa
      summary: Gera um novo contrato de empréstimo consignado (oferta ativa).
      description: >-
        Recebe dados da proposta e gera um contrato, integrando com o sistema
        Corban.
      operationId: EConsignado.Lambda.GerarContratoCorban
      requestBody:
        content:
          application/json:
            schema:
              required:
                - CpfTrabalhador
                - Matricula
                - NumeroInscricaoEmpregador
                - ValorTaxaMensal
              type: object
              properties:
                Matricula:
                  type: string
                  description: Matrícula do trabalhador.
                NumeroInscricaoEmpregador:
                  type: string
                  description: Inscrição do empregador (CPF/CNPJ, apenas dígitos).
                CodigoInscricaoEmpregador:
                  enum:
                    - 1
                    - 2
                  type: integer
                  description: Tipo de inscrição do empregador. 1 = CPF, 2 = CNPJ.
                  format: int32
                CpfTrabalhador:
                  type: string
                  description: CPF do trabalhador (11 dígitos).
                ValorLiberado:
                  type: number
                  description: >-
                    Valor a ser liberado (opcional se simulação for por valor de
                    parcela).
                  format: double
                ValorParcela:
                  type: number
                  description: >-
                    Valor da parcela (opcional se simulação for por valor
                    liberado).
                  format: double
                NumeroParcelas:
                  type: integer
                  description: Número de parcelas (1 a 96).
                  format: int32
                ValorTaxaMensal:
                  type: number
                  description: Taxa de juros mensal.
                  format: double
                TipoContrato:
                  maxLength: 3
                  type: string
                  description: Tipo de contrato (até 3 caracteres).
                ValorSeguro:
                  type: number
                  description: Valor do seguro (> 0 se informado).
                  format: double
                NumeroApolice:
                  type: string
                  description: Número da apólice (obrigatório se ValorSeguro informado).
                PropostaContaPagamento:
                  required:
                    - TipoConta
                    - Agencia
                    - AgenciaDig
                    - Conta
                    - ContaDig
                    - NumeroBanco
                  type: object
                  properties:
                    TipoConta:
                      type: integer
                      description: 1 = Corrente, 2 = Poupança; nulo para Boleto.
                      format: int32
                    Agencia:
                      type: string
                      description: Agência.
                    AgenciaDig:
                      type: string
                      description: Dígito da agência.
                    Conta:
                      type: string
                      description: Conta.
                    ContaDig:
                      type: string
                      description: Dígito da conta.
                    NumeroBanco:
                      type: string
                      description: Número do banco.
                  description: Dados da conta de pagamento vinculada à proposta.
                PropostaLancamentos:
                  type: array
                  items:
                    required:
                      - CampoId
                      - DocumentoFederal
                      - NomePagamento
                    type: object
                    properties:
                      CampoId:
                        type: string
                        description: Identificador do lançamento.
                      DocumentoFederal:
                        type: string
                        description: CPF/CNPJ do destinatário.
                      NomePagamento:
                        type: string
                        description: Nome/descrição do pagamento.
                      VlrTransacao:
                        type: number
                        description: Valor do lançamento.
                        format: double
                      DtPagamento:
                        type: string
                        description: Data do pagamento (ISO 8601).
                        format: date-time
                      NumeroBanco:
                        type: string
                        description: Número do banco (para TED).
                      TipoConta:
                        type: integer
                        description: Tipo de conta (1 = Corrente, 2 = Poupança).
                        format: int32
                      Agencia:
                        type: string
                        description: Agência (para TED).
                      AgenciaDig:
                        type: string
                        description: Dígito da agência (para TED).
                      Conta:
                        type: string
                        description: Conta (para TED).
                      ContaDig:
                        type: string
                        description: Dígito da conta (para TED).
                      LinhaDigitavel:
                        type: string
                        description: Linha digitável do boleto (usar quando não for TED).
                  description: Lista de lançamentos adicionais (tarifas, seguros etc).
                CpfAgenteCredito:
                  type: string
                  description: CPF do agente crédito.
        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

````