Skip to content

Get the trial balance

The ledger.trial_balance operation: GET /api/v1/ledger/trial_balance in the REST API and the ledger_trial_balance tool in the MCP server.

GET/api/v1/ledger/trial_balance

Returns the trial balance of the legal entity's ledger in the mode of the request: for each currency, every account with a non-zero posted balance, its balance on the debit or the credit side (integer micros), and the debit and credit totals. The totals of a currency must be equal (balanced); difference is debits minus credits. All brands of the entity are included.

Without asOf, the balances are the accounts' current posted balances. With asOf (YYYY-MM-DD), they are recomputed from the posted transactions effective up to the end of that day (UTC). Pending and voided transactions never count. Filter with currency.

At a glance

  • REST: GET /api/v1/ledger/trial_balance
  • MCP tool: ledger_trial_balance
  • Operation ID: ledger.trial_balance
  • Scope: Legal entity
  • Permission: ledger:read
  • Risk tier: read
  • Dry run: Not supported
  • Idempotency: Not needed (read only)
  • Modes: Test and live
  • Authentication: API key with the ledger:read scope
  • Since: M2

Request

Query parameters

FieldTypeRequiredDescription
asOfstringNoBalances at the end of this day (YYYY-MM-DD, UTC). Leave it out for the balances now.
currencystringNoOne currency only.

Response

200 OK with a JSON object:

FieldTypeDescription
object"ledger_trial_balance"
entityIdent_… ID
livemodeboolean
asOfstring or null
balancedboolean
currenciesarray of object
currencies[].currencystring
currencies[].accountsarray of object
currencies[].accounts[].accountIdacct_… ID
currencies[].accounts[].codestring
currencies[].accounts[].typeone of asset, liability, revenue, expense, equity
currencies[].accounts[].normalSideone of debit, credit
currencies[].accounts[].brandIdbrd_… ID or null
currencies[].accounts[].balanceinteger string
currencies[].accounts[].debitstring
currencies[].accounts[].creditstring
currencies[].totalsobject
currencies[].totals.debitstring
currencies[].totals.creditstring
currencies[].differenceinteger string
currencies[].balancedboolean

Examples

The trial balance now

HTTP
GET /api/v1/ledger/trial_balance
Authorization: Bearer or_test_…

Response (200):

JSON
{
  "object": "ledger_trial_balance",
  "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
  "livemode": true,
  "asOf": null,
  "balanced": true,
  "currencies": [
    {
      "currency": "EUR",
      "accounts": [
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
          "code": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
          "type": "asset",
          "normalSide": "debit",
          "brandId": null,
          "balance": "1500000000",
          "debit": "1500000000",
          "credit": "0"
        },
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
          "code": "opening_balances:EUR",
          "type": "equity",
          "normalSide": "credit",
          "brandId": null,
          "balance": "1500000000",
          "debit": "0",
          "credit": "1500000000"
        }
      ],
      "totals": {
        "debit": "1500000000",
        "credit": "1500000000"
      },
      "difference": "0",
      "balanced": true
    }
  ]
}

EUR balances at the end of September 2026

HTTP
GET /api/v1/ledger/trial_balance?asOf=2026-09-30&currency=EUR
Authorization: Bearer or_test_…

Response (200):

JSON
{
  "object": "ledger_trial_balance",
  "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
  "livemode": true,
  "asOf": "2026-09-30",
  "balanced": true,
  "currencies": [
    {
      "currency": "EUR",
      "accounts": [
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
          "code": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
          "type": "asset",
          "normalSide": "debit",
          "brandId": null,
          "balance": "1500000000",
          "debit": "1500000000",
          "credit": "0"
        },
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
          "code": "opening_balances:EUR",
          "type": "equity",
          "normalSide": "credit",
          "brandId": null,
          "balance": "1500000000",
          "debit": "0",
          "credit": "1500000000"
        }
      ],
      "totals": {
        "debit": "1500000000",
        "credit": "1500000000"
      },
      "difference": "0",
      "balanced": true
    }
  ]
}

Errors

CodeHTTP statusWhenWhat to do
validation_failed400asOf isn't a date such as 2026-09-30, or currency isn't a currency code.Fix the fields listed in details.issues and send the request again.
scope_required400The request names no legal entity (an org key without Ownrecord-Entity).Call the operation with credentials or a target at its level: an organization, a legal entity, a brand or the platform (details.required_scope).
permission_denied403You can't see this entity's ledger (brand-scoped members never can).Ask an organization owner or admin for a role or scope that allows this action.

It can also return these common errors: api_version_unsupported, authentication_required, api_key_invalid, resource_not_found, dry_run_not_supported, rate_limited, internal_error.