Search assemblies

distru-search-assembliesRead

Searches assemblies — jobs that consume input inventory and produce output products.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
limitintegerNoDefault: 10
cursorstringNonextCursor of the previous call; keep the other arguments unchanged.
completedDateAfterstringNoCompleted on or after. YYYY-MM-DD (start of day, company timezone) or ISO 8601 with a UTC offset.
completedDateBeforestringNoCompleted on or before. YYYY-MM-DD (end of day, company timezone) or ISO 8601 with a UTC offset.
createdDateAfterstringNoCreated on or after. YYYY-MM-DD (start of day, company timezone) or ISO 8601 with a UTC offset.
createdDateBeforestringNoCreated on or before. YYYY-MM-DD (end of day, company timezone) or ISO 8601 with a UTC offset.
creatorIdsstring[]NoResolve via distru-search-users.
estimatedStartDateAfterstringNoEstimated start on or after. YYYY-MM-DD (start of day, company timezone) or ISO 8601 with a UTC offset.
estimatedStartDateBeforestringNoEstimated start on or before. YYYY-MM-DD (end of day, company timezone) or ISO 8601 with a UTC offset.
idsstring[]NoAssembly IDs.
inputBatchIdsstring[]NoResolve via distru-search-batches.
inputPackageBatchNumbersstring[]NoExact, case-sensitive.
inputPackageMetrcLabelsstring[]NoExact, case-sensitive.
inputPackageIdsstring[]NoResolve via distru-search-packages.
inputProductIdsstring[]NoResolve via distru-search-products.
kindsenum[]
MANUFACTURINGPACKAGE_SPLITTEST_SAMPLESALES_ORDER_REPACKAGE
NoMANUFACTURING: built in the assembly form; the others are package splits, lab test samples taken from a package and sales order repackages. Omitted = MANUFACTURING only.
licenseNumberstringNoExact license number.
outputBatchIdsstring[]NoResolve via distru-search-batches.
outputLicenseIdsstring[]NoOutput location under these licenses. Resolve via distru-search-licenses.
outputPackageBatchNumbersstring[]NoExact, case-sensitive.
outputPackageMetrcLabelsstring[]NoExact, case-sensitive.
outputPackageIdsstring[]NoResolve via distru-search-packages.
outputProductCategoryIdsstring[]NoOutput product's category. Resolve via distru-search-lookups (type PRODUCT_CATEGORY).
outputProductIdsstring[]NoResolve via distru-search-products.
ownerIdsstring[]NoOwner, not creator. Resolve via distru-search-users.
searchstringNoCase-insensitive substring of assembly number. Ranks by similarity; sortBy ignored.
statusesenum[]
COMPLETEDPENDING
NoPENDING outputs are not yet in inventory.
updatedDateAfterstringNoUpdated on or after. YYYY-MM-DD (start of day, company timezone) or ISO 8601 with a UTC offset.
updatedDateBeforestringNoUpdated on or before. YYYY-MM-DD (end of day, company timezone) or ISO 8601 with a UTC offset.
customFieldsobject[]NoSet one of contains, anyOf or onOrAfter/onOrBefore per entry. Records with no value for the field never match.
customFields[].customFieldIdstringYesResolve via distru-search-custom-fields.
customFields[].containsstringNoTEXT: case-insensitive substring.
customFields[].anyOfstring[]NoDROPDOWN, CHECKBOX: any of these options, case-sensitive.
customFields[].onOrAfterstringNoDATE: YYYY-MM-DD, company timezone.
customFields[].onOrBeforestringNoDATE: YYYY-MM-DD, company timezone.
sortByobjectNoDefault: most recently updated first. Ignored when search is set.
sortBy.directionenum
ASCDESC
Yes
sortBy.fieldenum
ASSEMBLY_NUMBERINSERTED_ATUPDATED_AT
Yes

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
hasMorebooleanAlways
nextCursorstringCan be absent
totalCountintegerCan be absent
itemsobject[]Always
items[].idstringAlways
items[].customFieldsobject[]Always
items[].customFields[].customFieldobjectAlways
items[].customFields[].customField.idstringAlways
items[].customFields[].customField.namestringAlways
items[].customFields[].customField.fieldTypeenum
CHECKBOXDATEDROPDOWNTEXT
Always
items[].customFields[].valuestringCan be null
items[].numberstringAlways
items[].statusenum
COMPLETEDPENDING
Always
items[].complianceTypeenum
BIOTRACKMETRCNONE
Always
items[].descriptionstringCan be null
items[].coststringCan be null
items[].estimatedStartDatestringCan be null
items[].estimatedWorkMinutesnumberCan be null
items[].completedAtstringCan be null
items[].createdDatestringAlways
items[].updatedDatestringAlways
items[].licenseobjectCan be null
items[].license.idstringAlways
items[].license.licenseNumberstringAlways
items[].ownerobjectCan be null
items[].owner.idstringAlways
items[].owner.profileobjectAlways
items[].owner.profile.fullNamestringAlways
items[].creatorobjectCan be null
items[].creator.idstringAlways
items[].creator.profileobjectAlways
items[].creator.profile.fullNamestringAlways
items[].outputProductsobject[]Always
items[].outputProducts[].idstringAlways
items[].outputProducts[].namestringAlways
items[].kindenum
MANUFACTURINGPACKAGE_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).