201Successful Response
Schema: SuccessEnvelope_ApplyCoaResponse_
successbooleanmessagestringcodestringdataApplyCoaResponse
/api/v1/ledgers/apply-coaApply an AI-generated or custom chart of accounts template to the business, upserting over existing ledgers. Protected ledgers (system, required, bank-linked) are skipped. Existing custom ledgers not present in the template are deactivated.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: CustomCoaTemplate
ledgersarray · CustomCoaLedgerrequiredCustomCoaLedgerList of ledger definitions for the custom COA
namestringrequiredLedger name
typestringrequiredLedger type: asset, liability, equity, revenue, expense
sub_typestringrequiredLedger sub-type: current_assets, non-current_assets, transfers_between_accounts, uncategorized_assets, current_liabilities, non-current_liabilities, equity, operating_revenues, other_income, cost_of_goods_sold, operating_expenses, other_expenses
sort_codestringrequiredNumeric sort code for ordering (digits only, max 20 chars)
debit_creditstringDebit/credit behavior: debit, credit. Optional - Teal auto-determines based on ledger type.
report_cash_flowbooleanInclude in cash flow reports. Optional.
editablebooleanWhether line entries can be manually added or removed
descriptionstringLedger description
financial_account_typestringFinancial account type for Templated Mode. Options: bank_account, credit_card, payments, payroll, loan, prepaid_card, accounts_receivable, accounts_payable
Schema: SuccessEnvelope_ApplyCoaResponse_
successbooleanmessagestringcodestringdataApplyCoaResponseSchema: HTTPValidationError
detailarray · ValidationErrorValidationErrorlocarray · string | integerrequiredmsgstringrequiredtypestringrequiredinputobjectctxobject