Books

List the live chart of accounts

Changed on

Lists the ledgers, i.e. general ledger (GL) accounts, in the organization's live chart of accounts, sorted by name. Each ledger has its id, name, sortCode (account number), type, subType, debitCredit (natural balance), financialAccountType (set when the ledger represents a bank or card account), and parentId (use it to reconstruct the hierarchy). Each ledger also says which changes the system allows before you write: isRequired and requiredLedgerPurpose mark required ledgers, which the accounting system needs and which can't be deleted; editable says whether line entries can be manually added to or removed from the ledger; deletable says whether it can be deleted now, and when it can't, deleteBlockedReason says why: required, hasActivity (it has line entries), linkedSource (it is linked to a bank or card account), or integrationMapped (an invoicing, commerce, or Plaid integration is mapped to it). Filter with type, subType, debitCredit, and ids; filters combine, so a ledger must match all of them. Results are paginated: pass a response's nextPageToken as pageToken to fetch the next page. To read one ledger by ID, use getBooksLedger.

get/books/ledgers

Request

Query parameters

booksIdstring uuid

The Books instance to act on. Must be the token organization's own instance, which it defaults to.

type'asset' | 'liability' | 'equity' | 'revenue' | 'expense'

Only return ledgers of this type.

subType'currentAssets' | 'nonCurrentAssets' | 'transfersBetweenAccounts' | 'uncategorizedAssets' | 'currentLiabilities' | 'nonCurrentLiabilities' | 'equity' | 'operatingRevenues' | 'otherIncome' | 'costOfGoodsSold' | 'operatingExpenses' | 'otherExpenses' | 'retainedEarnings'

Only return ledgers of this sub-type.

debitCredit'debit' | 'credit'

Only return ledgers with this natural balance.

idsstring[]

Comma-separated list of at most 100 distinct ledger IDs. Only return these ledgers. Every ID must belong to the Books instance.

[
  "7JRNsKwy2Lw66caxVU7WGC"
]
pageTokenstring

token for pagination

limitinteger

The maximum number of accounts to return per page, from 1 to 1000.

Response

nextPageTokenstring nullable

Token to fetch the next page of results

prevPageTokenstring nullable

Token to fetch the previous page of results

Example response

{
  "ledgers": [
    {
      "id": "7JRNsKwy2Lw66caxVU7WGC",
      "parentId": "7JRNsKwy2Lw66caxVU7WGC"
    }
  ]
}

Changes