Skip to main content
PUT
Remove a previously registered legado loan

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

X-Idempotency
string
required

Client-chosen idempotency key. REQUIRED: an absent key is 422, never a generated default.

Example:

"idem-legado-excluir-0001"

Path Parameters

numero_contrato
string
required

Number of the legado contract to remove.

Required string length: 1 - 20
Example:

"99999999999AL1"

Body

application/json
cpfTrabalhador
string
required

Worker CPF, exactly 11 digits.

Pattern: ^[0-9]{11}$
Example:

"99999999999"

motivoExclusao
enum<integer>
required

Reason for the exclusion: 1 desistência, 2 falecimento, 3 liquidação antecipada, 7 ação judicial, 8 fraude, 9 outros. The set has holes at 4, 5 and 6 — the manual's own apêndice §4.1.

Available options:
1,
2,
3,
7,
8,
9
Example:

9

Response

OK

idempotent
boolean
required

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.

Example:

false

mensagem
string
required

The rail's own message.

Example:

"Emprestimo legado incluido com sucesso"

numeroContrato
string
required

The contract number the rail confirmed the operation against.

Example:

"99999999999AL1"