Search Metrc manifests

distru-search-metrc-manifestsRead

Searches Metrc transfer manifests across the company's Metrc licenses, as Distru last synced them from Metrc.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
limitintegerNoDefault: 10
cursorstringNonextCursor of the previous call; keep the other arguments unchanged.
searchstringNoSubstring of manifest number.
searchLicenseNumberstringNoCase-insensitive substring of shipper or any recipient license number. For the company license a manifest belongs to, use licenseIds.
directionenum
INCOMINGOUTGOING
NoINCOMING = shipped to the license the manifest belongs to; OUTGOING = shipped from it.
importStatusenum
IMPORTABLEUNIMPORTEDIMPORTEDIGNORED
NoIMPORTABLE = not imported or ignored, and importable now per its package states; UNIMPORTED = not imported or ignored, importable or not.
licenseIdsstring[]NoResolve via distru-search-licenses.
packageLabelstringNoExact 24-char Metrc tag of a package on the manifest.
receivedbooleanNofalse = not received yet, e.g. open incoming manifests. A voided manifest is never received.
voidedbooleanNoPass false to leave out manifests the shipper canceled in Metrc.
sortByobjectNoDefault: most recently modified in Metrc first.
sortBy.directionenum
ASCDESC
Yes
sortBy.fieldenum
INSERTED_ATUPDATED_ATMANIFEST_NUMBER
YesINSERTED_AT = created in Metrc; UPDATED_AT = last modified in Metrc; MANIFEST_NUMBER sorts like INSERTED_AT.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
hasMorebooleanAlways
nextCursorstringCan be absent
totalCountintegerCan be absent
itemsobject[]Always
items[].manifestNumberstringAlways
items[].shipperNamestringAlways
items[].shipperLicenseNumberstringAlways
items[].transporterNamestringCan be null
items[].transporterLicenseNumberstringCan be null
items[].recipientsobject[]Always
items[].recipients[].namestringAlways
items[].recipients[].licenseNumberstringAlways
items[].shipmentTypeNamestringCan be null
items[].packageCountnumberAlways
items[].importStatusenum
IGNOREDIMPORTABLEIMPORTEDUNIMPORTED
Always
items[].isImportablebooleanAlways
items[].importableDetailsstringCan be null
items[].licenseobjectAlways
items[].license.idstringAlways
items[].license.licenseNumberstringAlways
items[].salesOrderobjectCan be null
items[].salesOrder.idstringAlways
items[].salesOrder.orderNumberstringAlways
items[].salesOrder.customerobjectCan be null
items[].salesOrder.customer.idstringAlways
items[].salesOrder.customer.namestringNull or absent
items[].purchaseOrderobjectCan be null
items[].purchaseOrder.idstringAlways
items[].purchaseOrder.purchaseNumberstringAlways
items[].createdDatetimestringAlways
items[].lastModifiedDatetimestringAlways
items[].receivedDatetimestringCan be null
items[].voidedbooleanCan be null
items[].fetchedDatetimestringAlways
items[].directionenum
INCOMINGOUTGOING
Always
What the AI reads

Searches Metrc transfer manifests across the company's Metrc licenses, as Distru last synced them from Metrc. One row per manifest, without its deliveries or packages — use distru-get-metrc-manifest for those. Not for Distru stock transfers. recipients lists one entry per license an outgoing manifest delivers to; an incoming manifest's recipient is the company's own license. Pair salesOrder.customer with recipients to map customers to the Metrc licenses they were shipped to. fetchedDatetime is when Distru fetched this version from Metrc, not a Metrc time. importStatus is IMPORTED (as the salesOrder of an outgoing manifest, the purchaseOrder of an incoming one, or a stock transfer), IGNORED or UNIMPORTED, never IMPORTABLE; isImportable says whether Metrc's package states allow importing it. An outgoing manifest's receivedDatetime is when its last delivery was received. voided is true when the shipper canceled the manifest in Metrc, which is not a rejection by the recipient; a voided manifest is never received; null on manifests last synced before Metrc reported it. An internal transfer between two of the company's licenses appears as two manifests with the same manifestNumber, one per direction.