Update companies in bulk

distru-bulk-update-companiesWrite

Applies the same changes to many companies, your own included, in one all-or-nothing save.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
idsstring[]YesCompanies to change. Resolve via distru-search-companies.
categorystring or nullNoResolve via distru-search-lookups (type COMPANY_CATEGORY). Send null to clear it.
relationshipTypeIdstring or nullNoResolve via distru-search-lookups (type RELATIONSHIP_TYPE). Send null to clear it.
groupIdstring or nullNoResolve via distru-search-lookups (type COMPANY_GROUP). Send null to clear it.
ownerIdstring or nullNoSales rep. Resolve via distru-search-users. Send null to clear it.
defaultPaymentTermIdstring or nullNoResolve via distru-search-lookups (type PAYMENT_TERM). Send null to clear it.
defaultInventoryLocationIdstring or nullNoOne of your own locations: the default inventory source on this company's sales orders. Resolve via distru-search-locations. Send null to clear it.
invoiceEmailstring or nullNoWhere invoices are emailed. Comma-separated for several. Send null to clear it.
salesOrderEmailstring or nullNoWhere sales orders are emailed. Comma-separated for several. Send null to clear it.
purchaseOrderEmailstring or nullNoWhere purchase orders are emailed. Comma-separated for several. Send null to clear it.
orderShipmentEmailstring or nullNoWhere order shipments are emailed. Comma-separated for several. Send null to clear it.
defaultSalesOrderNotesstring or nullNoCopied onto new orders. Send null to clear it.
defaultPurchaseOrderNotesstring or nullNoCopied onto new orders. Send null to clear it.
websitestring or nullNoSend null to clear it.
descriptionstring or nullNoSend null to clear it.
customFieldsobject[]NoOnly the fields listed change. A required custom field cannot be cleared.
customFields[].customFieldIdstringYesResolve via distru-search-custom-fields (entityType COMPANY).
customFields[].valuestring or string[]YesTEXT: the text. 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
companiesobject[]Always
companies[].idstringAlways
companies[].namestringAlways
companies[].updatedAtstringAlways
What the AI reads

Applies the same changes to many companies, your own included, in one all-or-nothing save. For one company, or values that differ per company (name, legal name, email, phone, Outstanding Balance Threshold), use distru-mutate-company. Refused whole when an id is unknown, or permission denied when your team can't see a company. Read the new values with distru-get-company. Sparse update: only the fields passed change, on every company; a field sent as null is cleared on all of them.