Search Metrc packages
distru-search-metrc-packagesReadSearches the packages Metrc holds for one license, as Distru last synced them, whether or not they are in Distru inventory.
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. |
| licenseId | string | Yes | Resolve via distru-search-licenses. |
| search | string | No | Case-insensitive substring of the label. |
| labels | string[] | No | Exact full labels, ignoring case. |
| metrcIds | integer[] | No | |
| statuses | enum[]ACTIVEONHOLDFINISHEDDISCONTINUEDTRANSFERRED | No | Default ACTIVE and ONHOLD. ONHOLD = failed lab testing, pending remediation; TRANSFERRED = transferred out to another license. |
| importStatus | enumIMPORTABLEUNIMPORTEDIMPORTED | No | IMPORTED = imported into Distru; UNIMPORTED = not in Distru and not ignored for import; IMPORTABLE = UNIMPORTED, active or on hold, with quantity left. |
| searchMetrcItem | string | No | Case-insensitive substring of the Metrc item name. |
| searchMetrcStrain | string | No | Case-insensitive substring of the strain name. |
| searchMetrcCategory | string | No | Case-insensitive substring of the Metrc item category. |
| metrcLocationIds | string[] | No | Metrc location IDs. Resolve via distru-search-metrc-locations. |
| labTestingStates | string[] | No | Exact Metrc lab testing states, e.g. TestPassed, TestFailed, NotSubmitted. |
| isTestingSample | boolean | No | |
| isTradeSample | boolean | No | |
| isFinishedGood | boolean | No | |
| sortBy | object | No | Default: most recently modified in Metrc first. |
| sortBy. | enumASCDESC | Yes | |
| sortBy. | enumINSERTED_ATUPDATED_ATLABEL | Yes | INSERTED_AT = created in Metrc; UPDATED_AT = last modified in Metrc. |
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[]. | number | Always |
| items[]. | string | Always |
| items[]. | enumACTIVEDISCONTINUEDFINISHEDINACTIVEONHOLDTRANSFERRED | Always |
| items[]. | string | Always |
| items[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | object | Always |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | string[] | Always |
| items[]. | string[] | Always |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | boolean | Always |
| items[]. | boolean | Always |
| items[]. | boolean | Always |
| items[]. | boolean | Always |
| items[]. | string | Can be null |
| items[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | object | Always |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | string | Always |
What the AI reads
Searches the packages Metrc holds for one license, as Distru last synced them, whether or not they are in Distru inventory. To bring packages into Distru, use distru-import-metrc-packages; for packages already in inventory, use distru-search-packages. package is the Distru package it was imported as, null when not imported. quantity is Metrc's, in unitType: the Distru unit matching Metrc's unit of measure, null when the company has none. productMostRecentlyMappedToMetrcItem is the product the package's Metrc item was last mapped to on this license, the likely product to import it as; null when never mapped or that product is inactive, deleted or hidden from you.