Adjust inventory
distru-adjust-inventoryWriteBioTrackMetrcAdjusts 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.
| Field | Type | Required | Description |
|---|---|---|---|
| adjustedDatetime | string | No | When 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. |
| batchId | string | No | Batch of a batch-tracked product. Resolve via distru-search-batches. |
| complianceReason | string | No | Required 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. |
| costPerUnit | string or number | No | Positive 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. |
| description | string | No | Required 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 . , : ? ' ! @ # $ % ^ & * ( ) [ ] / \ | > + - _ |
| inheritCostPerUnit | boolean | No | Positive quantity only: added units take the current cost per unit, so the cost per unit stays the same. Not with costPerUnit. |
| locationId | string | No | Batch or product only: where the stock is. Can be left out when its stock sits in one location. Resolve via distru-search-locations. |
| packageId | string | No | Resolve via distru-search-packages. |
| productId | string | No | Product-tracked product. Resolve via distru-search-products. |
| quantity | string or number | Yes | Signed change, negative for a loss. Package: in the package's unit type. Batch or product: in the product's unit type. |
| reason | enumDAMAGEDEXPIREDFIRELAB_TESTINGOTHERREVALUATIONSTOLENWASTEWRITE_OFF | No | Required for a batch or product. WASTE takes a negative quantity. |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence |
|---|---|---|
| stockAdjustment | object | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | string | Can be null |
| stockAdjustment. | object | Can be null |
| stockAdjustment. | string | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | object | Null or absent |
| stockAdjustment. | string | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | object | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | object | Null or absent |
| stockAdjustment. | string | Always |
| stockAdjustment. | string | Can be null |
| stockAdjustment. | string | Always |
| stockAdjustment. | object | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | object | Always |
| stockAdjustment. | string | Always |
| stockAdjustment. | object | Can be null |
| stockAdjustment. | string | Always |
| stockAdjustment. | enumQUEUEDFAILEDCOMPLETED | 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.