Averbate a portability whose origin exclusion already ran
Performs averbar-portabilidade-trabalhador (Manual 008 §5.3): the PROPONENTE institution’s averbação of a portability, whose origin-side exclusion must already have run. The origin exclusion is a SEPARATE command at POST /v1/consignado/contracts//portabilidade/exclusao; Dataprev refuses this averbação with rule PT when the exclusion has not run and with rule PW when the portability is already closed (Manual 008 §5.3), and either refusal frees the contract number.
dataExclusaoOrigem is OPTIONAL and NOT sent to Dataprev. When the client supplies it, it is the origin exclusion date the client itself tracks, echoed here so the gateway can refuse an averbação whose 20-CALENDAR-day window (Manual 008 §4) has already passed before the rail is ever called. No calendar is consulted: the window is explicitly “corridos”. When absent, only that pre-rail window check is skipped and the rail judges the order and the window.
X-Idempotency is required as this surface’s mandatory transport replay key. A retry under the SAME key is answered from the stored rail answer instead of re-submitting to the rail. A refusal the gateway gives on its own is not stored, so a corrected body under the same key is processed. A 500, 503 or 504 that may have reached Dataprev holds the key for its 7-day TTL: that answer carries X-Idempotency-Fenced: true, and a resend under the key is refused with 422 IDEMPOTENCY_OUTCOME_UNRECORDED. A 503 whose only Dataprev code is OZ (service suspended) does not hold the key. The contract number is claimed before the call, so a resend under a new key never submits again while that outcome is open: it answers 409 while the first call may still be running, then 503 OUTCOME_UNKNOWN until the gateway settles it by reading the contract on Dataprev (Manual 005). A contract Dataprev registered is then recorded as an acceptance is; one Dataprev holds no record of frees the number.
An accepted averbação is recorded before this answer as a contract of this gateway waiting for its documentation (GET /v1/consignado/contracts//averbacao reads attachment_pending), at the competência Dataprev echoed, together with its saldo devedor (Manual 015) obligation; its contract_id is its numeroContrato. A refusal Dataprev publishes for this averbação leaves the number free. A contract number this tenant already holds, including one this route recorded, is refused 409 CONTRACT_ALREADY_REGISTERED before the rail; a number only an averbação Dataprev refused held is free, unless that averbação’s contract_id is the same number. The optional booking object books the contract: its liberated_amount is valorEmprestimo less iof_amount (the origin payoffs plus the troco), and its origins name every origin contract the purchase pays off, one entry when there is one, with its share of valorPago. A booking the lender would refuse answers 422 with the averbação’s codes before the rail. Document the contract through POST /v1/consignado/contracts//ccb-attachment exactly as an averbação: booked, with the signed CCB, the evidence pack and signature_evidence_ref, and once Dataprev accepts the documentation the Lerian lender receives consignado.contract.registered carrying portability_in once Dataprev’s status record for this portability (Manual 008 §5.4) shows exactly the origin contracts booked (each with its bank, its number and its share of valorPago, and the latest exclusion instant); without booking, the signed CCB alone and no lender fact.
Encabezados
Parámetros de ruta
Cuerpo
Worker's full name. Manual 008 §5.3.1 publishes 90 characters; the mirrored Swagger publishes maxLength 100 for the same field — the wider bound is accepted here so a value the rail itself would honour is never rejected first.
1 - 100"Trabalhador 99999999999"
Contract number being averbado, minted by the CLIENT: 2 to 15 letters or digits, without spaces, accents or symbols (Manual 008 §5.3.1 and its note [2]; the Swagger's maxLength 20 is not followed).
2 - 15^[A-Za-z0-9]+$"199971600000"
OPTIONAL. Origin exclusion date the client tracks, NEVER sent to Dataprev. When present, the gateway's own 20-calendar-day pre-rail refusal is judged against it. When absent, only that check is skipped and Dataprev judges the order (rule PT: the origin exclusion must have run).
"2026-01-01T00:00:00Z"
Respuesta
OK

