/v1. Every business route needs a bearer token.
API surface
Operator endpoints sit outside
/v1.
Authentication and tenancy
Every
/v1 route takes an OAuth2 bearer token from Lerian Access Manager. Set PLUGIN_AUTH_ENABLED=true and PLUGIN_AUTH_HOST to turn the gate on. Production requires both.
Each institution keeps its own database schema. The service reads the institution identity from the validated token, never from a request body, a header, or a path parameter.
Idempotency
Lerian CCS accepts an
Idempotency-Key header. The header is mandatory on POST /v1/batches and optional on the cancel route. A middleware caches the first response and replays it for a repeat of the same key. Keys belong to one institution, and the default retention is 7 days.
Errors
Every error body is an RFC 9457 problem document with the media type
application/problem+json. Each body carries a product code. The code values are frozen contract, so a client matches on the code, not the message text.
A route whose collaborators failed to wire answers 501.
Events
Lerian CCS publishes one business event on its own topic, with a matching dead-letter topic. The topic and the event type follow the Streaming Hub naming rule, with this service’s CloudEvents source as the namespace.
It carries the critical delivery posture. The service writes it to the transactional outbox in the same transaction as the state change. Streaming is off by default. While it is off, the service wires a no-operation emitter and publishes nothing. Lerian Streaming Hub is the delivery layer.
Lerian CCS also publishes notifications on the exchange named by
RABBITMQ_EXCHANGE.
Documents in those payloads are masked.
Integration conventions
- Headers.
CORS_ALLOWED_HEADERScarries no default. While it stays unset, a preflight response echoes the headers the browser asked for. A value you set replaces that behavior with a fixed list, so name every header your browser client sends. - Pagination. Each list route caps its own page size. A
limitof 100 or less stays within every route’s cap. - Rate limits. The limiter covers
/v1only. Export and dispatch routes carry tighter tiers. - File references. The regulatory XML stays in object storage. Only file references travel over the wire.

