Skip to main content
POST
Register a pre-existing (legado) loan

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-incluir-0001"

Body

application/json
codigoTipoContrato
enum<integer>
required

1 = empréstimo não consignado sem garantia; 2 = empréstimo com descontos em folha de pagamento. When 2, codigoInscricaoEmpregador, numeroInscricaoEmpregador and matricula become required (§3.1.1, a condition the official Swagger does not express).

Available options:
1,
2
Example:

2

cpfTrabalhador
string
required

Worker CPF, exactly 11 digits.

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

"99999999999"

dataFimContrato
string<date-time>
required

End date of the legado contract, RFC 3339 UTC.

Example:

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

dataInicioContrato
string<date-time>
required

Start date of the legado contract, RFC 3339 UTC.

Example:

"2024-09-03T00:00:00Z"

numeroContrato
string
required

Number of the legado contract, freely chosen by the institution.

Required string length: 1 - 20
Example:

"99999999999AL1"

numeroParcelas
integer<int64>
required

Total number of instalments of the legado loan.

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

15

qtdParcelasPagas
integer<int64>
required

Number of instalments already paid.

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

7

valorCETMensal
string
required

valorCETMensal — Custo Efetivo Total, monthly percent decimal string.

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

"0.5"

valorEmprestimo
string
required

valorEmprestimo — the legado loan's principal (decimal string, BRL).

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

"12000.00"

valorParcela
string
required

valorParcela — the legado loan's instalment amount (decimal string, BRL).

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

"831.34"

valorSaldoDevedor
string
required

valorSaldoDevedor — present value of the remaining instalments, base date the day of the request (Manual 007 §3.1.1's OWN definition, not Manual 015's — decimal string, BRL).

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

"6512.46"

valorTaxaMensal
string
required

valorTaxaMensal — monthly interest rate, percent decimal string.

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

"0.5"

codigoInscricaoEmpregador
enum<string>

Employer inscription type: 1 CNPJ, 2 CPF. Required when codigoTipoContrato is 2 (folha).

Available options:
1,
2
Example:

"1"

matricula
string

Matrícula assigned to the worker by the employer. Required when codigoTipoContrato is 2 (folha).

Maximum string length: 30
Example:

"99999999999-A"

numeroInscricaoEmpregador
string

Employer inscription number: 14 digits for CNPJ, 11 for CPF (matching codigoInscricaoEmpregador; §3.1.1's own '15 algarismos' is a stale maximum, see ports.ValidateNumeroInscricaoEmpregador). Required when codigoTipoContrato is 2 (folha).

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

"42422253000101"

Response

OK

idempotent
boolean
required

True when the rail answered its own HX (incluir)/HY (excluir) idempotency code rather than fresh confirmation. On excluir (HY) this means the contract is confirmed gone, which is sound. On incluir (HX) it means ONLY that this numeroContrato is already registered on the rail — the values THIS request carried (valorEmprestimo, valorParcela, etc.) were NOT compared against what is stored. To correct a legado registered with wrong values, exclude it (motivo 9) and include it again; do not rely on idempotent:true as proof the stored values match.

Example:

false

mensagem
string
required

The rail's own message.

Example:

"Emprestimo legado incluido com sucesso"

numeroContrato
string
required

The contract number the rail confirmed the operation against.

Example:

"99999999999AL1"