Accounts
The chart of accounts is the backbone of double-entry bookkeeping in SpeyBooks. Every transaction line references an account, and the account type determines how the balance is interpreted in reports.
Accounts are organised into five types following UK accounting
conventions: asset, liability, equity, revenue, and
expense. Each account has a unique code (e.g. 1100 for Trade
Debtors, 4000 for Sales - Products) that determines its position in
reports and the chart hierarchy.
Accounts support parent/child relationships for hierarchical
reporting. A child account must share the same type as its parent.
The list endpoint returns accounts as a tree by default, or as a
flat list when flat=true is passed.
System accounts (seeded during organisation setup) cannot be
modified except for the isActive flag.
Accounts can be tagged as control accounts. isControlAccount
marks an account as system-managed and controlType names its
category (for example TRADE_DEBTORS, TRADE_CREDITORS, or one of
the VAT control categories). Tagging alone does not restrict posting.
A small set of strict subledger controls (Trade Debtors, Trade
Creditors, the VAT accounts, and Bad Debts) additionally reject a
journal posted from a source they do not permit, with a message
naming the account and its permitted sources. The remaining tagged
accounts accept ordinary postings.
Deletion follows a safe pattern: accounts with posted transaction lines are deactivated rather than removed. Accounts with child accounts cannot be deleted until the children are removed or reassigned.
Endpoints
https://app.speybooks.com/api/v1/accounts/List chart of accountsPOSThttps://app.speybooks.com/api/v1/accounts/Create an accountGEThttps://app.speybooks.com/api/v1/accounts/typesGet account types with countsGEThttps://app.speybooks.com/api/v1/accounts/{id}Get account detailsPUThttps://app.speybooks.com/api/v1/accounts/{id}Update an accountDELETEhttps://app.speybooks.com/api/v1/accounts/{id}Delete an accountGEThttps://app.speybooks.com/api/v1/accounts/{id}/balanceGet account balance