Skip to main content
POST
Registrar un préstamo preexistente (legado)

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

X-Idempotency
string
requerido

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

Ejemplo:

"idem-legado-incluir-0001"

Cuerpo

application/json
codigoTipoContrato
enum<integer>
requerido

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

Opciones disponibles:
1,
2
Ejemplo:

2

cpfTrabalhador
string
requerido

Worker CPF, exactly 11 digits.

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

"99999999999"

dataFimContrato
string<date-time>
requerido

End date of the legado contract, RFC 3339 UTC.

Ejemplo:

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

dataInicioContrato
string<date-time>
requerido

Start date of the legado contract, RFC 3339 UTC.

Ejemplo:

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

numeroContrato
string
requerido

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

Required string length: 1 - 20
Ejemplo:

"99999999999AL1"

numeroParcelas
integer<int64>
requerido

Total number of instalments of the legado loan.

Rango requerido: 1 <= x <= 999
Ejemplo:

15

qtdParcelasPagas
integer<int64>
requerido

Number of instalments already paid.

Rango requerido: 0 <= x <= 999
Ejemplo:

7

valorCETMensal
string
requerido

valorCETMensal — Custo Efetivo Total, monthly percent decimal string.

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

"0.5"

valorEmprestimo
string
requerido

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

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

"12000.00"

valorParcela
string
requerido

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

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

"831.34"

valorSaldoDevedor
string
requerido

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})?$
Ejemplo:

"6512.46"

valorTaxaMensal
string
requerido

valorTaxaMensal — monthly interest rate, percent decimal string.

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

"0.5"

codigoInscricaoEmpregador
enum<string>

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

Opciones disponibles:
1,
2
Ejemplo:

"1"

matricula
string

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

Maximum string length: 30
Ejemplo:

"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}$
Ejemplo:

"42422253000101"

Respuesta

OK

idempotent
boolean
requerido

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.

Ejemplo:

false

mensagem
string
requerido

The rail's own message.

Ejemplo:

"Emprestimo legado incluido com sucesso"

numeroContrato
string
requerido

The contract number the rail confirmed the operation against.

Ejemplo:

"99999999999AL1"