201Successful Response
Schema: SuccessEnvelope_InvoiceBulkCreateResponse_
successbooleanmessagestringcodestringdataInvoiceBulkCreateResponse
/api/v1/invoices/bulkCreate multiple invoices from CSV data in a single request.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: InvoiceBulkRequest
s3_keystringS3 key of the uploaded CSV file containing invoice data.
finalizebooleanIf true, finalize the created invoices. Needs a connected Stripe account, except with historical: then every row is finalized locally (no Stripe, no email), its entry dated on the row's invoice_date, which every invoice must then have.
allow_duplicatesbooleanBy default a row that matches an invoice a previous import already created (same customer, due date, total, description and line items) is skipped and reported under duplicates, so uploading the same file twice is safe. Set true to import those rows anyway — they are created without a fingerprint and will not be deduplicated against on future uploads.
historicalbooleanThe file holds invoices that were already issued elsewhere — a books migration rather than new billing. Every row is written locally and none reach Stripe, even if the business has an account connected, so nothing can be sent to or charged to a customer. Past due dates are accepted, which they otherwise are not. Use the invoice_date and invoice_number columns to keep each invoice's original date and number. The invoices are never chased by the AR dunning emails. With finalize, each is finalized locally and its entry (debiting the customer's AR) posts on its invoice_date, floored at the books' start date.
previewbooleanRun every check (customers, SKUs, projects, dates, amounts, duplicates, invoice numbers) and report what would be imported, without creating anything or calling Stripe. would_create counts the invoices that pass; failed lists the rest with suggestions.
allow_partialbooleanBy default a row that fails validation refuses the whole file (400 VALIDATION_574, nothing created). Set true to import the invoices that validate and report the failed rows for a retry.
Schema: SuccessEnvelope_InvoiceBulkCreateResponse_
successbooleanmessagestringcodestringdataInvoiceBulkCreateResponseSchema: 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.