Trancent Docs

Ledgers

A ledger is a fully isolated double-entry book scoped to an organization. Each ledger has its own chart of accounts, journal entries, balances, and period closes.

Ledgers and organizations are created in the Trancent dashboard at app.trancent.dev. The Service API gives you read access to ledgers and full write access to entries and period closes.

Base URL: https://api.trancent.dev — all paths below are relative to this.


List ledgers

GET /v1/ledgers

Returns all ledgers belonging to the organization associated with your API key.

Response — 200 OK

{
  "ledgers": [
    {
      "id": "01HXR...",
      "name": "Token Budget",
      "status": "active",
      "createdAt": "2026-01-15T09:00:00Z"
    }
  ]
}

Get a single ledger

GET /v1/ledgers/:ledgerId

Returns the full ledger object including status and metadata.


List chart of accounts

GET /v1/ledgers/:ledgerId/accounts
ParameterTypeDefaultDescription
activeOnlybooleanfalseWhen true, only returns accounts that are currently active

Response — 200 OK

{
  "accounts": [
    {
      "glAccountCode": "assets.token-pool",
      "name": "Token Pool",
      "active": true
    }
  ]
}

Get account balance

GET /v1/ledgers/:ledgerId/balances
ParameterTypeRequiredDescription
accountstringyesThe glAccountCode to query
currencystringnoFilter by currency code

Response — 200 OK

{
  "glAccountCode": "assets.token-pool",
  "balance": 10000,
  "currency": "USD",
  "entryCount": 1
}

Ledger states

StatusDescription
activeAccepts journal entries normally
suspendedRead-only — journal entry writes are rejected with 403
closedPermanently closed — no new entries or suspensions allowed

Ledger state transitions are managed through the Trancent dashboard. The Service API reflects the current state and enforces it on write operations.


Error responses

StatusCodeMeaning
401Invalid API key or signature
404Ledger not found or not owned by caller’s org

All errors follow the RFC 9457 problem detail format.