Skip to main content
POST
Renegotiate one or more legado loans into a new contract

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

X-Idempotency
string
required

Client-chosen idempotency key. REQUIRED: an absent key is 422, never a generated default.

Example:

"idem-legado-renegociar-0001"

Body

application/json
codigoInscricaoEmpregador
enum<string>
required

Employer inscription type: 1 CNPJ, 2 CPF.

Available options:
1,
2
Example:

"1"

codigoTipoRenegociacao
enum<integer>
required

1 = Padrão; 2 = Portabilidade. Portabilidade requires at least one contratoLegado carrying numeroUnico; Padrão forbids numeroUnico on every item.

Available options:
1,
2
Example:

1

contratosLegados
object[] | null
required

Every legado contract folded into this renegociação (§3.3.1, Obrigatório=Sim).

Minimum array length: 1
Example:
cpfTrabalhador
string
required

Worker CPF, exactly 11 digits.

Pattern: ^[0-9]{11}$
Example:

"99999999999"

dataFimContrato
string<date-time>
required

End date of the NEW consignado contract, RFC 3339 UTC.

Example:

"2026-06-23T00:00:00Z"

dataInicioContrato
string<date-time>
required

Start date of the NEW consignado contract, RFC 3339 UTC.

Example:

"2025-04-03T00:00:00Z"

dataPrimeiroDesconto
string<date-time>
required

Date of the first payroll deduction of the NEW contract, RFC 3339 UTC.

Example:

"2025-04-23T00:00:00Z"

matricula
string
required

Matrícula assigned to the worker by the employer. Cannot be blank or whitespace-only.

Maximum string length: 30
Pattern: ^\S(.*\S)?$
Example:

"99999999999-A"

nomeTrabalhador
string
required

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.

Maximum string length: 90
Pattern: ^\S(.*\S)?$
Example:

"Trabalhador 99999999999"

numeroContrato
string
required

The NEW contract's number, minted by the CLIENT. 1 to 15 alphanumeric characters, no diacritics (§3.3.1 + its footnote 3).

Required string length: 1 - 15
Pattern: ^[A-Za-z0-9]+$
Example:

"99999999999AN1"

numeroInscricaoEmpregador
string
required

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

Pattern: ^[0-9]{11,14}$
Example:

"42422253000101"

numeroParcelas
integer<int64>
required

Total number of instalments of the NEW contract.

Required range: 1 <= x <= 999
Example:

15

valorCETAnual
string
required

valorCETAnual — Custo Efetivo Total, annual percent decimal string.

Pattern: ^[0-9]+(\.[0-9]{1,2})?$
Example:

"4.91"

valorCETMensal
string
required

valorCETMensal — Custo Efetivo Total, monthly percent decimal string.

Pattern: ^[0-9]+(\.[0-9]{1,2})?$
Example:

"0.4"

valorEmprestimo
string
required

valorEmprestimo — the new contract's principal (decimal string, BRL).

Pattern: ^[0-9]+(\.[0-9]{1,2})?$
Example:

"12000.00"

valorIOF
string
required

valorIOF — the IOF charged, in reais (decimal string, BRL). Required by the manual despite the mirrored Swagger's required list omitting it.

Pattern: ^[0-9]+(\.[0-9]{1,2})?$
Example:

"0.00"

valorLiberado
string
required

valorLiberado — amount delivered to the worker (decimal string, BRL). Required by the manual despite the mirrored Swagger's required list omitting it.

Pattern: ^[0-9]+(\.[0-9]{1,2})?$
Example:

"12000.00"

valorParcela
string
required

valorParcela — the new contract's instalment amount (decimal string, BRL).

Pattern: ^[0-9]+(\.[0-9]{1,2})?$
Example:

"825.10"

valorTaxaAnual
string
required

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.

Pattern: ^[0-9]+(\.[0-9]{1,2})?$
Example:

"4.91"

valorTaxaMensal
string
required

valorTaxaMensal — monthly interest rate, percent decimal string.

Pattern: ^[0-9]+(\.[0-9]{1,2})?$
Example:

"0.4"

cnpjOperador
string

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.

Pattern: ^[0-9]{14}$
Example:

"99999999999962"

competenciaInicioDesconto
string

Payroll competência of the first deduction, yyyyMM. Optional; the rail assumes the current competência when omitted.

Pattern: ^[0-9]{6}$
Example:

"202504"

Response

OK

codigo
string
required

The rail's own outcome code — a closed enum of roughly 290 values including SUCESSO. NOT redundant with the 200 status: read this field.

Example:

"SUCESSO"

competenciaInicioDesconto
string
required

Payroll competência of the first deduction, yyyyMM.

Example:

"202504"

mensagem
string
required

The rail's own message.

Example:

"Renegociacao efetuada com sucesso"

numeroContrato
string
required

The new contract's number, as confirmed by the rail.

Example:

"99999999999AN1"

erros
object[] | null

Top-level errors, if any.

errosContratosPortados
object[] | null

Per-legado-contract failures, if any. A non-empty list here does NOT mean the new contract failed to averbate.