Registrar un préstamo preexistente (legado)
Esta operación actúa como proxy de incluir-emprestimo-legado-trabalhador (Manual 007 v1.4 §3.1): registra un contrato que el tenant celebró antes de que existiera el modelo de esta red. El trabajador deja de ser elegible para una nueva contratación en esta red hasta que el contrato legado sea excluido o renegociado. Dataprev no realiza validación documental de los contratos legados (§2.2.1.3); la veracidad de lo enviado es responsabilidad de la institución. Cuando codigoTipoContrato es 2 (folha), codigoInscricaoEmpregador, numeroInscricaoEmpregador y matricula pasan a ser obligatorios; esta pasarela demuestra esa condición antes de llamar a la red, ya que ni la red ni el Swagger oficial la aplican. Se requiere X-Idempotency. Una solicitud reintentada que llega al propio HX de la red (“empréstimo já cadastrado”) responde correctamente en lugar de rechazarla.
Autorizaciones
JWT bearer token issued by the identity provider.
Encabezados
Client-chosen idempotency key. REQUIRED: an absent key is 422, never a generated default.
"idem-legado-incluir-0001"
Cuerpo
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"
Respuesta
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"

