Bulk update invoices
Set the same values on up to 100 invoices in one call, and get back one result per invoice. Send the invoice IDs in invoice_ids and the fields to set in changes. Use it for header changes such as moving due dates, reassigning owners or filling in a custom field; to change line items or charges, use POST /public/v1/invoices on each invoice.
changes is sparse: a field you omit is left unchanged on every invoice, and a field sent as null is cleared, except invoice_datetime, due_datetime and payment_term_name, which can't be cleared, and color, where null gives your company's default invoice color. custom_data itself can't be null: clear custom fields one by one with a null value. A payment_term_name sets each invoice's due date from that invoice's own invoice date (the new one when invoice_datetime changes too), so it can't be sent with due_datetime. A due_datetime sent alone is a custom due date: it clears each invoice's payment term. An invoice_datetime sent alone keeps each invoice's due date and payment term.
The request is checked as a whole first. It is refused, and no invoice is changed, when invoice_ids is empty, has more than 100 entries, lists an ID that doesn't exist for your company (404) or that your team can't see (403), or when changes is empty or invalid (an unknown payment term, an owner you can't assign, an unknown custom field, a value of the wrong type, clearing a required custom field). A repeated ID gets one result, but each entry counts toward the limit.
Then each invoice is saved on its own, as if edited one by one: one invoice failing doesn't stop the others, and the ones saved stay saved. The 200 response lists every invoice in the order sent, each with a status:
• UPDATED: saved. Also returned when the invoice already had these values.
• SKIPPED: left unchanged on purpose: the invoice is voided, or the change touches invoice_datetime, due_datetime, payment_term_name (it sets the due date) or external_notes of an invoice already in QuickBooks Online that is, or would be, dated on or before your QuickBooks Online book close date.
• FAILED: refused by a save rule, such as a custom validation rule your company has set up or a line item that no longer matches its order. message says why.
A saved invoice has the same effects as a single update: webhooks fire, and an invoice whose customer maps to a connected point-of-sale (Treez, Dutchie, or Blaze) is queued for sync to it. Invoices already in QuickBooks Online whose QuickBooks Online data changed (such as the invoice date, due date, customer-facing notes or payments) are queued for resync right after each save; this endpoint never creates invoices in QuickBooks Online. Those syncs run after the response, so poll the other system to observe them. No inventory moves.
Required permission: invoices_permissions_edit, plus access to every listed invoice under team restrictions.
BearerAuthorizationBearer <token>API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.
The invoices and the changes
application/json- body
changes*The fields to set on every listed invoice. Omit a field to leave it unchanged; send null to clear it, where the field allows it.
invoice_ids*array<string>The IDs of the invoices to update, 1 to 100 entries, repeats included. Every one must be an invoice of your company that your team can see. A repeated ID gets one result.
One result per invoice
*/*- response
data*array<>One result per invoice, in the order the IDs were sent.
curl -X POST 'https://app.distru.com/public/v1/invoices/bulk-update' \ -H 'Content-Type: application/json' \ -d '{ "changes": { "color": "CE2B2B", "custom_data": { "2012": "2025-02-01", "2013": null, "2014": [ "A", "B" ], "2015": "00000000-0000-0000-0000-00000001ab86" }, "external_notes": "E", "internal_notes": "I", "owner_id": "00000000-0000-0000-0000-00000001ab86", "payment_term_name": "Net 10", "terms_and_services": "T" }, "invoice_ids": [ "00000000-0000-0000-0000-000000001273", "00000000-0000-0000-0000-000000001276", "00000000-0000-0000-0000-000000001275", "00000000-0000-0000-0000-000000001274" ]}'{ "data": [ { "invoice_id": "00000000-0000-0000-0000-0000000000fb", "message": null, "status": "UPDATED" }, { "invoice_id": "00000000-0000-0000-0000-0000000000fe", "message": "Locked", "status": "FAILED" }, { "invoice_id": "00000000-0000-0000-0000-0000000000fd", "message": "Invoice is voided", "status": "SKIPPED" }, { "invoice_id": "00000000-0000-0000-0000-0000000000fc", "message": null, "status": "UPDATED" } ]}