Skip to main content
Use the HTTP API for the complete client-facing Consignado surface. Use CloudEvents to consume immutable business facts and, when integrating through Lender, to send the supported commands. The two interfaces are complementary. The event stream is not the authority for every rail operation.

HTTP API

The API covers tenant credentials, margin and worker data, auctions and bids, registration and import, documents, and disbursement. It also covers contract corrections, contract lifecycle, portability in both directions, refinancing, renegotiation, and guarantees. The remaining operations cover reconciliation, outstanding balances, funds, originadores, assignments, usage, throughput, and delivery subscriptions. Start with fetch worker margin, then use the API Reference navigation to find the remaining operation families.

Lender commands consumed

The gateway reads one application command stream and dispatches by CloudEvent source and event key. Selection is by key, never by topic name. The gateway quarantines a key it does not handle to its own dead-letter queue instead of skipping it. Averbação is not a Lender command. Submit it through the authenticated HTTP operation.

Declared and operational business facts

There is no per-fact toggle. The published fact set is a projection of the runtime catalog. A deployment either emits a fact or does not run the flow that produces it. Configuration decides what a deployment emits, never the fact. Inbound portability discovery is off by default. The consignado.portability_proposal.received fact appears only where that flow is enabled. It is committed atomically with its durable marker when the scheduled portability-discovery poller finds a live offer. The same holds for any rail command a deployment does not run. The operational facts cover:
  • auction requests and inbound portability proposals
  • margin, employment, and absence reports
  • proposal acceptance, contract registration (consignado.contract.registered, including signed CCB artifact evidence), disbursement, and correction availability
  • averbação, exclusion, and origin-side portability outcomes
  • reconciliation, repasse exceptions, and calendars
  • assignment and throughput changes
  • rail pause and resume for a tenant during the Dataprev competência turnover, in multi-tenant mode
See Consignado events for the full catalog and the exact CloudEvent resource/event mapping.

Application streams

The gateway uses one topic per application:
  • facts go to lerian.streaming.consignado-gw
  • the gateway reads Lender commands from lerian.streaming.lender.commands
  • fact types use studio.lerian.consignado-gw.<resource>.<event>
  • command types use studio.lerian.lender.<resource>.<event>
Route by CloudEvent source, resource type, and event type. Do not infer an event from a topic name alone.

Delivery subscriptions

Use the subscription API to register a delivery destination, read its delivery health, rotate its signing secret, test delivery, or revoke it. Only the create and rotate answers carry the signing secret. No read returns it. Reads show a masked destination. Only the admin role can read the full destination, because a webhook path can carry a callback token. A successful test proves delivery to the configured endpoint. It does not change the at-least-once semantics of business events.

Reliability contract

  • Business facts enter a transactional outbox before publication.
  • Delivery is at least once.
  • Deduplicate by (ce-source, ce-id).
  • Monetary values travel as decimal strings, never binary floating point.
  • Payload fields use snake_case. Timestamps use UTC RFC 3339.
  • A missing required business identifier is terminal and goes to the consumer DLQ rather than to Dataprev.