Register a pre-existing (legado) loan
Proxies incluir-emprestimo-legado-trabalhador (Manual 007 v1.4 §3.1): registers a contract the tenant made BEFORE this rail’s model existed. The worker becomes ineligible for new contracting on this rail until the legado contract is excluded or renegotiated. Dataprev performs no documental validation of legado contracts (§2.2.1.3) — the veracity of what is sent is the institution’s own responsibility. When codigoTipoContrato is 2 (folha), codigoInscricaoEmpregador, numeroInscricaoEmpregador and matricula become required; this gateway proves that conditional before the rail is called, since neither the rail nor the official Swagger enforces it. X-Idempotency is required. A retried request that lands on the rail’s own HX (“empréstimo já cadastrado”) answers success rather than a refusal.
Authorizations
JWT bearer token issued by the identity provider.
Headers
Client-chosen idempotency key. REQUIRED: an absent key is 422, never a generated default.
"idem-legado-incluir-0001"
Body
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).
1, 2 2
Worker CPF, exactly 11 digits.
^[0-9]{11}$"99999999999"
End date of the legado contract, RFC 3339 UTC.
"2025-12-23T00:00:00Z"
Start date of the legado contract, RFC 3339 UTC.
"2024-09-03T00:00:00Z"
Number of the legado contract, freely chosen by the institution.
1 - 20"99999999999AL1"
Total number of instalments of the legado loan.
1 <= x <= 99915
Number of instalments already paid.
0 <= x <= 9997
valorCETMensal — Custo Efetivo Total, monthly percent decimal string.
^[0-9]+(\.[0-9]{1,2})?$"0.5"
valorEmprestimo — the legado loan's principal (decimal string, BRL).
^[0-9]+(\.[0-9]{1,2})?$"12000.00"
valorParcela — the legado loan's instalment amount (decimal string, BRL).
^[0-9]+(\.[0-9]{1,2})?$"831.34"
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).
^[0-9]+(\.[0-9]{1,2})?$"6512.46"
valorTaxaMensal — monthly interest rate, percent decimal string.
^[0-9]+(\.[0-9]{1,2})?$"0.5"
Employer inscription type: 1 CNPJ, 2 CPF. Required when codigoTipoContrato is 2 (folha).
1, 2 "1"
Matrícula assigned to the worker by the employer. Required when codigoTipoContrato is 2 (folha).
30"99999999999-A"
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).
^[0-9]{11,14}$"42422253000101"
Response
OK
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.
false
The rail's own message.
"Emprestimo legado incluido com sucesso"
The contract number the rail confirmed the operation against.
"99999999999AL1"

