Search pending Metrc items

distru-search-pending-metrc-itemsRead

Searches the Metrc items of one license that Distru has queued but Metrc has not created yet.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
limitintegerNoDefault: 10
cursorstringNonextCursor of the previous call; keep the other arguments unchanged.
licenseIdstringYesResolve via distru-search-licenses.
searchstringNoCase-insensitive, fuzzy match on item name. Does not change sort order.
unitTypeCategoryenum
COUNTVOLUMEWEIGHT
No
sortByobjectNoDefault: most recently created first.
sortBy.directionenum
ASCDESC
Yes
sortBy.fieldenum
INSERTED_ATNAME
YesINSERTED_AT = pending row created in Distru.

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[].categorystringAlways
items[].unitOfMeasureNamestringAlways
items[].quantityTypeenum
COUNT_BASEDVOLUME_BASEDWEIGHT_BASED
Always
What the AI reads

Searches the Metrc items of one license that Distru has queued but Metrc has not created yet. Each row's id is a Distru ID and belongs in an assembly output's pendingMetrcItemId — never in metrcItemId; once Metrc accepts the item it leaves this list and appears in distru-search-metrc-items under its Metrc item ID. This list is usually empty: Distru normally syncs a new item to Metrc within seconds. A non-empty list means recently created items are still in flight — or, if entries linger, that the license's Metrc sync is stuck in Distru.