Fetch a worker's available consignable margin
Opens or reuses the worker’s authorization and reads available payroll margin — the rail’s autorizar-consulta-dados-trabalhador (Manual 002 v1.15 §3.1) and consultar-dados-trabalhador (Manual 002 v1.15 §3.3) behind ONE operation, because the adapter performs them as one. POST, not GET: it opens a consent, and the consent evidence plus the CPF must travel in a body rather than in a path or query string. The worker’s authorization token is NEVER returned. A consignado.margin.fetched fact is emitted on this path, so a client integrating by API keeps its other consumers fed.
CONSENT WINDOW (Manual 002 v1.15 §5.6). dataHoraAutorizacaoDigital starts two clocks, measured in calendar days from the worker’s signature: the authorization may be CONSULTED for 30 days, and a request may be MADE against it for 45. Both boundaries are INCLUSIVE — the instant exactly 30 or 45 days after the signature is still inside its window, and only the next nanosecond is outside.
Outside either window the gateway refuses LOCALLY, before a byte reaches the rail: 422 with code CLT-0006 and a detail telling you to obtain a fresh worker authorization. THAT REFUSAL IS NOT RETRYABLE. Repeating the request performs the very read the lapsed authorization withdrew; only new authorization evidence makes it succeed. A dataHoraAutorizacaoDigital carrying a non-UTC offset, or dated ahead of the gateway’s clock, is the same 422 with a different detail — correct the timestamp; the worker’s consent is not in question.
Contrast the rail’s OWN consent rejection (Dataprev EX/IV on a stale tokenAutorizacao): that is 503 and IS retryable, because the gateway drops the cached token and the next attempt opens a fresh consent from the same evidence.
The registration block (worker.motherName, the nationality, CBO, employer name, employer activity start and CNAE) falls outside the model authorization term of Manual 002 §5.6, which §3.1.1 makes a model the bank adapts, so the bank’s own consent instrument must cover those fields.
Partner route: the text above describes the party’s own route. Here the register id in the path names the party: it must be in the partner credential’s scope and registered under the caller’s tenant, and the call runs as that party, exactly as the party’s own credential would. An originador the bancarizador deactivated is refused 403 ORIGINADOR_DEACTIVATED until it is reactivated.
Parámetros de ruta
Cuerpo
Respuesta
OK
How many consignados already sit active or suspended on this bond. Manual 002 v1.15 §3.3.2 p.17 publishes the ceiling: 9 per employment bond, so a bond at 9 takes no tenth however much margin it shows. Absent when the rail said nothing; 0 is a live count.
2
Optional. Absent when the read carried no alert. One element per eSocial event Dataprev collected for this bond (absence or termination); Dataprev collects them DAILY, so they are not real time. Branch on typeCode. The bancarizador also receives each alert as a consignado.afastamento.reported fact; an originador receives them only on this read.
WHY the rail refused (Manual 002 v1.15 §3.3.2 code table p.16: 1 legacy loan in eSocial, 2 legacy loan reported by the institution, 3 zero remuneration, 4 bond has a termination date, 5 no remuneration in the last competência, 6 invalid labour regime, 7 invalid worker category, 8 bond whose previous loan closed on termination, 9 employer not in the programme). The codes are not one kind: 3 and 5 clear with the next payroll competência, 4 never clears.
The eSocial termination-reason code, relayed VERBATIM and never interpreted. Manual 002 v1.15 §3.3.2 p.15 types it "Número, 2 algarismos" and points at the eSocial "Motivos de Desligamento" table rather than reproducing it; JSON has no leading-zero literal, so a code beginning with 0 arrives one digit short and travels that way. Zero-pad to the published width before looking it up.
"2"

