Initialize a Chart of Accounts

POST /chart-of-accounts initializes the entire chart of accounts for an organization that does not
have one yet, in a single atomic call. Use it to bootstrap a new organization before adding individual
accounts with POST /accounts.

  • Each account takes the same name, code, type, subtype, and intercompany fields as
    POST /accounts, plus optional parent_grouping (custom group name) and prepaid_account_code
    (code of a Prepaid Expense account in the same request).
  • The full request is validated before anything is created. It must contain exactly one
    Accounts Receivable, Accounts Payable, Sales Tax Liability, and Retained Earnings, and at
    least one Unbilled Revenue, Prepaid Expense, and Deferred Revenue. Validation failures return
    400 without a partial chart of accounts. Cash in Transit is created automatically.
  • When the request has exactly one Prepaid Expense account, expense accounts default to it; when it
    has several, each expense account must set prepaid_account_code.
  • Returns 409 when the organization already has a chart of accounts.
  • Account responses on GET /accounts, POST /accounts, and this endpoint now include
    parent_grouping and prepaid_account_code.

Applies to V4 only.