Get a batch
distru-get-batchReadGets one inventory batch by ID: header detail with quantity, activeQuantityCost, dates, product, owner and primary test result.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Resolve via distru-search-batches. |
| includeActiveQuantitiesByLocation | boolean | No | Active quantity per location, in the product's unit type. |
| includeActiveQuantityCostItems | boolean | No | activeQuantityCostItems: the costs that make up activeQuantityCost, oldest first; null when none is recorded or the caller cannot view cost details. Costs carry over from inputs, so recordedOn can be an upstream package, batch, product, harvest, plant or plant batch rather than this batch; MULTIPLE_PLANTS is a cost split over several plants or plant batches, NONE one tied to no inventory. quantity is the share that went into this batch, out of costQuantity; both in unitType. totalCost is quantity × costPerUnit; both null when no cost per unit is recorded or the caller cannot see it. costType is null for purchase costs and costs Distru records itself; origin.purchaseOrder and origin.assembly are null when team restrictions hide them. |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence |
|---|---|---|
| batch | object | Can be null |
| batch. | string | Always |
| batch. | object[] | Always |
| batch. | object | Always |
| batch. | string | Always |
| batch. | string | Always |
| batch. | enumCHECKBOXDATEDROPDOWNTEXT | Always |
| batch. | string | Can be null |
| batch. | string | Always |
| batch. | string | Can be null |
| batch. | string | Can be null |
| batch. | string | Can be null |
| batch. | string | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | string | Can be null |
| batch. | string | Can be null |
| batch. | string | Always |
| batch. | string | Can be null |
| batch. | object | Always |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | object | Always |
| batch. | string | Always |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | string | Can be null |
| batch. | string | Can be null |
| batch. | string | Can be null |
| batch. | object[] | Can be absent |
| batch. | object | Always |
| batch. | string | Always |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object[] | Null or absent |
| batch. | string | Always |
| batch. | string | Can be null |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object | Always |
| batch. | enumASSEMBLYBIOTRACK_ADJUSTMENTBIOTRACK_MANIFEST_RECEIVEDBREAKDOWNCOST_ENTRYMETRC_ADJUSTMENTMETRC_TRANSFER_RECEIVEDOTHERPACKAGE_IMPORTPLANT_BATCH_PACKAGINGPURCHASE_ORDERSTOCK_ADJUSTMENT | Always |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object | Can be null |
| batch. | string | Can be null |
| batch. | object | Always |
| batch. | enumPACKAGEBATCHPRODUCTHARVESTPLANTPLANT_BATCHMULTIPLE_PLANTSNONE | Always |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | object | Can be null |
| batch. | string | Can be null |
| batch. | string | Can be null |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Can be null |
| batch. | object | Can be null |
| batch. | string | Always |
| batch. | string | Always |
| batch. | string | Always |
| batch. | string | Always |
| batch. | object | Always |
| batch. | string | Always |
| batch. | string | Always |
| batch. | string | Can be null |
| batch. | string | Can be null |
What the AI reads
Gets one inventory batch by ID: header detail with quantity, activeQuantityCost, dates, product, owner and primary test result. Active quantity per location and the cost breakdown are left out unless you pass includeActiveQuantitiesByLocation or includeActiveQuantityCostItems. Use for a specific batch after resolving its ID via distru-search-batches; to browse or search batches use distru-search-batches; to change one, distru-mutate-batch. thc and cbd are free-text labels typed on the batch, not lab results; lab potency is on primaryTestResult. activeQuantityCost is the total cost of the active quantity, not per unit; null when none is recorded or the caller cannot view costs. The cost breakdown is null for batches of product-tracked and package-tracked products; use distru-get-product or distru-get-package for those. Null if no batch matches the ID; a permission error if the caller can't view it.