Search a menu's collections
distru-search-menu-collectionsReadLists the collections on one menu, or fetches one collection with its products (collectionId).
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| menuId | string | Yes | Resolve via distru-search-menus. |
| customerId | string | No | For the menu's seller: fills Recently Ordered with the products this customer's linked Distru company ordered in the last 6 months (Sales Order form orders can take an hour), by name, not recency. Needs collectionId, includeProducts or productLimit. Empty without it or for a customer never linked, so not proof of no orders. Doesn't change prices. Resolve via distru-search-companies. |
| collectionId | string | No | Returns only this collection, with its products. To find one by name, list them without collectionId (limit 100). |
| includeProducts | boolean | No | Products of every listed collection; large, so prefer collectionId for one. Always on with collectionId. |
| productLimit | integer | No | Products per collection, by name. Default 120; productCount is the full count. |
| sortBy | object | No | Default: most recently updated first. Ignored with collectionId. |
| sortBy. | enumASCDESC | Yes | |
| sortBy. | enumINSERTED_ATNAMEPOSITIONUPDATED_AT | Yes | NAME = customName when set, else name; POSITION = display order on the menu. |
| limit | integer | No | Default: 10 |
| cursor | string | No | nextCursor of the previous call; keep the other arguments unchanged. |
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[]. | string | Always |
| items[]. | string | Always |
| items[]. | string | Can be null |
| items[]. | boolean | Always |
| items[]. | number | Always |
| items[]. | integer | Can be absent |
| items[]. | object[] | Can be absent |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | enumMGPERCENT | 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[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | enumHIGH_CBDHYBRIDINDICAINDICA_DOMINANTSATIVASATIVA_DOMINANT | Can be null |
| items[]. | object | Always |
| items[]. | string | Always |
| items[]. | enumCOUNTVOLUMEWEIGHT | Can be null |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | boolean | Always |
| items[]. | string | Can be null |
| items[]. | object[] | Always |
| items[]. | string | Always |
| items[]. | string | Can be null |
| items[]. | object | Can be null |
| items[]. | string | Always |
| items[]. | string | Always |
What the AI reads
Lists the collections on one menu, or fetches one collection with its products (collectionId). To search or filter products across the whole menu use distru-search-menu-products; for a customer's order history, distru-search-sales-orders. A product's unitPrice is the base price per unit (a case costs unitPrice × unitsPerCase), before price-tier discounts, so it may not be what a buyer pays; null when the menu hides prices from the caller. For the tiers that can apply, use distru-search-price-tiers with menuIds and validAt: a tier with no customer condition applies to every buyer, while customerIds and customerGroupIds only find tiers that name them. A product's thcPercentageTotalRange spans the THC % of its in-stock lab results; thcPercentageTotalLevels lists the THC % a buyer must pick from and is empty unless the menu sells the product by potency.