200Successful Response
Schema: SuccessEnvelope_BulkDeleteDraftInvoicesResponse_
successbooleanmessagestringcodestringdataBulkDeleteDraftInvoicesResponse
/api/v1/invoices/drafts/bulk-deleteDelete many draft invoices in one call: name them with invoice_ids, or set all_drafts (optionally with a due-date window) to clear every draft. Only drafts can be deleted: a selection that includes any other status is refused whole (400) and nothing is deleted. Each deletion runs the single-invoice path in its own savepoint, so a draft that cannot be deleted is reported without blocking the rest.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: BulkDeleteDraftInvoicesRequest
invoice_idsarray · stringDraft invoice UUIDs to delete (1-500). Every id must be a draft or nothing is deleted. Mutually exclusive with all_drafts.
all_draftsbooleanDelete every draft invoice of the business, optionally limited by start_date / end_date. Mutually exclusive with invoice_ids. At most 500 are deleted per call; remaining says how many are left.
start_datestring · dateWith all_drafts: only drafts due on or after this date.
end_datestring · dateWith all_drafts: only drafts due on or before this date.
dry_runbooleanList the drafts that would be deleted; delete nothing.
Schema: SuccessEnvelope_BulkDeleteDraftInvoicesResponse_
successbooleanmessagestringcodestringdataBulkDeleteDraftInvoicesResponseSchema: 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.
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.