Registrar um empréstimo pré-existente (legado)
Atua como proxy de incluir-emprestimo-legado-trabalhador (Manual 007 v1.4 §3.1) e registra um contrato originado antes deste modelo de rede. O trabalhador permanece inelegível para novas contratações até o contrato legado ser excluído ou renegociado. A Dataprev não valida a documentação desses contratos (§2.2.1.3); a instituição responde pela veracidade dos dados. Quando codigoTipoContrato for 2 (folha), codigoInscricaoEmpregador, numeroInscricaoEmpregador e matricula são obrigatórios e o gateway valida essa condição antes da chamada. X-Idempotency é obrigatório. Uma repetição que recebe da rede o código de empréstimo já cadastrado é tratada como sucesso.
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-incluir-0001"
Corpo
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"
Resposta
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"

