Adjust inventory

distru-adjust-inventoryWriteBioTrackMetrc

Adjusts the quantity of a package, batch or product. Changes Metrc or BioTrack only for a package tracked there.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
adjustedDatetimestringNoWhen the change happened. Default now. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me.
batchIdstringNoBatch of a batch-tracked product. Resolve via distru-search-batches.
complianceReasonstringNoRequired for a package: a reason name its license's state system takes. Metrc: from distru-search-licenses with includeMetrcAdjustmentReasons. An invalid one is rejected with the valid names.
costPerUnitstring or numberNoPositive quantity only: dollars each added unit cost. Needs the "Apply costs on quantity adjustments" permission. When the company requires a cost on intake, a positive adjustment needs this or inheritCostPerUnit.
descriptionstringNoRequired for a package. At most 250 characters for a package, 800 otherwise. Write - for – and ' for ’. "()" written together is refused. Allowed: a-z, A-Z, 0-9, spaces and the symbols . , : ? ' ! @ # $ % ^ & * ( ) [ ] / \ | > + - _
inheritCostPerUnitbooleanNoPositive quantity only: added units take the current cost per unit, so the cost per unit stays the same. Not with costPerUnit.
locationIdstringNoBatch or product only: where the stock is. Can be left out when its stock sits in one location. Resolve via distru-search-locations.
packageIdstringNoResolve via distru-search-packages.
productIdstringNoProduct-tracked product. Resolve via distru-search-products.
quantitystring or numberYesSigned change, negative for a loss. Package: in the package's unit type. Batch or product: in the product's unit type.
reasonenum
DAMAGEDEXPIREDFIRELAB_TESTINGOTHERREVALUATIONSTOLENWASTEWRITE_OFF
NoRequired for a batch or product. WASTE takes a negative quantity.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
stockAdjustmentobjectAlways
stockAdjustment.idstringAlways
stockAdjustment.quantitystringAlways
stockAdjustment.adjustedDatetimestringCan be null
stockAdjustment.locationobjectCan be null
stockAdjustment.location.idstringAlways
stockAdjustment.location.namestringAlways
stockAdjustment.packageobjectNull or absent
stockAdjustment.package.idstringAlways
stockAdjustment.package.metrcLabelstringAlways
stockAdjustment.package.quantitystringAlways
stockAdjustment.package.unitTypeobjectAlways
stockAdjustment.package.unitType.namestringAlways
stockAdjustment.batchobjectNull or absent
stockAdjustment.batch.idstringAlways
stockAdjustment.batch.batchNumberstringCan be null
stockAdjustment.batch.quantitystringAlways
stockAdjustment.productobjectAlways
stockAdjustment.product.idstringAlways
stockAdjustment.product.namestringAlways
stockAdjustment.product.quantityActivestringAlways
stockAdjustment.product.unitTypeobjectAlways
stockAdjustment.product.unitType.namestringAlways
stockAdjustment.complianceActivityobjectCan be null
stockAdjustment.complianceActivity.idstringAlways
stockAdjustment.complianceActivity.statusenum
QUEUEDFAILEDCOMPLETED
Always
What the AI reads

Adjusts the quantity of one package, batch-tracked batch or product-tracked product by a signed change, negative for a loss. For a Metrc package, the change is saved in Distru first and sent to Metrc in the background: complianceActivity tracks that sync, QUEUED until Metrc records it. If Metrc rejects it, the Distru adjustment stays and the activity is marked failed; follow it with distru-search-metrc-activities. Adjustments can't be edited or undone; adjust again to correct one. Returns the adjustment with the record's new quantity: the package's in its unit type, the batch's or product's total across locations in the product's unit type.