Get an assembly
distru-get-assemblyReadGets one assembly by ID: header detail with kind, status, cost, license and owner.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Resolve via distru-search-assemblies. |
| includeAssemblyLines | boolean | No | Output lines, each with the input lines consumed into it. |
| includeOutputCostItems | boolean | No | costItems on each output line; returns the output lines even without includeAssemblyLines, not their inputs. costItems: the costs that make up the output's cost, 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 output; 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 output, 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. |
| includeOutputAddedCosts | boolean | No | addedCosts on each output line: costs added in this assembly, e.g. labor or packaging. Returns the output lines even without includeAssemblyLines, not their inputs. quantity is in unitType (the cost type's, else the output product's). costPerUnit and totalCost null when no cost per unit recorded or caller can't see it. Once the output is completed these are also in its costItems with origin.type ASSEMBLY; never add the two. |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence |
|---|---|---|
| assembly | object | Can be null |
| assembly. | string | Always |
| assembly. | object[] | Always |
| assembly. | object | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | enumCHECKBOXDATEDROPDOWNTEXT | Always |
| assembly. | string | Can be null |
| assembly. | string | Always |
| assembly. | enumCOMPLETEDPENDING | Always |
| assembly. | enumBIOTRACKMETRCNONE | Always |
| assembly. | string | Can be null |
| assembly. | string | Can be null |
| assembly. | string | Can be null |
| assembly. | number | Can be null |
| assembly. | string | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Always |
| assembly. | string | Always |
| assembly. | enumMANUFACTURINGPACKAGE_SPLITTEST_SAMPLESALES_ORDER_REPACKAGE | Always |
| assembly. | object[] | Can be absent |
| assembly. | string | Always |
| assembly. | enumCOMPLETEDPENDING | Always |
| assembly. | string | Always |
| assembly. | string | Can be null |
| assembly. | string | Can be null |
| assembly. | string | Can be null |
| assembly. | string | Can be null |
| assembly. | string | Can be null |
| assembly. | object | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Can be null |
| assembly. | object[] | Can be absent |
| assembly. | string | Always |
| assembly. | enumCOMPLETEDDRAFTPENDING | Always |
| assembly. | string | Always |
| assembly. | object | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Can be null |
| assembly. | object[] | Null or absent |
| assembly. | string | Always |
| assembly. | string | Can be null |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Always |
| assembly. | enumASSEMBLYBIOTRACK_ADJUSTMENTBIOTRACK_MANIFEST_RECEIVEDBREAKDOWNCOST_ENTRYMETRC_ADJUSTMENTMETRC_TRANSFER_RECEIVEDOTHERPACKAGE_IMPORTPLANT_BATCH_PACKAGINGPURCHASE_ORDERSTOCK_ADJUSTMENT | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Can be null |
| assembly. | object | Always |
| assembly. | enumPACKAGEBATCHPRODUCTHARVESTPLANTPLANT_BATCHMULTIPLE_PLANTSNONE | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | object | Can be null |
| assembly. | string | Can be null |
| assembly. | string | Can be null |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Can be null |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Can be null |
| assembly. | string | Can be null |
| assembly. | object[] | Can be absent |
| assembly. | string | Always |
| assembly. | string | Can be null |
| assembly. | object | Can be null |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | object | Always |
| assembly. | string | Always |
| assembly. | string | Always |
| assembly. | string | Can be null |
| assembly. | string | Can be null |
What the AI reads
Gets one assembly by ID: header detail with kind, status, cost, license and owner. Output lines and the input lines consumed into them are left out unless you pass includeAssemblyLines; includeOutputCostItems and includeOutputAddedCosts add each output's cost breakdown and the costs added on it in this assembly. Use for a specific assembly after resolving its ID via distru-search-assemblies; to browse assemblies use distru-search-assemblies. cost is null when the caller lacks permission to view costs. Line quantity is in the product's unit type; complianceQuantity is the quantity in the package's unit type (input package.unitType, output packageUnitType) as tracked in Metrc, null when complianceType is NONE. An output's batchNumber is the batchNumber its package gets (for a batch-tracked product, its batch's), not the linked Distru batch, whose name is batch.name. Null if no assembly matches the ID; a permission error if the caller can't view it.