Renegociar um ou mais empréstimos legados em um novo contrato
Atua como proxy de renegociar-emprestimo-legado-trabalhador (Manual 007 v1.4 §3.3) e consolida os contratos indicados em contratosLegados em um novo contrato. codigoTipoRenegociacao seleciona o fluxo padrão (1) ou portabilidade (2). Antes de chamar a rede, o gateway valida a estrutura da portabilidade: numeroUnico só pode aparecer nesse fluxo, ao menos um item deve informá-lo e dois itens não podem compartilhar o mesmo valor. A Dataprev continua responsável por validar titularidade, presença de contrato de folha e redução da taxa. Na portabilidade, o contrato portado não é excluído automaticamente; isso cabe ao banco de origem. Os contratos da instituição solicitante sem numeroUnico são excluídos após a conclusão, e só pode haver troco quando todos os contratos envolvidos estiverem liquidados. Uma resposta bem-sucedida contém codigo SUCESSO e numeroContrato não vazio; errosContratosPortados pode relatar falhas por contrato mesmo com o novo contrato averbado. Outros códigos retornam 422 com o código da rede. X-Idempotency é obrigatório.
Autorizações
JWT bearer token issued by the identity provider.
Cabeçalhos
Client-chosen idempotency key. REQUIRED: an absent key is 422, never a generated default.
"idem-legado-renegociar-0001"
Corpo
Employer inscription type: 1 CNPJ, 2 CPF.
1, 2 "1"
1 = Padrão; 2 = Portabilidade. Portabilidade requires at least one contratoLegado carrying numeroUnico; Padrão forbids numeroUnico on every item.
1, 2 1
Every legado contract folded into this renegociação (§3.3.1, Obrigatório=Sim).
1Worker CPF, exactly 11 digits.
^[0-9]{11}$"99999999999"
End date of the NEW consignado contract, RFC 3339 UTC.
"2026-06-23T00:00:00Z"
Start date of the NEW consignado contract, RFC 3339 UTC.
"2025-04-03T00:00:00Z"
Date of the first payroll deduction of the NEW contract, RFC 3339 UTC.
"2025-04-23T00:00:00Z"
Matrícula assigned to the worker by the employer. Cannot be blank or whitespace-only.
30^\S(.*\S)?$"99999999999-A"
Worker's full name (Manual 007 §3.3.1 publishes 90 characters — the mirrored Swagger's 100 is not the bound this gateway enforces). Cannot be blank or whitespace-only.
90^\S(.*\S)?$"Trabalhador 99999999999"
The NEW contract's number, minted by the CLIENT. 1 to 15 alphanumeric characters, no diacritics (§3.3.1 + its footnote 3).
1 - 15^[A-Za-z0-9]+$"99999999999AN1"
Employer inscription number: 14 digits for CNPJ, 11 for CPF (matching codigoInscricaoEmpregador; §3.3.1's own '15 algarismos' is a stale maximum, see ports.ValidateNumeroInscricaoEmpregador).
^[0-9]{11,14}$"42422253000101"
Total number of instalments of the NEW contract.
1 <= x <= 99915
valorCETAnual — Custo Efetivo Total, annual percent decimal string.
^[0-9]+(\.[0-9]{1,2})?$"4.91"
valorCETMensal — Custo Efetivo Total, monthly percent decimal string.
^[0-9]+(\.[0-9]{1,2})?$"0.4"
valorEmprestimo — the new contract's principal (decimal string, BRL).
^[0-9]+(\.[0-9]{1,2})?$"12000.00"
valorIOF — the IOF charged, in reais (decimal string, BRL). Required by the manual despite the mirrored Swagger's required list omitting it.
^[0-9]+(\.[0-9]{1,2})?$"0.00"
valorLiberado — amount delivered to the worker (decimal string, BRL). Required by the manual despite the mirrored Swagger's required list omitting it.
^[0-9]+(\.[0-9]{1,2})?$"12000.00"
valorParcela — the new contract's instalment amount (decimal string, BRL).
^[0-9]+(\.[0-9]{1,2})?$"825.10"
valorTaxaAnual — annual interest rate, percent decimal string. Must stay below the original legado contract's own rate — a comparison this gateway holds no local record of and leaves to the rail.
^[0-9]+(\.[0-9]{1,2})?$"4.91"
valorTaxaMensal — monthly interest rate, percent decimal string.
^[0-9]+(\.[0-9]{1,2})?$"0.4"
CNPJ of the operator (correspondente, cooperado or similar) responsible for the operation, exactly 14 digits, unpunctuated. Optional (§3.3.1) — omitted entirely rather than sent malformed; competenciaInicioDesconto below is the other optional field on this body. Dataprev performs no documental validation of legado data (§2.2.1.3), so this shape guard is the only one the CNPJ gets before the rail is spent.
^[0-9]{14}$"99999999999962"
Payroll competência of the first deduction, yyyyMM. Optional; the rail assumes the current competência when omitted.
^[0-9]{6}$"202504"
Resposta
OK
The rail's own outcome code — a closed enum of roughly 290 values including SUCESSO. NOT redundant with the 200 status: read this field.
"SUCESSO"
Payroll competência of the first deduction, yyyyMM.
"202504"
The rail's own message.
"Renegociacao efetuada com sucesso"
The new contract's number, as confirmed by the rail.
"99999999999AN1"
Top-level errors, if any.
Per-legado-contract failures, if any. A non-empty list here does NOT mean the new contract failed to averbate.

