Renegotiate one or more legado loans into a new contract
Proxies renegociar-emprestimo-legado-trabalhador (Manual 007 v1.4 §3.3): folds every contract named in contratosLegados into a single new Plataforma contract. codigoTipoRenegociacao selects Padrão (1) or Portabilidade (2); this gateway proves the structural half of the Portabilidade rules before the rail is called — numeroUnico populated only under Portabilidade, at least one item carrying it, and no two items sharing the same one — while whether the requester actually holds each legado contract, whether an existing folha (tipoContrato=2) contract was included, and whether the new rate undercuts the original are left to the rail’s own judgment (Dataprev performs no documental validation of legado contracts, §2.2.1.3). On Portabilidade (§2.2.1.3): the ported contract itself is NOT excluded automatically — exclusion is the origin bank’s own responsibility; every contract of the REQUESTER that carries no numeroUnico is excluded automatically once the operation completes; and any troco (change) is only permitted when every contract INVOLVED in the operation — including the ported one itself — is fully settled (§2.2.1.3). A SUCCESSFUL round trip is codigo SUCESSO with a non-empty numeroContrato: read codigo and errosContratosPortados in the response body — the rail can report per-legado-contract failures inside that same 200 while the new contract still averbates; any other codigo means no new contract was minted and surfaces as a 422 naming the rail’s own code. X-Idempotency is required; this operation names no idempotency pair of its own, so a retry is refused by the rail on its own terms.
Encabezados
Cuerpo
Employer inscription number: 8 (raiz, relayed as given) or 14 digits for CNPJ, 11 for CPF (matching codigoInscricaoEmpregador; §3.3.1's own '15 algarismos' is a stale maximum, see ports.ValidateNumeroInscricaoEmpregador).
^([0-9]{8}|[0-9]{11}|[0-9]{14})$"42422253000101"
CNPJ of the operator (correspondente, cooperado or similar) responsible for the operation, exactly 14 digits, unpunctuated. Optional (§3.3.1) — omitted entirely rather than sent malformed; competenciaInicioDesconto below is the other optional field on this body. Dataprev performs no documental validation of legado data (§2.2.1.3), so this shape guard is the only one the CNPJ gets before the rail is spent.
^[0-9]{14}$"99999999999962"
Respuesta
OK

