Axiomatic
Ledger

Subledgers

Subledger management and batch posting

Authentication

Authenticate with Authorization: Bearer ak_... — see API keys. Entity-scoped routes use entityId in the query or body; a mismatched entityId returns 403.

Endpoints

MethodPathDescription
GET/api/subledgers?entityId=List subledgers
GET/api/subledgers?entityId=&id=Get subledger detail with transactions
POST/api/subledgersCreate subledger or post batch

List subledgers

GET /api/subledgers?entityId={entityId}

Returns an array of subledgers for the entity.

[
  {
    "id": "sl_abc123",
    "name": "AR Subledger",
    "type": "accounts_receivable",
    "bookId": "book_xyz"
  }
]

Subledger detail

GET /api/subledgers?entityId={entityId}&id={subledgerId}

Returns subledger with nested transactions.

Create / post batch

POST /api/subledgers

Create subledger — body: { "entityId", "name", "type", "bookId" }

Post batch — body: { "entityId", "action": "post-batch", "subledgerId", "entries": [...] }