Update packages in bulk

distru-bulk-update-packagesWrite

Applies the same changes to many packages in one all-or-nothing save: if any package fails a check, nothing is saved and the error names every failing package by Metrc label.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
idsstring[]YesPackages to change. Resolve via distru-search-packages.
productIdstringNoMoves each package to this product and rewrites its history to match: stock, transactions, costs, assembly and order lines, with quantities and prices converted to the new product's unit type. Each package joins the product's default batch; packages already on it are left alone. Must be package-tracked and measure like the current product (weight, volume or count). The Metrc item is unchanged. For packages imported under the wrong product. Resolve via distru-search-products.
isActivebooleanNofalse takes packages out of use in Distru: their stock stops counting as active inventory, they drop out of package lists by default, the inventory assets report and expiring alerts, and assemblies can't use them. Metrc is not touched, so the package stays active there. For packages that are wrong or should be ignored in Distru, like duplicates or test packages, not for empty Metrc packages: finish those with distru-finish-packages. true brings them back. Refused while a package is syncing.
batchNumberstring or nullNoFree-text label on the package, not the linked Distru batch. Send null to clear it.
descriptionstring or nullNoSend null to clear it.
expirationDatestring or nullNoISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. Send null to clear it.
harvestDatestring or nullNoYYYY-MM-DD. Send null to clear it.
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 PACKAGE).
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
packagesobject[]Always
packages[].idstringAlways
packages[].metrcLabelstringAlways
packages[].productobjectAlways
packages[].product.idstringAlways
packages[].product.namestringAlways
packages[].isActivebooleanAlways
packages[].updatedAtstringAlways
What the AI reads

Applies the same changes to many packages in one all-or-nothing save: if any package fails a check, nothing is saved and the error names every failing package by Metrc label. Distru-only: nothing is sent to Metrc. To finish empty Metrc packages use distru-finish-packages. Refused whole when an id is unknown, or permission denied when your team can't see a package. Read the new values with distru-get-package. Sparse update: only the fields passed change, on every package; a field sent as null is cleared on all of them.