Update batches in bulk

distru-bulk-update-batchesWrite

Applies the same changes to many batches in one all-or-nothing save: if any batch fails a check, nothing is saved and the error names the failing batches.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
idsstring[]YesBatches to change. Resolve via distru-search-batches.
batchNumberstring or nullNoYour lot number, e.g. LOT-1241291. Need not be unique. Send null to clear it.
descriptionstring or nullNoSend null to clear it.
thcstring or nullNoFree-text label, e.g. "18.5%"; not a lab result (see primaryTestResult). Send null to clear it.
cbdstring or nullNoFree-text label, e.g. "0.3%"; not a lab result (see primaryTestResult). Send 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 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.
manufacturedDatestringNoCannot be cleared. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me.
ownerIdstring or nullNoOwning user. Resolve via distru-search-users. 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 BATCH).
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

FieldTypePresence
idsstring[]Always
What the AI reads

Applies the same changes to many batches in one all-or-nothing save: if any batch fails a check, nothing is saved and the error names the failing batches. Pushes nothing to Metrc. For one batch, or to create or delete one, use distru-mutate-batch. Refused whole when an id is unknown, or permission denied when your team can't see a batch. Returns the ids changed; read the new values with distru-get-batch. Sparse update: only the fields passed change, on every batch; a field sent as null is cleared on all of them.