Get a package

distru-get-packageRead

Gets one package with its compliance status, lab results, potency, quantities, location and costs.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
idstringYesResolve via distru-search-packages.
includeQuantityCostItemsbooleanNoquantityCostItems: 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.

FieldTypePresence
packageobjectCan be null
package.idstringAlways
package.customFieldsobject[]Always
package.customFields[].customFieldobjectAlways
package.customFields[].customField.idstringAlways
package.customFields[].customField.namestringAlways
package.customFields[].customField.fieldTypeenum
CHECKBOXDATEDROPDOWNTEXT
Always
package.customFields[].valuestringCan be null
package.metrcLabelstringAlways
package.complianceTypeenum
BIOTRACKMETRCNONE
Always
package.metrcIdnumberCan be null
package.complianceProductNamestringCan be null
package.complianceStrainNamestringCan be null
package.distruStatusenum
ACTIVEASSEMBLINGDESTROYEDDISCONTINUEDFINISHEDON_HOLDRETURNINGSELLINGSOLDTRANSFERRED
Always
package.isActivebooleanAlways
package.metrcStatusenum
ACTIVEDISCONTINUEDFINISHEDONHOLDTRANSFERRED
Can be null
package.metrcProductionBatchNumberstringCan be null
package.metrcSourcePackageLabelsstring[]Can be null
package.syncingbooleanAlways
package.syncingReasonenum
ASSEMBLY_INPUTASSEMBLY_OUTPUTCOMPLIANCE_TRANSFERCREATE_HARVEST_PACKAGECREATE_PLANT_BATCHES_FROM_PACKAGEDESTROY_PACKAGEFINISH_PACKAGESALES_ORDERSTOCK_ADJUSTMENTUNFINISH_PACKAGEUNKNOWN
Can be null
package.batchNumberstringCan be null
package.descriptionstringCan be null
package.compliancePackagedDatestringCan be null
package.harvestDatestringCan be null
package.expirationDatestringCan be null
package.finishedAtstringCan be null
package.insertedAtstringAlways
package.updatedAtstringAlways
package.isTestSamplebooleanAlways
package.isTradeSamplebooleanAlways
package.isFinishedGoodbooleanCan be null
package.labTestingStateenum
FAILEDNOT_TESTEDPASSEDPENDING
Always
package.labTestingStateDatestringCan be null
package.quantitystringAlways
package.quantityActivestringAlways
package.quantityAssemblingstringAlways
package.quantityInMetrcstringCan be null
package.quantityCoststringCan be null
package.unitTypeobjectAlways
package.unitType.idstringAlways
package.unitType.namestringAlways
package.productobjectAlways
package.product.idstringAlways
package.product.namestringAlways
package.product.skustringAlways
package.batchobjectAlways
package.batch.idstringAlways
package.batch.namestringAlways
package.locationobjectAlways
package.location.idstringAlways
package.location.namestringAlways
package.licenseobjectAlways
package.license.idstringAlways
package.license.licenseNumberstringAlways
package.activeSalesOrderobjectCan be null
package.activeSalesOrder.idstringAlways
package.activeSalesOrder.orderNumberstringAlways
package.primaryTestResultobjectCan be null
package.primaryTestResult.idstringAlways
package.primaryTestResult.namestringAlways
package.primaryTestResult.labNamestringCan be null
package.primaryTestResult.releaseDatestringCan be null
package.primaryTestResult.thcPercentagestringCan be null
package.primaryTestResult.thcPercentageTotalstringCan be null
package.primaryTestResult.cbdPercentagestringCan be null
package.primaryTestResult.cbdPercentageTotalstringCan be null
package.quantityCostItemsobject[]Null or absent
package.quantityCostItems[].namestringAlways
package.quantityCostItems[].descriptionstringCan be null
package.quantityCostItems[].costTypeobjectCan be null
package.quantityCostItems[].costType.idstringAlways
package.quantityCostItems[].costType.namestringAlways
package.quantityCostItems[].createdByobjectCan be null
package.quantityCostItems[].createdBy.idstringAlways
package.quantityCostItems[].createdBy.fullNamestringAlways
package.quantityCostItems[].insertedAtstringAlways
package.quantityCostItems[].originobjectAlways
package.quantityCostItems[].origin.typeenum
ASSEMBLYBIOTRACK_ADJUSTMENTBIOTRACK_MANIFEST_RECEIVEDBREAKDOWNCOST_ENTRYMETRC_ADJUSTMENTMETRC_TRANSFER_RECEIVEDOTHERPACKAGE_IMPORTPLANT_BATCH_PACKAGINGPURCHASE_ORDERSTOCK_ADJUSTMENT
Always
package.quantityCostItems[].origin.purchaseOrderobjectCan be null
package.quantityCostItems[].origin.purchaseOrder.idstringAlways
package.quantityCostItems[].origin.purchaseOrder.purchaseNumberstringAlways
package.quantityCostItems[].origin.assemblyobjectCan be null
package.quantityCostItems[].origin.assembly.idstringAlways
package.quantityCostItems[].origin.assembly.numberstringAlways
package.quantityCostItems[].origin.breakdownobjectCan be null
package.quantityCostItems[].origin.breakdown.breakdownNumberstringCan be null
package.quantityCostItems[].recordedOnobjectAlways
package.quantityCostItems[].recordedOn.typeenum
PACKAGEBATCHPRODUCTHARVESTPLANTPLANT_BATCHMULTIPLE_PLANTSNONE
Always
package.quantityCostItems[].recordedOn.productobjectCan be null
package.quantityCostItems[].recordedOn.product.idstringAlways
package.quantityCostItems[].recordedOn.product.namestringAlways
package.quantityCostItems[].recordedOn.product.skustringAlways
package.quantityCostItems[].recordedOn.packageobjectCan be null
package.quantityCostItems[].recordedOn.package.idstringAlways
package.quantityCostItems[].recordedOn.package.metrcLabelstringAlways
package.quantityCostItems[].recordedOn.batchobjectCan be null
package.quantityCostItems[].recordedOn.batch.idstringAlways
package.quantityCostItems[].recordedOn.batch.namestringAlways
package.quantityCostItems[].recordedOn.harvestobjectCan be null
package.quantityCostItems[].recordedOn.harvest.namestringAlways
package.quantityCostItems[].recordedOn.plantobjectCan be null
package.quantityCostItems[].recordedOn.plant.labelstringCan be null
package.quantityCostItems[].recordedOn.plant.strainNamestringCan be null
package.quantityCostItems[].recordedOn.plantBatchobjectCan be null
package.quantityCostItems[].recordedOn.plantBatch.namestringAlways
package.quantityCostItems[].recordedOn.plantBatch.strainNamestringCan be null
package.quantityCostItems[].recordedOn.multiplePlantsobjectCan be null
package.quantityCostItems[].recordedOn.multiplePlants.summarystringAlways
package.quantityCostItems[].recordedOn.multiplePlants.detailsstringAlways
package.quantityCostItems[].quantitystringAlways
package.quantityCostItems[].costQuantitystringAlways
package.quantityCostItems[].unitTypeobjectAlways
package.quantityCostItems[].unitType.idstringAlways
package.quantityCostItems[].unitType.namestringAlways
package.quantityCostItems[].costPerUnitstringCan be null
package.quantityCostItems[].totalCoststringCan 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.