Command and read surfaces
Use the authenticated HTTP API for client commands and queries. The API separates commands from reads. Each client operation requires an authorization action and runs in the caller’s tenant. Follow the operation’s idempotency requirements. Retries after timeouts are normal and must reuse the same business identity. A mounted operation is not proof that a specific deployment wires its Dataprev adapter. An unavailable rail integration returns501 Not Implemented for that request instead of disappearing from the API. The capabilities operation reports which operation families your deployment reaches. Registering the B3 instrument code of a confirmed contract does not call Dataprev, so it needs no rail switch.
The Lender command stream remains available for the supported integration commands. It is not a replacement for the complete HTTP surface. See Consignado events.
Scheduled workers
The gateway runs sixteen scheduled loops. They share delayed first execution, stable per-replica staggering, panic isolation, and graceful shutdown. Every loop except the auction fast lane also runs non-overlapping passes with positive jitter.
Thirteen of the sixteen take their cadence from environment configuration and need a restart to change. The auction fast lane, bid payload cleanup, and proposal witness read their cadence through the Systemplane and take effect on the next delay.
Averbação recovery and rail-command recovery exist because a rail command can leave its outcome unestablished: the process died mid-call, or the rail never answered. They converge that state against the rail’s own registry instead of losing it. Bid reconduction resends a bid whose rail answer was lost, under its original proposal number. Each resend uses the tenant’s rail budget. The three loops are off by default. Enable the two recovery loops in any deployment that submits averbações or rail commands.
When Dataprev refuses the documentation, the request answers
422 with Dataprev’s codes in upstream, and the contract returns to attachment_pending. Send corrected documentation under a new X-Idempotency key, or exclude the contract. When the call ends without a verdict, such as a timeout, a Dataprev 5xx, or an unusable receipt, the request answers 503 or 504. The contract also returns to attachment_pending: send the same documentation again, under the same key or a new one. The averbação read shows the newest attempt that Dataprev did not accept in last_documentation_close.
A CCB attachment cut off mid-call stays in attachment_invoking until its attachment_invocation_deadline_at. After that instant, the next documentation or exclusion for the contract takes over the call. Once the gateway records a contract’s documentation, its exclusion answers 409 EXCLUSION_DOCUMENTATION_UNDERWAY until the contract is confirmed, even while it shows attachment_pending. In that state, send the same documentation again to complete it.
Once a month, Dataprev closes for its competência turnover and refuses requests. Four loops pause for that tenant when one of them meets that refusal. They are auction discovery, the auction fast lane, portability discovery, and bid reconduction. The pause lasts 5 minutes, then 15, then 30 for each later refusal. Averbação recovery, rail-command recovery, and reconciliation do not wait out that pause. Each of their passes stops calling Dataprev at the refusal and tries again on the next pass.
Client requests still reach Dataprev and receive its refusal. The scheduled-jobs report shows paused_until for a paused loop. On Lerian Cloud, the gateway publishes consignado.rail.paused once per turnover and consignado.rail.resumed when Dataprev answers again.
Rail windows
Rail defaults and constraints include:- a 24-hour loan-auction validity window that Dataprev supplies and the gateway does not configure
- a 72-hour portability-request lookback
- 20 calendar days from the origin exclusion to register an inbound portability, when the request names the exclusion date
- 7 business days to reverse refinancing
- 7 days after an averbação to send its documentation through the CCB attachment. Find the averbações still waiting with
GET /v1/consignado/averbacao-operations?status=attachment_pending, and readdocumentation_due_atanddocumentation_overdueon each one. An averbação you asked to exclude also stays inattachment_pending. Its documentation answers409 AVERBACAO_EXCLUDEDunless Dataprev rejected the exclusion. Before you send it, readGET /v1/consignado/contracts/{numero_contrato}/exclusionwith the tenant’s own credential. A fund or originador credential cannot read it. - a 48-hour auction-discovery window, with a five-minute clock-skew allowance
Throughput and pacing
Dataprev traffic is paced per tenant. The throughput API sets the tenant’s rate, from 0 to 25 requests per second, and no setting raises that ceiling. A tenant with no stored rate runs at 3 requests per second. A stored value of0 pauses rail traffic for that tenant.
Reconciliation safety
Bookkeeping and repasse reads are independent. One failing source must not suppress the other. Expected repasses can emit three states:consignado.repasse.overdue: the expected movement is lateconsignado.repasse.resolved: the movement arrived after an overdue alarmconsignado.repasse.unobserved: the gateway cannot currently prove presence or absence
fresh.
Credentials and artifacts
Rotate the tenant certificate, OAuth secret, requester code, and portal URL through the credentials API. Local certificate-file variables are a development fallback, not a substitute for tenant custody in managed deployments. When Dataprev refuses the tenant’s OAuth client credentials, operations that reach Dataprev answer409 DATAPREV_CREDENTIAL_REJECTED. The averbação and the CCB attachment answer it before they reserve anything. The exclusion does not: it answers with the operation parked in outcome_unknown. A command that answers RAIL_COMMAND_* codes answers 409 and also parks in outcome_unknown. An FGTS guarantee execution and a bid also answer 409 and park in unknown.
Correct the credentials, and reads work again. Send a refused averbação or CCB attachment again under the same key. To resume a parked bid, send it again under the same key. Any other parked write does not run again under its key: contact Lerian with the contract number. Revocation is permanent: for a revoked tenant, rail operations and credential uploads answer 409 DATAPREV_CREDENTIAL_REVOKED.
Registering a worker portal base URL is optional, for the tenant and for each originador. See Discover auctions and submit proposals for the order in which the gateway selects a portal.
CCB and rail artifacts use the configured object store. Keep the bucket private and deliver content only through the authenticated artifact operation.
The averbação carries no document, and a body of 1 MiB or more answers 413. The CCB attachment accepts a signed CCB and, after an averbação with the booking block, a biometrics pack. The base64 text of each is up to 8 MiB. A contract import that carries these documents follows the same limits. A contract correction accepts a corrected resource whose base64 text is up to 8 MiB.

