Search harvests

distru-search-harvestsRead

Searches harvests, the last step of the plant lifecycle after the teardown.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
limitintegerNoDefault: 10
cursorstringNonextCursor of the previous call; keep the other arguments unchanged.
idsstring[]No
licenseIdstringNoFilter to harvests under this license. Resolve via distru-search-licenses.
locationIdsstring[]NoFilter to harvests at these locations. Resolve via distru-search-locations.
metrcStrainNamesstring[]NoExact Metrc strain names. Matches any of them.
harvestedAfterstringNoHarvested on or after. YYYY-MM-DD (start of day, company timezone) or ISO 8601 with a UTC offset.
harvestedBeforestringNoHarvested on or before. YYYY-MM-DD (end of day, company timezone) or ISO 8601 with a UTC offset.
finishedAfterstringNoFinished on or after. YYYY-MM-DD.
finishedBeforestringNoFinished on or before. YYYY-MM-DD.
teardownIdstringNoFilter to harvests created from this teardown. Resolve via distru-search-teardowns.
searchstringNoCase-insensitive substring match on the harvest name. Ranks by name similarity after any explicit sortBy.
distruStatusenum
DISCONTINUEDDRYINGFINISHEDON_HOLDPACKAGING
NoFilter by the harvest lifecycle status.
excludeIdsstring[]NoHarvest IDs to leave out of the results.
sortByobjectNoSort options. Defaults to most recently updated first when omitted. With search, an explicit sortBy ranks first and name similarity breaks ties; without one, similarity alone ranks.
sortBy.directionenum
ASCDESC
Yes
sortBy.fieldenum
NAMEHARVESTED_ATINSERTED_ATUPDATED_ATSUBMITTED_FOR_REVIEW_AT
YesField to sort by.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
hasMorebooleanAlways
nextCursorstringCan be absent
totalCountintegerCan be absent
itemsobject[]Always
items[].idstringAlways
items[].namestringAlways
items[].distruStatusenum
DISCONTINUEDDRYINGFINISHEDON_HOLDPACKAGING
Always
items[].harvestedAtstringCan be null
items[].finishedDatestringCan be null
items[].wetWeightstringAlways
items[].metrcStrainobjectAlways
items[].metrcStrain.idnumberCan be null
items[].metrcStrain.namestringAlways
items[].unitTypeobjectAlways
items[].unitType.idstringAlways
items[].unitType.namestringAlways
items[].licenseobjectAlways
items[].license.idstringAlways
items[].license.licenseNumberstringAlways
items[].locationobjectCan be null
items[].location.idstringAlways
items[].location.namestringAlways
What the AI reads

Searches cultivation harvests, the final lifecycle step: plant group → plants → teardown (distru-search-teardowns; submitting one creates harvests) → harvests. A harvest is the harvested plant material of one strain under one license. One row per harvest. wetWeight is in unitType. Never returns removed harvests or harvests in PREPARING status, even when filtered for by distruStatus.