Paginated journal

  GET /ledger/v1/journal
  

Newest-first pages of posted transaction events. Use it to load history before subscribing to the live stream.

ParameterRequiredNotes
limitnoDefault 50, hard cap 200
beforenoGlobal-sequence cursor; returns older events. Omit for the latest page

Response — 200 OK

  {
  "events": [ { "…": "TransactionEventDto — see below" } ],
  "maxGlobalSeq": 1042
}
  

Pass maxGlobalSeq as the WebSocket fromSequence to continue seamlessly from where the history ends.

Live event stream

  WS ws://localhost:8081/ledger/v1/events
  

The WebSocket is open at the HTTP layer; authentication happens in the subscribe message.

Subscribe (client → server)

  {
  "action": "subscribe",
  "tenantId": "org-84120557",
  "token": "<JWT>",
  "fromSequence": 1042
}
  

fromSequence is optional — omit it to receive only new events.

Messages (server → client)

type is one of CONNECTED, EVENT, ERROR, HEARTBEAT:

  { "type": "CONNECTED", "message": "Subscribed to events from sequence 1042" }
  
  { "type": "EVENT", "data": { "…": "TransactionEventDto" } }
  

TransactionEventDto

Shared by the journal endpoint and the stream:

  {
  "eventId": "9c2e4f6a-…",
  "tenantId": "org-84120557",
  "transactionId": "7d9e1a4c-…",
  "eventType": "SalesInvoice",
  "transactionDate": "2026-07-01",
  "unit": "EUR",
  "entries": [
    { "accountReference": "1500-receivables", "entryType": "DEBIT",
      "amountMinorUnits": 125000, "dimensions": { "CUSTOMER": "cust-001" } }
  ],
  "dimensions": [ { "dimensionType": "PROJECT", "valueReference": "0b9f…" } ],
  "recordedAt": "2026-07-01T09:14:03.512Z",
  "sequence": 5,
  "amountMinorUnits": 125000,
  "globalSeq": 1043
}