{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":720,"path":"api-reference/server-api-reference/CatalogSearchAPI-scoped_global.md","title":"CatalogSearchAPI - Scoped, Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# CatalogSearchAPI- Scoped, Global\n\nCatalogSearchAPI is a script include used to search and retrieve product catalog data from all application scopes.\n\nThe CatalogSearchAPI API is available by default with the Product Catalog Management application and is offered as the script include sn\\_prd\\_pm.CatalogSearchAPI under the namespace sn\\_prd\\_pm. No special roles are required to access this API.\n\nThe [Product Catalog Search API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/product-catalog-search-api.md) REST API wraps this CatalogSearchAPI JavaScript API.\n\n**Note:** There are distinct differences between this API and [CatalogSearch - Scoped](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_CatalogSearchScoped.md) though they're almost identically named. CatalogSearch API is a native ServiceNow platform API documented in the public API reference under `com.glideapp.servicecatalog.CatalogSearch`. It provides basic catalog item search functionality available in scoped scripts via the standard platform.\n\nThis API, CatalogSearchAPI \\(sn\\_prd\\_pm.CatalogSearchAPI\\), is the script include wrapper API specific to the Product Catalog Management application. Use this API to query product offerings, service specifications, and catalog-category hierarchies, with support for account-specific pricing, eligibility, and localization through a `headerContext` object.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## CatalogSearchAPI - CatalogSearch\\(\\)\n\nCreates an instance of the CatalogSearchAPI class.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| ||\n\nThe following example is a constructor for the CatalogSearchAPI class:\n\n```\nvar catalogSearch = new sn_prd_pm.CatalogSearchAPI();\n```\n\n## CatalogSearchAPI – getCatalogData\\(Object input\\)\n\nSearches the product catalog and returns matching catalog items with optional pricing information. Supports searching across multiple catalog types.\n\nCapabilities provided:\n\n-   Search products by search term across one or all catalogs and across one or all categories within a catalog.\n-   Filter results by catalog, category, and catalog type \\(defaults to Product Offering\\).\n-   Page through result sets using a zero-based page index and page limit.\n-   Supply a header context object to apply account-specific pricing, price lists, currency, channel, shipping/billing address, and sales agreement to search results.\n-   Control sort order and sort field \\(for example, by relevance score\\).\n-   Optionally pass an AI Search suggestion ID to support AI-assisted search flows.\n\n<table id=\"table_lsj_snd_tjc\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\naiSearchSuggestionId\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of an AI Search suggestion record to associate with this search request. Used to support AI-assisted search flows.Default: empty string\n\n</td></tr><tr><td>\n\ncatalogType\n\n</td><td>\n\nString\n\n</td><td>\n\nType of catalog items to search. Case-sensitive.Valid values:\n\n-   `PRODUCT_OFFERING`: Fetch product offerings.\n-   `SERVICE_SPECIFICATION`: Fetch service specifications.\n\n</td></tr><tr><td>\n\nheaderContext\n\n</td><td>\n\nObject\n\n</td><td>\n\nContext object that controls pricing, eligibility, and localization applied to search results. When omitted, the API derives context from the account if one is provided.```\n\"headerContext\": {\n      \"account\": \"String\",\n      \"pricelist\": \"String\",\n      \"currency\": \"String\",\n      \"suppressPricing\": String,\n      \"transaction_date\": \"String\",\n      \"shipping_city\": \"String\",\n      \"shipping_country\": \"String\",\n      \"shipping_location\": \"String\",\n      \"shipping_state\": \"String\",\n      \"shipping_street\": \"String\",\n      \"shipping_zip\": \"String\",\n      \"billing_city\": \"String\",\n      \"billing_country\": \"String\",\n      \"billing_location\": \"String\",\n      \"billing_state\": \"String\",\n      \"billing_street\": \"String\",\n      \"billing_zip\": \"String\",\n      \"sales_agreement\": \"String\"\n    }\n```\n\n</td></tr><tr><td>\n\nheaderContext.account\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sys\\_id of the account to use for context resolution. When provided and other context fields are omitted, pricing and eligibility are resolved from the account.\n\n</td></tr><tr><td>\n\nheaderContext. billing\\_city\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. City for the billing address.\n\n</td></tr><tr><td>\n\nheaderContext. billing\\_country\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Country for the billing address.\n\n</td></tr><tr><td>\n\nheaderContext. billing\\_location\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sys\\_id of the billing location record.Table: Location \\[location\\]\n\n</td></tr><tr><td>\n\nheaderContext. billing\\_state\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. State or province code of the billing address.\n\n</td></tr><tr><td>\n\nheaderContext. billing\\_street\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Street address for billing.\n\n</td></tr><tr><td>\n\nheaderContext. billing\\_zip\n\n</td><td>\n\nString\n\n</td><td>\n\nPostal code for the billing address. Example: `75254-7536`Data type: String\n\n</td></tr><tr><td>\n\nheaderContext.currency\n\n</td><td>\n\nString\n\n</td><td>\n\nCurrency code to use for pricing. Example: `USD`.Default: Derived from account if not supplied. If account not provided, resolves to system currency.\n\n</td></tr><tr><td>\n\nheaderContext.pricelist\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sys\\_id of the price list to apply.Table: Pricing List \\[sn\\_csm\\_pricing\\_price\\_list\\]\n\nDefault: Derived from account if not supplied.\n\n</td></tr><tr><td>\n\nheaderContext. sales\\_agreement\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sys\\_id of the sales agreement to apply.Table: Sales Agreement \\[sn\\_sales\\_agmt\\_core\\_sales\\_agreement\\]\n\n</td></tr><tr><td>\n\nheaderContext. shipping\\_city\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. City for the shipping address.\n\n</td></tr><tr><td>\n\nheaderContext. shipping\\_country\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Country for the shipping address. Example: `USA`\n\n</td></tr><tr><td>\n\nheaderContext. shipping\\_location\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the shipping location record.Table: Location \\[location\\]\n\n</td></tr><tr><td>\n\nheaderContext. shipping\\_state\n\n</td><td>\n\nString\n\n</td><td>\n\nState or province for the shipping address. Example: `TX`\n\n</td></tr><tr><td>\n\nheaderContext. shipping\\_street\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Street address for shipping.\n\n</td></tr><tr><td>\n\nheaderContext. shipping\\_zip\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Postal code for the shipping address. Example: `75254-7536`\n\n</td></tr><tr><td>\n\nheaderContext. suppressPricing\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether to suppress pricing information in the response. Valid values:\n\n-   `true`: Pricing is suppressed.\n-   `false`: Pricing is included.\n\nDefault: false\n\n</td></tr><tr><td>\n\nheaderContext. transaction\\_date\n\n</td><td>\n\nString\n\n</td><td>\n\nDate and time of the transaction.Format: `yyyy-MM-dd HH:mm:ss` \\(Example: 2026-03-30 20:20:08\\)\n\n</td></tr><tr><td>\n\npageIndex\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Zero-based index of the page of results to return. Minimum value: 0\n\nDefault: 0\n\n</td></tr><tr><td>\n\npageLimit\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Number of search results per page.Default: 10\n\n</td></tr><tr><td>\n\nsearchTerm\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Keyword or phrase to search for in the product catalog. When null or empty, returns all products in the specified catalog. Default: null\n\n</td></tr><tr><td>\n\nselectedCatalog\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the catalog to search. Table: Product Offering Catalog \\[sn\\_prd\\_pm\\_product\\_offering\\_catalog\\]\n\nDefault: “allCatalog” \\(searches across all catalogs\\)\n\n</td></tr><tr><td>\n\nselectedCategory\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the category to filter results by. If providing this value, you must pass the **selectedCatalog** to which that particular category belongs to.Table: Product Offering Category \\[sn\\_prd\\_pm\\_product\\_offering\\_category\\]\n\nDefault: “showAll” \\(returns results from all categories within the catalog\\)\n\n</td></tr><tr><td>\n\nsortBy\n\n</td><td>\n\nString\n\n</td><td>\n\nField to sort results by. Accepted values are dependent on the value of **catalogType**.Valid values:\n\n-   PRODUCT\\_OFFERING:\n    -   `code`\n    -   `description`\n    -   `display_name`\n    -   `name`\n    -   `score`\n-   For SERVICE\\_SPECIFICATION:\n    -   `description`\n    -   `display_name`\n    -   `name`\n    -   `score`\n    -   `specification_code`\n\nData type: String\n\n</td></tr><tr><td>\n\nsortOrder\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sort direction for results.Valid values:\n\n-   `ascending`\n-   `descending`\n\nDefault: descending\n\n</td></tr></tbody>\n</table><table id=\"table_msj_snd_tjc\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncount\n\n</td><td>\n\nNumber of product offerings in the `response` array.Data type: Number\n\n</td></tr><tr><td>\n\nleafCategoryList\n\n</td><td>\n\nA comma-separated string of eligible leaf category sys\\_ids used to filter product offerings, derived from the selected catalog and category hierarchy. Only included in the output when not already provided in the input filter.\n\nData type: String\n\n</td></tr><tr><td>\n\nresponse\n\n</td><td>\n\nAn array matching the current filter criteria, including search terms, selected category, and eligibility rules.Data type: Array of Objects\n\n```\n\"response\": [\n {\n   \"productOfferingSysId\": {Object},\n   \"code\": {Object},\n   \"name\": {Object},\n   \"description\": {Object},\n   \"offerType\": {Object},\n   \"pricingMethod\": \"String\",\n   \"uom\": {Object},\n   \"offerTypeVariation\": \"String\",\n   \"listPrice\": \"String\",\n   \"priceList\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\nresponse.code\n\n</td><td>\n\nProduct offering code.Data type: Object\n\n```\n\"code\": {\n  \"value\": \"String\",\n  \"displayValue\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponse.code.displayValue\n\n</td><td>\n\nDisplay value of the field.Data type: String\n\n</td></tr><tr><td>\n\nresponse.code.value\n\n</td><td>\n\nStored \\(raw\\) value of the field.Data type: String\n\n</td></tr><tr><td>\n\nresponse.derivedPrice\n\n</td><td>\n\nFlag that indicates whether the product's price is calculated dynamically based on related products, product characteristics, or predefined pricing rules rather than having a fixed catalog list price.Valid values:\n\n-   true: Product's price is calculated dynamically.\n-   false: Product's price is calculated using a fixed catalog list price.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nresponse.items.description\n\n</td><td>\n\nDetails about the product offering.Data type: Object\n\n```\n\"description\": {\n  \"value\": \"String\",\n  \"displayValue\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponse.items.description.displayValue\n\n</td><td>\n\nDisplay value of the description.Data type: String\n\n</td></tr><tr><td>\n\nresponse.items.description.value\n\n</td><td>\n\nStored \\(raw\\) value of the description.Data type: String\n\n</td></tr><tr><td>\n\nresponse.items. listPrice\n\n</td><td>\n\nFormatted list price of the product offering \\(for example, `\"$50.00\"`\\). May be absent if no price is configured.Data type: String\n\n</td></tr><tr><td>\n\nresponse.items.offerType\n\n</td><td>\n\nType of the product offering \\(for example, `simple`, `config`, or `simple_with_spec`\\).Data type: Object\n\n```\n\"offerType\": {\n  \"value\": \"String\",\n  \"displayValue\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponse.items.offerType.displayValue\n\n</td><td>\n\nDisplay value of the field.Data type: String\n\n</td></tr><tr><td>\n\nresponse.items.offerType.value\n\n</td><td>\n\nStored \\(raw\\) value of the field.Data type: String\n\n</td></tr><tr><td>\n\nresponse.items. offerTypeVariation\n\n</td><td>\n\nVariation type of the offering, typically matching offerType.Data type: String\n\n</td></tr><tr><td>\n\nresponse.items. priceList\n\n</td><td>\n\nSys\\_id of the associated price list record. May be absent if no price list is assigned.Data type: String\n\n</td></tr><tr><td>\n\nresponse.items.pricingMethod\n\n</td><td>\n\nPricing method for the offering.Possible values:\n\n-   `one_time`\n-   `recurring`\n\nData type: String\n\n</td></tr><tr><td>\n\nresponse.items. productOfferingSysId\n\n</td><td>\n\nList containing the sys\\_id\\(s\\) of the product offering record\\(s\\).Data type: Object\n\n```\n\"productOfferingSysId\": {\n  \"value\": \"String\",\n  \"displayValue\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponse.items. semanticSimilarity\n\n</td><td>\n\nRelevance or semantic score assigned to this result by the AI search engine.Data type: Number\n\n</td></tr><tr><td>\n\nresponse.items.uom\n\n</td><td>\n\nUnit of measure for the offering.Data type: Object\n\n```\n\"uom\": {\n  \"sysId\": \"String\",\n  \"name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponse.items.uom.name\n\n</td><td>\n\nDisplay name of the unit of measure \\(for example, `Each`\\).Data type: String\n\n</td></tr><tr><td>\n\nresponse.items.uom.sysId\n\n</td><td>\n\nSys\\_id of the unit-of-measure record.Data type: String\n\n</td></tr><tr><td>\n\nresponse.name\n\n</td><td>\n\nDisplay name of the product offering.Data type: Object\n\n```\n\"name\": {\n  \"value\": \"String\",\n  \"displayValue\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponse.name.displayValue\n\n</td><td>\n\nDisplay value of the field.Data type: String\n\n</td></tr><tr><td>\n\nresponse.name.value\n\n</td><td>\n\nStored \\(raw\\) value of the field.Data type: String\n\n</td></tr><tr><td>\n\nresponse. productOfferingSysId.displayValue\n\n</td><td>\n\nDisplay value of the field.Data type: String\n\n</td></tr><tr><td>\n\nresponse. productOfferingSysId.value\n\n</td><td>\n\nStored \\(raw\\) value of the field.Data type: String\n\n</td></tr><tr><td>\n\nresponse.visual\n\n</td><td>\n\nURL to the product offering's image/thumbnail, if configured and if sn\\_prd\\_pm.show\\_product\\_visuals system property is enabled.Data type: String\n\n</td></tr><tr><td>\n\nselectedCatalogHierarchy\n\n</td><td>\n\nList of all eligible catalog objects when no default catalog is configured and \"All Catalogs\" is the selected view.Data type: Array of Objects\n\n```\n\"selectedCatalogHierarchy\": [\n  {\n   \"id\": \"String\",\n   \"label\": \"String\",\n   \"children\": [Array] \n  }\n]\n```\n\n</td></tr><tr><td>\n\nselectedCatalogHierarchy.children\n\n</td><td>\n\nChild category nodes. Dependent on the value set for **selectedCategory** in the request:\n\n-   Value is empty or `showAll` \\(default\\): Returns an empty array \\(`[]`\\) when there are no children; the `showAll` node returns an empty object \\(`{}`\\).\n-   Value is a sys\\_id: Returns the child sys ID, display value, and any nested children associated with the given category sys\\_id.\n\n Data type: Object or Array\n\n ```\n//'selectedCategory' is 'showAll'\n\n{\n   \"id\": \"showAll\",\n   \"label\": \"Show all\",\n   \"children\": {}\n}\n\n```\n\n ```\n//'selectedCategory' is sys_id\n\n{\n \"id\": \"String\",\n \"label\": \"String\",\n \"children\": [\n  {\n   \"id\": \"String\",\n   \"label\": \"String\",\n   \"children\": [Array]\n  }\n ]\n}\n```\n\n</td></tr><tr><td>\n\nselectedCatalogHierarchy.id\n\n</td><td>\n\nCategory identifier. A sys\\_id for catalog categories, or the literal `showAll` for the \"Show all\" option.Data type: String\n\n</td></tr><tr><td>\n\nselectedCatalogHierarchy.label\n\n</td><td>\n\nDisplay name of the category.Data type: String\n\n</td></tr><tr><td>\n\nspellCorrectedTerm\n\n</td><td>\n\nSpell-corrected version of the search term, returned when AI Search + RAG is enabled and a correction is available.Data type: String\n\n</td></tr><tr><td>\n\nsuggestedRecordDisplayName\n\n</td><td>\n\nDisplay name of a suggested record, returned when AI Search + RAG is enabled and a direct match suggestion exists.Data type: String\n\n</td></tr></tbody>\n</table>### Search by keyword within a catalog and category\n\nThe following example searches for offerings matching the term `router` within a specific catalog and category, with an account context for pricing and eligibility.\n\n```\nvar req = {\n    \"searchTerm\": \"router\",\n    \"selectedCatalog\": \"<catalog_sys_id>\",\n    \"selectedCategory\": \"<category_sys_id>\",\n    \"headerContext\": {\n        \"account\": \"<account_sys_id>\"\n    }\n};\n\nvar res = new sn_prd_pm.CatalogSearchAPI().getCatalogData(req);\ngs.info(JSON.stringify(res));\n```\n\nOutput:\n\n```\n{\n  \"selectedCatalogHierarchy\": [\n    {\n      \"id\": \"showAll\",\n      \"label\": \"Show all\",\n      \"children\": {}\n    },\n    {\n      \"id\": \"<catalog_sys_id_1>\",\n      \"label\": \"Networking\",\n      \"children\": []\n    },\n    {\n      \"id\": \"<catalog_sys_id_2>\",\n      \"label\": \"Internet\",\n      \"children\": []\n    }\n  ],\n  \"leafCategoryList\": \"<category_sys_id>\",\n  \"response\": [\n    {\n      \"productOfferingSysId\": {\n        \"value\": \"<product_offering_sys_id_1>\",\n        \"displayValue\": \"<product_offering_sys_id_1>\"\n      },\n      \"code\": {\n        \"value\": \"ROUTERPRO1\",\n        \"displayValue\": \"ROUTERPRO1\"\n      },\n      \"name\": {\n        \"value\": \"Pro Router X100\",\n        \"displayValue\": \"Pro Router X100\"\n      },\n      \"description\": {\n        \"value\": \"High-performance dual-band router for home and business use.\",\n        \"displayValue\": \"High-performance dual-band router for home and business use.\"\n      },\n      \"offerType\": {\n        \"value\": \"simple\",\n        \"displayValue\": \"simple\"\n      },\n      \"pricingMethod\": \"one_time\",\n      \"uom\": {\n        \"sysId\": \"<uom_sys_id>\",\n        \"name\": \"Each\"\n      },\n      \"offerTypeVariation\": \"simple\",\n      \"listPrice\": \"$150.00\",\n      \"priceList\": \"<pricelist_sys_id>\",\n      \"derivedPrice\": false\n    }\n  ],\n  \"count\": 1\n}\n```\n\n### Search using the full parameter set with a complete header context\n\nThe following example performs a search request using all available parameters and a complete header context, including explicit pricing, currency, and shipping and billing addresses.\n\n```\nvar req = {\n    \"searchTerm\": \"laptop\",\n    \"selectedCatalog\": \"<catalog_sys_id>\",\n    \"selectedCategory\": \"<category_sys_id>\",\n    \"pageIndex\": 0,\n    \"pageLimit\": 10,\n    \"catalogType\": \"PRODUCT_OFFERING\",\n    \"sortOrder\": \"descending\",\n    \"sortBy\": \"score\",\n    \"aiSearchSuggestionId\": \"\",\n    \"headerContext\": {\n        \"account\": \"<account_sys_id>\",\n        \"pricelist\": \"<pricelist_sys_id>\",\n        \"currency\": \"USD\",\n        \"suppressPricing\": false,\n        \"transaction_date\": \"2026-01-15 09:00:00\",\n        \"shipping_city\": \"Chicago\",\n        \"shipping_country\": \"USA\",\n        \"shipping_location\": \"<shipping_location_sys_id>\",\n        \"shipping_state\": \"IL\",\n        \"shipping_street\": \"123 Main Street, Chicago\",\n        \"shipping_zip\": \"60601\",\n        \"billing_city\": \"Chicago\",\n        \"billing_country\": \"USA\",\n        \"billing_location\": \"<billing_location_sys_id>\",\n        \"billing_state\": \"IL\",\n        \"billing_street\": \"123 Main Street, Chicago\",\n        \"billing_zip\": \"60601\"\n    }\n};\n\nvar res = new sn_prd_pm.CatalogSearchAPI().getCatalogData(req);\ngs.info(JSON.stringify(res));\n```\n\nOutput:\n\n```\n{\n  \"selectedCatalogHierarchy\": [\n    {\n      \"id\": \"showAll\",\n      \"label\": \"Show all\",\n      \"children\": {}\n    },\n    {\n      \"id\": \"<catalog_sys_id_1>\",\n      \"label\": \"Computers\",\n      \"children\": []\n    },\n    {\n      \"id\": \"<catalog_sys_id_2>\",\n      \"label\": \"Mobile Devices\",\n      \"children\": []\n    }\n  ],\n  \"leafCategoryList\": \"<category_sys_id>\",\n  \"response\": [\n    {\n      \"productOfferingSysId\": {\n        \"value\": \"<product_offering_sys_id_1>\",\n        \"displayValue\": \"<product_offering_sys_id_1>\"\n      },\n      \"code\": {\n        \"value\": \"LAPTOPBIZ15\",\n        \"displayValue\": \"LAPTOPBIZ15\"\n      },\n      \"name\": {\n        \"value\": \"Business Laptop 15\\\"\",\n        \"displayValue\": \"Business Laptop 15\\\"\"\n      },\n      \"description\": {\n        \"value\": \"15-inch business laptop with 16GB RAM and 512GB SSD.\",\n        \"displayValue\": \"15-inch business laptop with 16GB RAM and 512GB SSD.\"\n      },\n      \"offerType\": {\n        \"value\": \"simple\",\n        \"displayValue\": \"simple\"\n      },\n      \"pricingMethod\": \"one_time\",\n      \"uom\": {\n        \"sysId\": \"<uom_sys_id>\",\n        \"name\": \"Each\"\n      },\n      \"offerTypeVariation\": \"simple\",\n      \"listPrice\": \"$1,200.00\",\n      \"priceList\": \"<pricelist_sys_id>\",\n      \"derivedPrice\": false\n    }\n  ],\n  \"count\": 1\n}\n```\n\n### Search for service specifications by keyword\n\nThe following example searches for service specifications matching the term `vpn service`.\n\n```\nvar req = {\n    \"searchTerm\": \"vpn service\",\n    \"catalogType\": \"SERVICE_SPECIFICATION\"\n};\n\nvar res = new sn_prd_pm.CatalogSearchAPI().getCatalogData(req);\ngs.info(JSON.stringify(res));\n```\n\nOutput:\n\n```\n{\n  \"response\": [\n    {\n      \"productOfferingSysId\": {\n        \"value\": \"<product_offering_sys_id_1>\",\n        \"displayValue\": \"<product_offering_sys_id_1>\"\n      },\n      \"code\": {\n        \"value\": \"MANAGEDVPNSERVICE\",\n        \"displayValue\": \"MANAGEDVPNSERVICE\"\n      },\n      \"name\": {\n        \"value\": \"Managed VPN Service\",\n        \"displayValue\": \"Managed VPN Service\"\n      },\n      \"description\": {\n        \"value\": \"Managed VPN Service\",\n        \"displayValue\": \"Managed VPN Service\"\n      },\n      \"offerType\": {\n        \"value\": \"config\",\n        \"displayValue\": \"config\"\n      }\n    },\n    {\n      \"productOfferingSysId\": {\n        \"value\": \"<product_offering_sys_id_2>\",\n        \"displayValue\": \"<product_offering_sys_id_2>\"\n      },\n      \"code\": {\n        \"value\": \"MANAGEDVPNSERVICEV2\",\n        \"displayValue\": \"MANAGEDVPNSERVICEV2\"\n      },\n      \"name\": {\n        \"value\": \"Managed VPN Service v2\",\n        \"displayValue\": \"Managed VPN Service v2\"\n      },\n      \"description\": {\n        \"value\": \"Managed VPN Service\",\n        \"displayValue\": \"Managed VPN Service\"\n      },sort\n      \"offerType\": {\n        \"value\": \"config\",\n        \"displayValue\": \"config\"\n      }\n    }\n  ],\n  \"count\": 2\n}\n```\n\n## CatalogSearchAPI – getEligibleCatalogCategoryHierarchy\\(Object input\\)\n\nRetrieves the product catalog-category hierarchy filtered by eligibility rules. Resolves the input header context request object \\(currency, pricelist, address, etc.\\), applies eligibility encoded queries to filter out ineligible catalogs/categories to construct the tree.\n\n<table id=\"table_p3q_sc3_zjc\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nheaderContext\n\n</td><td>\n\nObject\n\n</td><td>\n\nContext object that controls the eligibility used to resolve the catalog-category hierarchy. When omitted, the API derives context from the account if one is provided.```\n\"headerContext\": {\n    \"account\": \"String\",\n    \"billing_city\": \"String\",\n    \"billing_country\": \"String\",\n    \"billing_location\": \"String\",\n    \"billing_state\": \"String\",\n    \"billing_street\": \"String\",\n    \"billing_zip\": \"String\",\n    \"currency\": \"String\",\n    \"pricelist\": \"String\",\n    \"sales_agreement\": \"String\",\n    \"shipping_city\": \"String\",\n    \"shipping_country\": \"String\",\n    \"shipping_location\": \"String\",\n    \"shipping_state\": \"String\",\n    \"shipping_street\": \"String\",\n    \"shipping_zip\": \"String\",\n    \"transaction_date\": \"String\"\n  }\n```\n\n</td></tr><tr><td>\n\nheaderContext.account\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sys\\_id of the account to use for context resolution. When provided and other context fields are omitted, pricing and eligibility are resolved from the account.Table: Accounts \\[customer\\_account\\]\n\n</td></tr><tr><td>\n\nheaderContext.billing\\_city\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. City for the billing address.\n\n</td></tr><tr><td>\n\nheaderContext.billing\\_country\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Country for the billing address.\n\n</td></tr><tr><td>\n\nheaderContext.billing\\_location\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sys\\_id of the billing location record.Table: Location \\[location\\]\n\n</td></tr><tr><td>\n\nheaderContext.billing\\_state\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. State or province code of the billing address.\n\n</td></tr><tr><td>\n\nheaderContext.billing\\_street\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Street address for billing.\n\n</td></tr><tr><td>\n\nheaderContext.billing\\_zip\n\n</td><td>\n\nString\n\n</td><td>\n\nPostal code for the billing address.Example: 75254-7536\n\n</td></tr><tr><td>\n\nheaderContext.currency\n\n</td><td>\n\nString\n\n</td><td>\n\nCurrency code to use for pricing.Example: USD\n\nDefault: Derived from account if not supplied. If account not provided, resolves to system currency.\n\n</td></tr><tr><td>\n\nheaderContext.pricelist\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sys\\_id of the price list.Default: Derived from account if not supplied.\n\nTable: Pricing List \\[sn\\_csm\\_pricing\\_price\\_list\\]\n\n</td></tr><tr><td>\n\nheaderContext.sales\\_agreement\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sys\\_id of the sales agreement to apply.Table: Sales Agreement \\[sn\\_sales\\_agmt\\_core\\_sales\\_agreement\\]\n\n</td></tr><tr><td>\n\nheaderContext.shipping\\_city\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. City for the shipping address.\n\n</td></tr><tr><td>\n\nheaderContext.shipping\\_country\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Country for the shipping address.Example: USA\n\n</td></tr><tr><td>\n\nheaderContext.shipping\\_location\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the shipping location record.Table: Location \\[location\\]\n\n</td></tr><tr><td>\n\nheaderContext.shipping\\_state\n\n</td><td>\n\nString\n\n</td><td>\n\nState or province for the shipping address. Example: TX\n\n</td></tr><tr><td>\n\nheaderContext.shipping\\_street\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Street address for shipping.\n\n</td></tr><tr><td>\n\nheaderContext.shipping\\_zip\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Postal code for the shipping address.Example: 75254-7536\n\n</td></tr><tr><td>\n\nheaderContext.transaction\\_date\n\n</td><td>\n\nString\n\n</td><td>\n\nDate and time of the transaction.Format: yyyy-MM-dd HH:mm:ss\n\nExample: 2026-03-30 20:20:08\n\n</td></tr></tbody>\n</table><table id=\"table_q3q_sc3_zjc\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndefaultCatalog\n\n</td><td>\n\nPrimary catalog configured as the default for the current context, containing its full category hierarchy tree. Only present when a published catalog with `is_default=true` exists and has eligible categories beyond \"Show all\". Data type: Object\n\n```\n{\n  \"id\": \"String\",\n  \"label\": \"String\",\n  \"categories\": [Array]\n}\n```\n\n</td></tr><tr><td>\n\ndefaultCatalog.id\n\n</td><td>\n\nSys\\_id of the default product offering catalog record.Table: Product Offering Catalog \\[sn\\_prd\\_pm\\_product\\_offering\\_catalog\\]\n\nData type: String\n\n</td></tr><tr><td>\n\ndefaultCatalog.label\n\n</td><td>\n\nDisplay name of the default catalog. Data type: String\n\n</td></tr><tr><td>\n\ndefaultCatalog.categories\n\n</td><td>\n\nTop-level categories within the default catalog, each containing a recursive children tree of subcategories. Always includes a synthetic \"Show all\" entry as the first element. Data type: Array of Objects\n\n```\n{\n  \"id\": \"String\",\n  \"label\": \"String\",\n  \"categories\": [Array]\n}\n```\n\n</td></tr><tr><td>\n\ncatalogList\n\n</td><td>\n\nArray of all other eligible published product offering catalogs \\(excluding the default\\), each with its own category hierarchy tree. Present even when empty.Data type: Array of Objects\n\n```\n{\n  \"id\": \"String\",\n  \"label\": \"String\",\n  \"categories\": [Array]\n}\n```\n\n</td></tr><tr><td>\n\ncatalogList.id\n\n</td><td>\n\nSys\\_id of the product offering catalog record.Table: Product Offering Catalog \\[sn\\_prd\\_pm\\_product\\_offering\\_catalog\\]\n\nData type: String\n\n</td></tr><tr><td>\n\ncatalogList.label\n\n</td><td>\n\nDisplay name of the catalog. Data type: String\n\n</td></tr><tr><td>\n\ncatalogList.categories\n\n</td><td>\n\nArray of top-level categories within the catalog, each containing a recursive children tree of subcategories. Always includes a synthetic \"Show all\" entry as the first element. Catalogs that would contain only \"Show all\" \\(no eligible categories\\) are removed entirely from the response.Data type: Array of Objects\n\n```\n{\n  \"id\": \"String\",\n  \"label\": \"String\",\n  \"categories\": [Array]\n}\n```\n\n</td></tr><tr><td>\n\ncategories.id\n\n</td><td>\n\nSys\\_id of the category record, or the literal string \"showAll\" for the default catch-all entry.Table: Product Category \\[sn\\_prd\\_pm\\_product\\_category\\]\n\nData type: String\n\n</td></tr><tr><td>\n\ncategories.label\n\n</td><td>\n\nLocalized display name of the category \\(translated via gs.getMessage for \"Show all\", via getDisplayValue\\('name'\\) for real categories\\).Data type: String\n\n</td></tr><tr><td>\n\ncategories.children\n\n</td><td>\n\nChild category objects following the same structure recursively \\(id, label, children\\). Empty array \\[\\] when the category is a leaf node. Empty object \\{\\} for the \"Show all\" entry.Data type: Array of Objects\n\n```\n{\n  \"id\": \"String\",\n  \"label\": \"String\",\n  \"categories\": [Array]\n}\n```\n\n</td></tr></tbody>\n</table>The following example retrieve complete product catalog-category hierarchy.\n\n```\nvar res = new sn_prd_pm.CatalogSearchAPI().getEligibleCatalogCategoryHierarchy();  \n\ngs.info(JSON.stringify(res)); \n```\n\nOutput:\n\n```\n{\n  \"defaultCatalog\": {\n    \"id\": \"eaf0159fd0a63110f8770dbf976be178\",\n    \"label\": \"Solana US Catalog\",\n    \"categories\": [\n      {\n        \"id\": \"showAll\",\n        \"label\": \"Show all\",\n        \"children\": {}\n      },\n      {\n        \"id\": \"eaf0159fd0a63110f8770dbf976be18a\",\n        \"label\": \"Connected Car\",\n        \"children\": []\n      },\n      {\n        \"id\": \"7e6d2c02742e4a10f877468e695efae1\",\n        \"label\": \"Connectivity Services\",\n        \"children\": []\n      }\n    ]\n  },\n  \"catalogList\": [\n    {\n      \"id\": \"caecc5fd4f12e110c5ff2624b2ce0b0e\",\n      \"label\": \"Business Ethernet Plan\",\n      \"categories\": [\n        {\n          \"id\": \"showAll\",\n          \"label\": \"Show all\",\n          \"children\": {}\n        },\n        {\n          \"id\": \"9fe305a143b631105029d1529ab8f27b\",\n          \"label\": \"Business Ethernet Plan_all_offers\",\n          \"children\": []\n        }\n      ]\n    },\n    {\n      \"id\": \"c835d8792b11525047f3f3e30391bf31\",\n      \"label\": \"Food and Beverage Processing\",\n      \"categories\": [\n        {\n          \"id\": \"showAll\",\n          \"label\": \"Show all\",\n          \"children\": {}\n        },\n        {\n          \"id\": \"1c7950f12b51525047f3f3e30391bfac\",\n          \"label\": \"Beverage Processing\",\n          \"children\": [\n            {\n              \"id\": \"5c8814712b51525047f3f3e30391bf3f\",\n              \"label\": \"Boiling Water Treatment\",\n              \"children\": []\n            },\n            {\n              \"id\": \"2da810b12b51525047f3f3e30391bf48\",\n              \"label\": \"Cooling Water Treatment\",\n              \"children\": []\n            }\n          ]\n        },\n        {\n          \"id\": \"1ca954f12b51525047f3f3e30391bfee\",\n          \"label\": \"Food Processing\",\n          \"children\": [\n            {\n              \"id\": \"60c95cb12b51525047f3f3e30391bf94\",\n              \"label\": \"Automation Data & Digital\",\n              \"children\": [\n                {\n                  \"id\": \"c4ae46362b519e5021e4f1e04391bf3a\",\n                  \"label\": \"Asset Performance Management\",\n                  \"children\": []\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n```\n\n### Response with eligibility filtering applied\n\nEligibility rules can restrict which catalogs and categories are returned based on the resolved context \\(e.g., account, currency, pricelist, address, or any combination configured in the eligibility rule matrix\\). When a catalog/category is deemed ineligible, it is removed entirely from the response - it does not appear in defaultCatalog or catalogList.\n\nIn this example, eligibility rules configured on the instance exclude \"Solana US Catalog\" for the given context. As a result, the next eligible catalog marked as default - \"Configurable Products\" - is promoted to defaultCatalog.\n\n```\nvar req = {\n  \"headerContext\": {  \n    \"account\": \"86837a386f0331003b3c498f5d3ee4ca\"  \n  }  \n};  \n\nvar res = new sn_prd_pm.CatalogSearchAPI().getEligibleCatalogCategoryHierarchy(req);  \ngs.info(JSON.stringify(res));\n```\n\nOutput:\n\n```\n{\n  \"defaultCatalog\": {\n    \"id\": \"b3082af8ff30bad005aafffffffffff9\",\n    \"label\": \"Configurable Products\",\n    \"categories\": [\n      {\n        \"id\": \"showAll\",\n        \"label\": \"Show all\",\n        \"children\": {}\n      },\n      {\n        \"id\": \"7f082af8ff30bad005aafffffffffff9\",\n        \"label\": \"Configurable Products\",\n        \"children\": []\n      }\n    ]\n  },\n  \"catalogList\": [\n    {\n      \"id\": \"caecc5fd4f12e110c5ff2624b2ce0b0e\",\n      \"label\": \"Business Ethernet Plan\",\n      \"categories\": []\n    }\n  ]\n}\n```\n\n"}}