Skip to content

Run a live Books Health & Leak Audit against the active business's synced ledger

POST/api/v1/books-audit/run-live

Scan synced GL accounts and 90-day transactions and persist a shareable Books Audit.

Operation ID: run_live_books_audit·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

providerstring

One of: qbo, xero, shopify, live_ledger

referral_codestring

Responses

201Successful Response

share_tokenstringrequired
share_urlstringrequired
badge_svg_urlstringrequired
company_namestringrequired
source_typestringrequired
countrystringrequired
currencystringrequired
overall_gradestringrequired
health_scoreintegerrequired
estimated_leak_centsintegerrequired
estimated_close_daysintegerrequired
dayzero_target_close_daysinteger
findingsarray · BooksAuditFindingrequiredBooksAuditFinding
6 fields
categorystringrequired

One of: uncategorized_spend, duplicate_saas, coa_bloat, cogs_misclassification, nexus_exposure, close_velocity

severitystringrequired

One of: critical, high, medium, low

titlestringrequired
detailstringrequired
estimated_impact_centsinteger
recommended_fixstringrequired
summary_metricsobjectrequired
referral_codestring
created_atstring · date-time

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.