Update invoices in bulk
distru-bulk-update-invoicesWritePOSQuickBooksApplies the same header changes to many invoices, saving each one on its own. Resyncs invoices already in QuickBooks whose QuickBooks fields or payments changed, and updated invoices to your POS (Dutchie, Blaze or Treez) when the customer is mapped to one of its retailers.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| ids | string[] | Yes | Invoices to change. Resolve via distru-search-invoices. Split a larger set into several calls; if you can make only one, say which invoices are left (or how many, if the list is long). |
| invoiceDate | string | No | Due dates stay; send paymentTermName too to count them from the new date. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. |
| dueDate | string | No | Clears each invoice's payment term. Not with paymentTermName. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. |
| paymentTermName | string | No | Sets each invoice's due date from its own invoice date (the new one when invoiceDate is sent too). Send dueDate for a custom due date. Not with dueDate. Resolve via distru-search-lookups (type PAYMENT_TERM, the name). |
| ownerId | string or null | No | Sales rep. Resolve via distru-search-users. Send null to clear it. |
| internalNotes | string or null | No | Not shown to the customer. Send null to clear it. |
| externalNotes | string or null | No | Printed on the invoice. Send null to clear it. |
| termsAndServices | string or null | No | Printed on the invoice. Send null to clear it. |
| color | enum or null18 valuesREDLIGHT_REDORANGELIGHT_ORANGEGOLDYELLOWGREENLIGHT_GREENBLUELIGHT_BLUECYANLIGHT_CYANINDIGOLIGHT_INDIGOPURPLELIGHT_PURPLEGRAYLIGHT_GRAY | No | Calendar color. Null, or omitted when creating, gives the company's default invoice color. Set only when the user asks for one. |
| customFields | object[] | No | Only the fields listed change. Required custom fields must be set, on update too, while still blank. |
| customFields[]. | string | Yes | Resolve via distru-search-custom-fields (entityType INVOICE). |
| customFields[]. | string or string[] | Yes | TEXT: the text. NUMBER: a plain decimal, such as "12.5". USER: the user's id (usr_…). DROPDOWN: the option name. CHECKBOX: an array of option names. DATE: YYYY-MM-DD, company timezone. "" or [] clears the field. |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence |
|---|---|---|
| invoices | object[] | Always |
| invoices[]. | string | Always |
| invoices[]. | enumFAILEDSKIPPEDUPDATED | Always |
| invoices[]. | string | Can be null |
What the AI reads
Applies the same header changes to one or many invoices, saving each on its own; returns one result per invoice, in the order given, with the reason in message. UPDATED also when it already had the values. SKIPPED: voided, or QuickBooks books closed (an invoice date, due date or external notes change, paymentTermName included since it sets the due date, to an invoice already in QuickBooks dated or moved on or before the QuickBooks book close date). FAILED: a save check refused it or the save errored; the others still save. Refused whole when an id is unknown or a value is invalid, or permission denied when your team can't see an invoice or you can't edit invoices. Queues a QuickBooks resync for invoices already in QuickBooks whose QuickBooks fields or payments changed, and a POS sync for each UPDATED invoice whose customer is mapped to a POS retailer. Line price changes, quantity decreases and removed lines on the order flow to its invoice (distru-mutate-sales-order); other line and charge edits are UI-only. Read the new values with distru-get-invoice. Sparse update: only the fields passed change, on every invoice; a field sent as null is cleared on all of them.