Get a package
distru-get-packageReadGets one package with its compliance status, lab results, potency, quantities, location and costs.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Resolve via distru-search-packages. |
| includeQuantityCostItems | boolean | No | quantityCostItems: the costs that make up quantityCost, 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 package; 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 package, 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 |
|---|---|---|
| package | object | Can be null |
| package. | string | Always |
| package. | object[] | Always |
| package. | object | Always |
| package. | string | Always |
| package. | string | Always |
| package. | enumCHECKBOXDATEDROPDOWNTEXT | Always |
| package. | string | Can be null |
| package. | string | Always |
| package. | enumBIOTRACKMETRCNONE | Always |
| package. | number | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | enumACTIVEASSEMBLINGDESTROYEDDISCONTINUEDFINISHEDON_HOLDRETURNINGSELLINGSOLDTRANSFERRED | Always |
| package. | boolean | Always |
| package. | enumACTIVEDISCONTINUEDFINISHEDONHOLDTRANSFERRED | Can be null |
| package. | string | Can be null |
| package. | string[] | Can be null |
| package. | boolean | Always |
| package. | enumASSEMBLY_INPUTASSEMBLY_OUTPUTCOMPLIANCE_TRANSFERCREATE_HARVEST_PACKAGECREATE_PLANT_BATCHES_FROM_PACKAGEDESTROY_PACKAGEFINISH_PACKAGESALES_ORDERSTOCK_ADJUSTMENTUNFINISH_PACKAGEUNKNOWN | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | boolean | Always |
| package. | boolean | Always |
| package. | boolean | Can be null |
| package. | enumFAILEDNOT_TESTEDPASSEDPENDING | Always |
| package. | string | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | string | Always |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | object | Always |
| package. | string | Always |
| package. | string | Always |
| package. | object | Always |
| package. | string | Always |
| package. | string | Always |
| package. | string | Always |
| package. | object | Always |
| package. | string | Always |
| package. | string | Always |
| package. | object | Always |
| package. | string | Always |
| package. | string | Always |
| package. | object | Always |
| package. | string | Always |
| package. | string | Always |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | object[] | Null or absent |
| package. | string | Always |
| package. | string | Can be null |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | string | Always |
| package. | object | Always |
| package. | enumASSEMBLYBIOTRACK_ADJUSTMENTBIOTRACK_MANIFEST_RECEIVEDBREAKDOWNCOST_ENTRYMETRC_ADJUSTMENTMETRC_TRANSFER_RECEIVEDOTHERPACKAGE_IMPORTPLANT_BATCH_PACKAGINGPURCHASE_ORDERSTOCK_ADJUSTMENT | Always |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | object | Can be null |
| package. | string | Can be null |
| package. | object | Always |
| package. | enumPACKAGEBATCHPRODUCTHARVESTPLANTPLANT_BATCHMULTIPLE_PLANTSNONE | Always |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | string | Always |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | object | Can be null |
| package. | string | Always |
| package. | object | Can be null |
| package. | string | Can be null |
| package. | string | Can be null |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Can be null |
| package. | object | Can be null |
| package. | string | Always |
| package. | string | Always |
| package. | string | Always |
| package. | string | Always |
| package. | object | Always |
| package. | string | Always |
| package. | string | Always |
| package. | string | Can be null |
| package. | string | Can be null |
What the AI reads
Gets one inventory package by ID — a physical container of stock, tagged where the product is package-tracked: compliance identity and status, Distru status, lab testing and potency, quantities and quantity cost, and the product, batch, location and license it belongs to. primaryTestResult includes results inherited from source packages, so skip distru-search-test-results for those. isFinishedGood is Metrc's finished-good flag, null where the package's license can't set it. The cost breakdown is left out unless you pass includeQuantityCostItems. To browse or search packages use distru-search-packages. Quantities are in the package's unit type: quantity is what the package holds (for a transferred package, what it held when transferred); quantityAssembling is held by pending assemblies; quantityActive is the rest, 0 while the package's stock is selling, returning, sold or transferred. quantityActive does not deduct a sales order until it starts selling the package: activeSalesOrder is the non-canceled, non-merged sales order the package is on, null when there is none or the caller cannot see it. quantityCost is the total cost of the package's current quantity whatever its status, not per unit; null when none is recorded, the caller cannot view costs or quantity is 0 (no cost items either); past movement costs: distru-report-inventory-transaction-history (packageId). metrcId, metrcStatus, metrcProductionBatchNumber, metrcSourcePackageLabels (tags Metrc says it was made from; look them up via distru-search-packages search) and quantityInMetrc (Metrc's quantity at last sync, in Metrc's unit, may be negative) are null outside Metrc. syncing is true while a change is being sent to Metrc. isActive false = inactivated in Distru, still active in Metrc. batchNumber is the package's own free-text grouping label, not the linked Distru batch — which batch a package belongs to is batch.name. A null expirationDate means expiry isn't tracked. Null if no package matches the ID; a permission error if the caller can't view it.