Search a menu's products
distru-search-menu-productsReadSearches the products on one menu, with quantity available, sold-out status and THC as that menu shows them.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| menuId | string | Yes | Resolve via distru-search-menus. |
| search | string | No | Matches name, SKU, strain, brand, category, subcategory, strain type, category type, and product group (if the menu allows group filtering). Ranks by relevance; sortBy ignored. |
| productIds | string[] | No | Resolve via distru-search-products. |
| officialProductCategories | enum[]CAPSULESCLONESCONCENTRATESEDIBLESFLOWERMERCHOTHERPREROLLSTINCTURESTOPICALSVAPES | No | Category type. See productCategoryIds. |
| productCategoryIds | string[] | No | Narrows only its own category type: FLOWER + EDIBLES + a Gummies category returns all flower but only gummies. Works alone, also for a category with no category type. From includeFilterOptions (only categories with a category type). Resolve via distru-search-lookups (type PRODUCT_CATEGORY). |
| productSubcategoryIds | string[] | No | Narrows only its own category, as productCategoryIds narrows a category type. Works alone. From includeFilterOptions. Resolve via distru-search-lookups (type PRODUCT_CATEGORY, each row's subcategories). |
| strainTypes | enum[]HIGH_CBDHYBRIDINDICAINDICA_DOMINANTSATIVASATIVA_DOMINANT | No | |
| strainIds | string[] | No | From includeFilterOptions or a row's strain. |
| brandIds | string[] | No | Brand, itself a company. From includeFilterOptions or a row's brand, or resolve via distru-search-companies. |
| productGroupIds | string[] | No | From includeFilterOptions. Resolve via distru-search-lookups (type PRODUCT_GROUP). |
| includeFilterOptions | boolean | No | Adds filterOptions: the values of each filter this menu shows, keyed by the param they go in; category types nest their categories and subcategories. They span the whole menu (or productIds), not search or the other filters. Slow on large menus. |
| sortBy | object | No | Default: most recently updated on the menu first. Ignored when search is set; to find by name, use search. |
| sortBy. | enumASCDESC | Yes | |
| sortBy. | enumINSERTED_ATPRODUCT_NAMEUPDATED_AT | Yes | INSERTED_AT = added to the menu; UPDATED_AT = menu listing last changed; PRODUCT_NAME = buyer-facing name. |
| 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 |
| note | string | Can be absent |
| filterOptions | object | Can be absent |
| filterOptions. | object[] | Can be absent |
| filterOptions. | string | Always |
| filterOptions. | string | Always |
| filterOptions. | object[] | Can be absent |
| filterOptions. | string | Always |
| filterOptions. | string | Always |
| filterOptions. | object[] | Can be absent |
| filterOptions. | string | Always |
| filterOptions. | string | Always |
| filterOptions. | object[] | Can be absent |
| filterOptions. | string | Always |
| filterOptions. | string | Always |
| filterOptions. | object[] | Can be absent |
| filterOptions. | string | Always |
| filterOptions. | string | Always |
| filterOptions. | object[] | Can be absent |
| filterOptions. | string | Always |
| filterOptions. | string | Always |
| filterOptions. | object[] | Can be absent |
| filterOptions. | string | Always |
| filterOptions. | string | Always |
| filterOptions. | object[] | Can be absent |
| filterOptions. | string | Always |
| filterOptions. | string | Always |
| items | object[] | Always |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | string | Can be null |
| items[]. | number | 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[]. | 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
Searches the products on one menu, with quantity available, sold-out status and THC as that menu shows them. Use it instead of distru-search-products when finding products to add to an order — it only shows products available on the menu. For which products are placed on a menu, including ones buyers don't see, use distru-search-products menuIds / notOnMenuIds. A filter given several values matches any of them. 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.