Search lookups
distru-search-lookupsReadSearches your named lists, such as product categories, tags, groups, payment terms and taxes.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Default 10; PRODUCT_CATEGORY, LICENSE_TYPE and COMPANY_CATEGORY 100. |
| cursor | string | No | nextCursor of the previous call; keep the other arguments unchanged. |
| chargeTypes | enum[]CHARGEDISCOUNT | No | CHARGE_PRESET only. |
| ids | string[] | No | IDs of the chosen type; unknown IDs are ignored, not errors. Not for PAYMENT_METHOD, LICENSE_TYPE or COMPANY_CATEGORY. TAX: deleted taxes still match. |
| search | string | No | Case-insensitive substring of name; PRODUCT_CATEGORY also matches subcategory names and still returns every subcategory; PAYMENT_METHOD also fuzzy word match. Not for TAX. |
| status | enumACTIVEANYINACTIVE | No | COST_TYPE or UNIT_TYPE only. COST_TYPE: whether it can still be picked for new costs. Default ACTIVE. |
| unitTypeCategories | enum[]COUNTVOLUMEWEIGHT | No | UNIT_TYPE only. |
| sortBy | object | No | Default: most recently updated first; PRODUCT_CATEGORY name A–Z. Ignored when search is set, except on PAYMENT_METHOD and CHARGE_PRESET. Not for LICENSE_TYPE or COMPANY_CATEGORY, always name A–Z. |
| sortBy. | enumASCDESC | Yes | |
| sortBy. | enumINSERTED_ATNAMEUPDATED_AT | Yes | |
| type | enum13 valuesCOMPANY_GROUPRELATIONSHIP_TYPEPRODUCT_TAGPRODUCT_GROUPPRODUCT_CATEGORYUNIT_TYPECOST_TYPEPAYMENT_METHODPAYMENT_TERMTAXCHARGE_PRESETLICENSE_TYPECOMPANY_CATEGORY | Yes |
Output
This tool returns one of 8 shapes, depending on its inputs.
Presence on a nested field assumes its parent exists.
Result shape 1
| 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 |
Result shape 2
| 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[]. | object[] | Always |
| items[]. | string | Always |
| items[]. | string | Always |
Result shape 3
| 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[]. | enumCOUNTVOLUMEWEIGHT | Can be null |
| items[]. | boolean | Always |
| items[]. | boolean | Always |
Result shape 4
| 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[]. | boolean | Always |
| items[]. | string | Can be null |
| items[]. | object | Always |
| items[]. | string | Always |
| items[]. | string | Always |
Result shape 5
| 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[]. | number | Always |
Result shape 6
| 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 | Always |
| items[]. | string | Can be null |
| items[]. | string | Always |
| items[]. | boolean | Can be null |
| items[]. | boolean | Can be null |
| items[]. | string | Can be null |
| items[]. | boolean | Always |
| items[]. | enumNON_VERTICALVERTICAL | Can be null |
| items[]. | string | Can be null |
Result shape 7
| 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[]. | enumCHARGEDISCOUNT | Always |
| items[]. | enumPERCENTPRICE | Always |
| items[]. | string | Can be null |
| items[]. | string | Can be null |
| items[]. | boolean | Always |
| items[]. | boolean | Always |
| items[]. | boolean | Always |
| items[]. | object[] | Always |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | string | Always |
| items[]. | string | Always |
Result shape 8
| Field | Type | Presence |
|---|---|---|
| hasMore | boolean | Always |
| nextCursor | string | Can be absent |
| totalCount | integer | Can be absent |
| items | object[] | Always |
| items[]. | string | Always |
What the AI reads
Searches one of the company's named lists other records point at, picked by type: COMPANY_GROUP, company groups it sorts companies into; RELATIONSHIP_TYPE, relationship types saying how it deals with a company (e.g. Current Customer); PRODUCT_TAG, product tags (a product can carry many); PRODUCT_GROUP, product groups (a product is in at most one); PRODUCT_CATEGORY, product categories, one row per category with every subcategory; UNIT_TYPE, unit types (Gram, Unit, Ounce…) and what each measures; COST_TYPE, cost types, e.g. Labor; PAYMENT_METHOD, payment methods (cash, check, card…); PAYMENT_TERM, payment terms (e.g. Net 30); TAX, tax definitions applied to sales; CHARGE_PRESET, charge presets: saved charge or discount templates for orders and invoices; LICENSE_TYPE and COMPANY_CATEGORY, license types and company categories valid in the company's state, names only (no IDs). Use it to resolve an ID by name; for the records carrying one use the tool whose filter takes it, e.g. distru-search-products tagIds. PRODUCT_CATEGORY: deleted categories are never returned; subcategory names are unique only within their category, so tell them apart by ID; a product's subcategory must belong to its category. COST_TYPE: costPerUnit is the rate per unit of its unitType, null when the caller's role may not view cost type rates. TAX: taxes are few, so read them all or filter by ids; deleted taxes come back with deletedAt set, so treat a non-null deletedAt as no longer in use; taxAppliedAfterCharges and taxAppliedAfterPriceTiers are the CA excise ordering flags, and a Michigan tax always applies before discounts, after charges and after other taxes; companyCategories is a comma-separated list of company category names. CHARGE_PRESET: unitType PRICE sets price, PERCENT sets percent; amounts are positive and a DISCOUNT subtracts them; autoApplyTagsOn* say whether the preset is added when a product with one of its tags joins that kind of order; non-admins see only unowned presets, their own and their teams'.