201Successful Response
Schema: SuccessEnvelope_CoaGenerateResponse_
successbooleanmessagestringcodestringdataCoaGenerateResponse
/api/v1/businesses/generate-coaUses AI to generate a complete chart of accounts template based on a business description.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: CoaGenerateRequest
business_descriptionstringrequiredDescription of the business including industry, size, and accounting needs. E.g. 'Small e-commerce business selling handmade jewelry, accrual basis, US-based'
accounting_basisstringPreferred accounting basis. If omitted, the AI will choose based on business description.
currencystringPrimary currency (USD, CAD, AUD, EUR, or GBP).
include_inventorybooleanWhether to include inventory-related accounts (COGS, inventory assets, etc.).
Schema: SuccessEnvelope_CoaGenerateResponse_
successbooleanmessagestringcodestringdataCoaGenerateResponseSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.