Ledga
GET /reports/trial-balance

Get trial balance report

Returns the debits and credits booked to each system account, plus one line for all customer accounts, as of the end of as_of_date in the ledger's timezone: every balance-bearing posting (posted or reversed) in the layer effective before the next midnight there, as GET /accounts/{id}/balance?as_of_date= counts it. Active accounts are always listed; inactive or deleted ones only when something reached them, and their postings always count. Amounts are major-unit strings at the ledger's display precision.

Parameters

NameInTypeDescription
layer query string
enum: settled | pending | encumbrance · default: "settled"
Transaction layer to report on
as_of_date query string
date
Report as of the end of this day in the ledger's timezone. Default: today there.

Responses

200Trial balance report
{
  "success": true,
  "data": {
    "ledger_id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
    "ledger_name": "string",
    "currency": "GBP",
    "as_of_date": "2026-01-15",
    "layer": "settled",
    "accounts": [
      {
        "account_id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
        "account_code": "1000",
        "account_name": "Cash",
        "account_type": "asset",
        "normal_balance": "debit",
        "debit": "186.00",
        "credit": "54.00"
      }
    ],
    "user_accounts_rollup": {
      "account_count": 2,
      "debit": "0.00",
      "credit": "25.00"
    },
    "totals": {
      "total_debits": "240.00",
      "total_credits": "240.00",
      "is_balanced": true,
      "difference": "0.00"
    }
  }
}
401Unauthenticated
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}
403Forbidden
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}
422Validation error
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}
429Report rate limit exceeded (30 a minute per API key, 120 per ledger)
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}

Examples

curl https://ledga.io/api/v1/reports/trial-balance \
  -H "Authorization: Bearer sk_xxxxxxxx_your_secret"

← All endpoints