> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Renegociar contrato encerrado por rescisão de vínculo empregatício

> Procuradores renegociar-consignado-trabalhador (Manual 006 v1.12 §2.3): renegocia um contrato fechado na situação 15 ("Encerrado por término de vínculo") em um novo contra o novo vínculo empregatício do trabalhador. numeroContratoEncerrado deve ser uma averbação do tenant autenticado que a rede reconheceu, e deve diferir do novo número do contrato no caminho; isso é verificado aqui, antes da rede ser chamada. se o contrato fechado realmente se enquadra na situação 15, se o novo título é elegível ou inelegível apenas pelo motivo 8 e se valorParcela permanece dentro da parcela própria do contrato fechado (regra bl) são fatos de registro em tempo real dos quais este gateway não possui cópia local e fica a critério da própria rede. valorIOF é obrigatório, seguindo o Manual em vez da lista espelhada de Swagger. X-Idempotency é obrigatório.



## OpenAPI

````yaml pt/openapi/v3-current/consignado.yaml post /v1/consignado/contracts/{numero_contrato}/renegociacao
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    Superfície OpenAPI 3.1 para Lerian Consignado — Dataprev. o API cobre
    credenciais tenant e configuração de rede, margem do trabalhador, leilões e
    licitações de empréstimos, registro e ciclo de vida do contrato, confirmação
    de desembolso, portabilidade, refinanciamento, renegociação, garantias FGTS,
    reconciliação, fundos, atribuições, uso, rendimento e assinaturas de
    eventos. o material secreto é gravado no armazenamento secreto tenant e
    nunca é devolvido por nenhuma operação.
  license:
    name: Lerian Studio General License
  title: Lerian Consignado API
  version: v1.0.0
servers:
  - url: https://consignado.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: >-
      Custódia de credenciais do Dataprev e configuração pública do rail por
      tenant (upload, status, rotação, revogação, código do solicitante e URL
      base do portal do trabalhador)
    name: Credentials
  - description: >-
      Uso do gateway consignado no escopo do tenant: agregação de unidades
      faturáveis ​​com preço por competência
    name: Consignado Usage
  - description: >-
      Per-tenant plano de controle de assinatura do streaming-hub (listar,
      criar, obter, girar, revogar e testar a entrega)
    name: Subscriptions
  - description: >-
      Superfície folha de pagamento da rail Dataprev: leituras de saldo e
      autorização FGTS, execução de garantias FGTS, suspensão de contrato,
      reativação e alteração de prazo, documentos contratuais próprios da rede e
      leituras sob demanda de transações, escriturações, repasses e rescisões
      trabalhistas
    name: Consignado Rail
  - description: >-
      Superfície de comando da rede síncrona: as operações que um bancarizador
      sem o credor realizam sobre HTTP. cada um compartilha sua implementação de
      comando com o gatilho de evento de credor equivalente.
    name: Consignado Rail Commands
  - description: >-
      Confirmação de desembolso de propriedade do gateway: um banco cliente
      registrando o dinheiro que ALREADY pagou a um trabalhador. ele não cruza
      nenhuma fronteira governamental e não representa nenhuma operação
      Dataprev.
    name: Consignado Disbursement
  - description: >
      Taxa de transferência da rail Dataprev de saída de autoatendimento
      per-tenant: leia e defina o próprio requests-per-second deste tenant,
      incluindo uma pausa deliberada em zero
    name: Consignado Throughput
paths:
  /v1/consignado/contracts/{numero_contrato}/renegociacao:
    post:
      tags:
        - Consignado Rail
      summary: Renegociar contrato encerrado por rescisão de vínculo empregatício
      description: >-
        Procuradores renegociar-consignado-trabalhador (Manual 006 v1.12 §2.3):
        renegocia um contrato fechado na situação 15 ("Encerrado por término de
        vínculo") em um novo contra o novo vínculo empregatício do trabalhador.
        numeroContratoEncerrado deve ser uma averbação do tenant autenticado que
        a rede reconheceu, e deve diferir do novo número do contrato no caminho;
        isso é verificado aqui, antes da rede ser chamada. se o contrato fechado
        realmente se enquadra na situação 15, se o novo título é elegível ou
        inelegível apenas pelo motivo 8 e se valorParcela permanece dentro da
        parcela própria do contrato fechado (regra bl) são fatos de registro em
        tempo real dos quais este gateway não possui cópia local e fica a
        critério da própria rede. valorIOF é obrigatório, seguindo o Manual em
        vez da lista espelhada de Swagger. X-Idempotency é obrigatório.
      operationId: renegociarConsignadoContract
      parameters:
        - description: >-
            The NEW (renegotiated) contract number, minted by the CLIENT — the
            rail mints nothing here.
          in: path
          name: numero_contrato
          required: true
          schema:
            description: >-
              The NEW (renegotiated) contract number, minted by the CLIENT — the
              rail mints nothing here.
            examples:
              - Qwerty123456789
            maxLength: 15
            minLength: 1
            type: string
        - description: >-
            Client-chosen idempotency key. REQUIRED: an absent key is 422, never
            a generated default.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: >-
              Client-chosen idempotency key. REQUIRED: an absent key is 422,
              never a generated default.
            examples:
              - idem-renegociacao-0001
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenegociacaoBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenegociacaoOperationResponse'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    RenegociacaoBody:
      additionalProperties: false
      properties:
        codigoInscricaoEmpregador:
          description: 'Employer inscription type: 1 CNPJ, 2 CPF.'
          examples:
            - '2'
          pattern: ^[12]$
          type: string
        competenciaInicioDesconto:
          description: >-
            Payroll competência of the first deduction, yyyyMM. Optional; the
            rail assumes the current competência when omitted.
          examples:
            - '202501'
          pattern: ^[0-9]{6}$
          type: string
        cpfTrabalhador:
          description: Worker CPF, 11 digits.
          examples:
            - '27928255022'
          maxLength: 11
          minLength: 11
          pattern: ^[0-9]{11}$
          type: string
        dataFimContrato:
          description: End date of the new consignado contract, RFC 3339 UTC.
          examples:
            - '2026-01-24T00:00:00Z'
          format: date-time
          type: string
        dataInicioContrato:
          description: Start date of the new consignado contract, RFC 3339 UTC.
          examples:
            - '2025-01-24T00:00:00Z'
          format: date-time
          type: string
        dataPrimeiroDesconto:
          description: Date of the first payroll deduction, RFC 3339 UTC.
          examples:
            - '2025-01-28T00:00:00Z'
          format: date-time
          type: string
        matricula:
          description: Matrícula assigned to the worker by the employer.
          examples:
            - teste4243
          maxLength: 20
          type: string
        nomeTrabalhador:
          description: Worker's full name.
          examples:
            - testeead
          maxLength: 100
          type: string
        numeroContratoEncerrado:
          description: >-
            The PRIOR contract this renegociação replaces. Must be an averbação
            of the authenticated tenant that the rail acknowledged, and must
            differ from the new contract number in the path.
          examples:
            - Qwerty123456780
          maxLength: 15
          minLength: 1
          type: string
        numeroInscricaoEmpregador:
          description: Employer inscription number, Texto.
          examples:
            - '42422253000101'
          maxLength: 14
          type: string
        numeroParcelas:
          description: >-
            Number of instalments of the new contract, capped at the manual's
            own published range 1 to 99 (Manual 006 §2.3.2 line 748).
          examples:
            - 8
          format: int64
          maximum: 99
          minimum: 1
          type: integer
        valorCETAnual:
          description: valorCETAnual — Custo Efetivo Total, annual percent decimal string.
          examples:
            - '0.20'
          maxLength: 13
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
        valorCETMensal:
          description: >-
            valorCETMensal — Custo Efetivo Total, monthly percent decimal
            string.
          examples:
            - '0.10'
          maxLength: 13
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
        valorEmprestimo:
          description: >-
            valorEmprestimo — the new contract's principal (decimal string,
            BRL).
          examples:
            - '3000.00'
          maxLength: 13
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
        valorIOF:
          description: >-
            valorIOF — the IOF charged, in reais (decimal string, BRL).
            Obrigatório on the manual even though the mirrored Swagger's
            required list omits it.
          examples:
            - '0.10'
          maxLength: 13
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
        valorLiberado:
          description: >-
            valorLiberado — amount delivered to the worker (decimal string,
            BRL).
          examples:
            - '2000.00'
          maxLength: 13
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
        valorParcela:
          description: >-
            valorParcela — the new contract's instalment amount (decimal string,
            BRL). Must not exceed the closed contract's own instalment (regra
            BL) — a comparison this gateway cannot make locally and leaves to
            the rail.
          examples:
            - '400.00'
          maxLength: 13
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
        valorTaxaAnual:
          description: valorTaxaAnual — annual interest rate, percent decimal string.
          examples:
            - '0.30'
          maxLength: 13
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
        valorTaxaMensal:
          description: valorTaxaMensal — monthly interest rate, percent decimal string.
          examples:
            - '0.10'
          maxLength: 13
          pattern: ^[0-9]+(\.[0-9]{1,2})?$
          type: string
      required:
        - numeroContratoEncerrado
        - cpfTrabalhador
        - matricula
        - nomeTrabalhador
        - codigoInscricaoEmpregador
        - numeroInscricaoEmpregador
        - dataInicioContrato
        - dataFimContrato
        - dataPrimeiroDesconto
        - numeroParcelas
        - valorLiberado
        - valorEmprestimo
        - valorParcela
        - valorIOF
        - valorTaxaAnual
        - valorTaxaMensal
        - valorCETAnual
        - valorCETMensal
      type: object
    RenegociacaoOperationResponse:
      additionalProperties: false
      properties:
        competenciaInicioDesconto:
          description: Payroll competência of the first deduction, yyyyMM.
          examples:
            - '202501'
          type: string
        hashOperacao:
          description: The rail's own identity for this operation.
          examples:
            - '9598435'
          type: string
        mensagem:
          description: The rail's own message.
          examples:
            - Inclusão efetuada com sucesso
          type: string
        numeroContrato:
          description: The new contract's number, as confirmed by the rail.
          examples:
            - Qwerty123456789
          type: string
      required:
        - mensagem
        - numeroContrato
        - competenciaInicioDesconto
        - hashOperacao
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````