Skip to main content

Overview

The Chart of Accounts is the complete list of ledger accounts for a business, organized in a hierarchical tree structure. It serves as the foundation for all financial reporting and is automatically created when a business is onboarded.

Hierarchy Structure

Accounts are organized in a parent-child hierarchy:
Assets (Level 0)
├── Current Assets (Level 1)
│   ├── Cash (Level 2)
│   │   ├── Petty Cash (Level 3)
│   │   └── Business Current Account (Level 3)
│   └── Accounts Receivable (Level 2)
└── Non-Current Assets (Level 1)
    └── Fixed Assets (Level 2)
        ├── Equipment (Level 3)
        └── Furniture (Level 3)

Hierarchy Fields

FieldDescription
hierarchy_levelDepth in the tree (0 = root account)
parent_account_codeCode of parent account (null for roots)
has_childrenBoolean indicating sub-accounts exist
sub_accountsArray of nested child accounts

Account Organization

The standard chart of accounts follows this top-level structure:

Balance Sheet Accounts

Assets - What the business ownsLiabilities - What the business owesEquity - Owner’s stake

Income Statement Accounts

Revenue - Income earnedExpenses - Costs incurred

Retrieving the Chart of Accounts

Two endpoints are available:

Flat List (Paginated)

Use List Chart of Accounts for:
  • Filtering by account type
  • Searching by name or code
  • Paginated results
  • Period-specific balances
GET /v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/

Hierarchical Tree

Use Get Chart of Accounts Hierarchy for:
  • Complete tree structure
  • Nested sub-accounts
  • Visual hierarchy representation
  • Account counts
GET /v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/hierarchy/

Response Structure

Hierarchy Response

The hierarchy endpoint returns accounts as a nested tree:
{
  "hierarchy": [
    {
      "id": "...",
      "code": "1000",
      "name": "Assets",
      "account_type": "asset",
      "hierarchy_level": 0,
      "has_children": true,
      "current_balance": 50000000,
      "current_balance_formatted": "£500,000.00",
      "sub_accounts": [
        {
          "id": "...",
          "code": "1100",
          "name": "Current Assets",
          "account_type": "asset",
          "hierarchy_level": 1,
          "has_children": true,
          "current_balance": 35000000,
          "sub_accounts": [
            {
              "id": "...",
              "code": "1101",
              "name": "Business Current Account",
              "hierarchy_level": 2,
              "has_children": false,
              "current_balance": 1250050,
              "sub_accounts": []
            }
          ]
        }
      ]
    },
    {
      "id": "...",
      "code": "2000",
      "name": "Liabilities",
      "account_type": "liability",
      "hierarchy_level": 0,
      "sub_accounts": [...]
    }
  ],
  "total_accounts": 45
}

Balance Calculations

Account balances follow double-entry bookkeeping rules:
Assets & Expenses increase with debits
Balance = Debits - Credits
Positive balance = Normal (what you own/spent)

Parent Account Balances

Parent accounts aggregate balances from all descendants:
Assets (£500,000)
├── Current Assets (£350,000)
│   ├── Cash (£125,000)
│   └── Receivables (£225,000)
└── Fixed Assets (£150,000)

Common Use Cases

Use the hierarchy endpoint to fetch the complete tree, then render recursively:
function renderAccount(account, depth = 0) {
  const indent = '  '.repeat(depth);
  console.log(`${indent}${account.code} - ${account.name}: ${account.current_balance_formatted}`);
  account.sub_accounts?.forEach(child => renderAccount(child, depth + 1));
}

response.hierarchy.forEach(root => renderAccount(root));
Use the list endpoint with account_type parameter:
GET /v1/.../chart-of-accounts/?account_type=expense
Use the list endpoint with period filters:
GET /v1/.../chart-of-accounts/?period_year=2024&period_month=11