Search assemblies
distru-search-assembliesReadSearches assemblies — jobs that consume input inventory and produce output products.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Default: 10 |
| cursor | string | No | nextCursor of the previous call; keep the other arguments unchanged. |
| completedDateAfter | string | No | Completed on or after. YYYY-MM-DD (start of day, company timezone) or ISO 8601 with a UTC offset. |
| completedDateBefore | string | No | Completed on or before. YYYY-MM-DD (end of day, company timezone) or ISO 8601 with a UTC offset. |
| createdDateAfter | string | No | Created on or after. YYYY-MM-DD (start of day, company timezone) or ISO 8601 with a UTC offset. |
| createdDateBefore | string | No | Created on or before. YYYY-MM-DD (end of day, company timezone) or ISO 8601 with a UTC offset. |
| creatorIds | string[] | No | Resolve via distru-search-users. |
| estimatedStartDateAfter | string | No | Estimated start on or after. YYYY-MM-DD (start of day, company timezone) or ISO 8601 with a UTC offset. |
| estimatedStartDateBefore | string | No | Estimated start on or before. YYYY-MM-DD (end of day, company timezone) or ISO 8601 with a UTC offset. |
| ids | string[] | No | Assembly IDs. |
| inputBatchIds | string[] | No | Resolve via distru-search-batches. |
| inputPackageBatchNumbers | string[] | No | Exact, case-sensitive. |
| inputPackageMetrcLabels | string[] | No | Exact, case-sensitive. |
| inputPackageIds | string[] | No | Resolve via distru-search-packages. |
| inputProductIds | string[] | No | Resolve via distru-search-products. |
| kinds | enum[]MANUFACTURINGPACKAGE_SPLITTEST_SAMPLESALES_ORDER_REPACKAGE | No | MANUFACTURING: built in the assembly form; the others are package splits, lab test samples taken from a package and sales order repackages. Omitted = MANUFACTURING only. |
| licenseNumber | string | No | Exact license number. |
| outputBatchIds | string[] | No | Resolve via distru-search-batches. |
| outputLicenseIds | string[] | No | Output location under these licenses. Resolve via distru-search-licenses. |
| outputPackageBatchNumbers | string[] | No | Exact, case-sensitive. |
| outputPackageMetrcLabels | string[] | No | Exact, case-sensitive. |
| outputPackageIds | string[] | No | Resolve via distru-search-packages. |
| outputProductCategoryIds | string[] | No | Output product's category. Resolve via distru-search-lookups (type PRODUCT_CATEGORY). |
| outputProductIds | string[] | No | Resolve via distru-search-products. |
| ownerIds | string[] | No | Owner, not creator. Resolve via distru-search-users. |
| search | string | No | Case-insensitive substring of assembly number. Ranks by similarity; sortBy ignored. |
| statuses | enum[]COMPLETEDPENDING | No | PENDING outputs are not yet in inventory. |
| updatedDateAfter | string | No | Updated on or after. YYYY-MM-DD (start of day, company timezone) or ISO 8601 with a UTC offset. |
| updatedDateBefore | string | No | Updated on or before. YYYY-MM-DD (end of day, company timezone) or ISO 8601 with a UTC offset. |
| customFields | object[] | No | Set one of contains, anyOf or onOrAfter/onOrBefore per entry. Records with no value for the field never match. |
| customFields[]. | string | Yes | Resolve via distru-search-custom-fields. |
| customFields[]. | string | No | TEXT: case-insensitive substring. |
| customFields[]. | string[] | No | DROPDOWN, CHECKBOX: any of these options, case-sensitive. |
| customFields[]. | string | No | DATE: YYYY-MM-DD, company timezone. |
| customFields[]. | string | No | DATE: YYYY-MM-DD, company timezone. |
| sortBy | object | No | Default: most recently updated first. Ignored when search is set. |
| sortBy. | enumASCDESC | Yes | |
| sortBy. | enumASSEMBLY_NUMBERINSERTED_ATUPDATED_AT | Yes |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence |
|---|---|---|
| hasMore | boolean | Always |
| nextCursor | string | Can be absent |
| totalCount | integer | Can be absent |
| items | object[] | Always |
| items[]. | string | Always |
| items[]. | object[] | Always |
| items[]. | object | Always |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | enumCHECKBOXDATEDROPDOWNTEXT | Always |
| items[]. | string | Can be null |
| items[]. | string | Always |
| items[]. | enumCOMPLETEDPENDING | Always |
| items[]. | enumBIOTRACKMETRCNONE | Always |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | number | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | object | Always |
| items[]. | string | Always |
| items[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | object | Always |
| items[]. | string | Always |
| items[]. | object[] | Always |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | enumMANUFACTURINGPACKAGE_SPLITTEST_SAMPLESALES_ORDER_REPACKAGE | Always |
What the AI reads
Searches assemblies — jobs that consume input inventory and produce output products. One row per assembly with its kind, status, cost, dates, license, owner, creator and outputProducts (each product it outputs, listed once however many outputs share it), so group by outputProducts to compare product lines; the inputs, outputs and their packages are not returned — use distru-get-assembly for those. Distru records no actual start time: createdDate is when the assembly was entered, often at completion, and estimatedStartDate is the plan, so createdDate to completedAt is entry time, not production time. All input* filters must match the same input; all output* filters the same output (outputLicenseIds excepted).