Update invoices in bulk

distru-bulk-update-invoicesWritePOSQuickBooks

Applies 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.

FieldTypeRequiredDescription
idsstring[]YesInvoices 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).
invoiceDatestringNoDue 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.
dueDatestringNoClears 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.
paymentTermNamestringNoSets 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).
ownerIdstring or nullNoSales rep. Resolve via distru-search-users. Send null to clear it.
internalNotesstring or nullNoNot shown to the customer. Send null to clear it.
externalNotesstring or nullNoPrinted on the invoice. Send null to clear it.
termsAndServicesstring or nullNoPrinted on the invoice. Send null to clear it.
colorenum or null
18 values
REDLIGHT_REDORANGELIGHT_ORANGEGOLDYELLOWGREENLIGHT_GREENBLUELIGHT_BLUECYANLIGHT_CYANINDIGOLIGHT_INDIGOPURPLELIGHT_PURPLEGRAYLIGHT_GRAY
NoCalendar color. Null, or omitted when creating, gives the company's default invoice color. Set only when the user asks for one.
customFieldsobject[]NoOnly the fields listed change. Required custom fields must be set, on update too, while still blank.
customFields[].customFieldIdstringYesResolve via distru-search-custom-fields (entityType INVOICE).
customFields[].valuestring or string[]YesTEXT: 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.

FieldTypePresence
invoicesobject[]Always
invoices[].idstringAlways
invoices[].statusenum
FAILEDSKIPPEDUPDATED
Always
invoices[].messagestringCan 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.