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, documents, and disbursement. It also covers contract corrections, contract lifecycle, portability in both directions, refinancing, renegotiation, and guarantees. The remaining operations cover reconciliation, funds, assignments, usage, throughput, and delivery subscriptions. Start with fetch worker margin, then use the API Reference navigation to find the remaining operation families. Each operation page comes from the develop OpenAPI contract.

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 on develop. Submit it through the authenticated HTTP operation.

Declared and operational business facts

The runtime contract contains 25 business-fact definitions, and every one of them has a named production emission site on develop. 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, redirection, and origin-side portability outcomes
  • reconciliation, repasse exceptions, and calendars
  • funds, assignment, and throughput changes
See Consignado events for the full catalog and the exact CloudEvent resource/event mapping.

Application streams

With the lib-streaming v3 contract:
  • 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 an HTTPS destination, inspect it, rotate its signing secret, test delivery, or revoke it. Treat the signing secret as write-only. 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.