Developers
The ledger is an API.
Core ledger data (chart of accounts, journal entries, balances, and trial balance) is available through a token-authenticated API for every tenant.
The parts that are hard to get right in financial software — an immutable audit trail, permission checks that actually hold at the write layer, per-tenant data partitioning — are already built. You get them by calling an API, not by building a ledger from scratch.
- Event-sourced core: posted entries are recorded as events, and corrections create a related reversing entry
- RBAC enforced server-side: permission checks happen at the command layer
- Architecture decisions: the notes below explain how the ledger is built and how the endpoints relate to it
Quick Start
Authenticate and Query
Every service token is issued from your account settings and binds to api.ledgerwriter.com. Send it as a Bearer token.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.ledgerwriter.com/ledger-accountsRead This First
Architecture and Endpoints
The architecture decisions explain how the ledger is built and how the API supports it.
Event Sourcing
The core ledger domain uses aggregates, commands, events, and projections. Posted entries are recorded as events.
Auth & Identity (CRUD)
The customer-auth mechanism and RBAC role matrix enforce permissions at the command layer.
Tenant Data Partitioning
How LedgerWriter partitions tenant data and scopes access to each tenant.
SOX/GAAP Mapping
How the core ledger controls relate to selected SOX and GAAP considerations.
Multi-Company Access
How one person can hold access to several tenants while each session stays scoped to one tenant.
Consolidated Statements
How consolidation across corporate ownership handles investment elimination and non-controlling interest.
Resource Reference
What This API Actually Exposes
Four read endpoints and one write endpoint. Every command goes through /commands with a type and payload, using the same command vocabulary as the app.
| Method | Path | What it does |
|---|---|---|
GET | /ledger-accounts | Chart of accounts for the token's tenant |
GET | /journal-entries | Posted and pending journal entries |
GET | /account-balances | Current balance per account |
GET | /reports/trial-balance | Trial balance report |
POST | /commands | Every write goes through this one endpoint as { type, payload }. Six command types today: OpenLedgerAccount, RenameLedgerAccount, PostJournalEntry, ReverseJournalEntry, ApproveJournalEntry, RejectJournalEntry. |
Every error response is JSON, with a message field included when there's more detail to give:
{ "error": "CODE", "message": "..." }| Status | Meaning |
|---|---|
401 | Missing or invalid token |
403 | Token role does not have permission for the request |
400 | Invalid request, including an unrecognized command |
404 | Requested account or journal entry was not found |
409 | Command conflicts with the current record state |
500 | Unexpected server error |
Who Builds on This
Audit / CPA Firms
Pull client trial balances and journal-entry history through the API.
Finops / Controller Teams
Query current account balances and journal entries through the API.
Compliance Tooling Vendors
Build on a consistent API shape across LedgerWriter tenants.