Generate a COA template using AI

POST /api/v1/businesses/generate-coa

Uses AI to generate a complete chart of accounts template based on a business description.

Operation ID: generate_coa_template_api_v1_businesses_generate_coa_post · View as markdown · OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

business_description string required

Description of the business including industry, size, and accounting needs. E.g. 'Small e-commerce business selling handmade jewelry, accrual basis, US-based'

accounting_basis string

Preferred accounting basis. If omitted, the AI will choose based on business description.

currency string

Primary currency (USD, CAD, AUD, EUR, or GBP).

include_inventory boolean

Whether to include inventory-related accounts (COGS, inventory assets, etc.).

Responses

201 Successful Response

template CustomCoaTemplate requiredCustomCoaTemplate

Generated COA template ready for use in business creation

1 field
ledgers array · CustomCoaLedger requiredCustomCoaLedger

List of ledger definitions for the custom COA

accounting_basis string required

The accounting basis used for this template (cash or accrual)

summary string required

Brief AI explanation of the generated template and why accounts were chosen

ledger_count integer

Number of ledgers in the generated template

400 Bad Request - Invalid input

401 Unauthorized - Authentication required

422 Validation Error

detail array · ValidationError ValidationError
5 fields
loc array · string | integer required
msg string required
type string required
input object
ctx object