Search

Searches the categories displayed on the web storefront for products or product options that the shopper types in a search query.

Request

HTTP Request

GET
 api/commerce/catalog/storefront/productsearch/search%2f%3fquery%3d%7bquery%7d%26filter%3d%7bfilter%7d%26facetTemplate%3d%7bfacetTemplate%7d%26facetTemplateSubset%3d%7bfacetTemplateSubset%7d%26facet%3d%7bfacet%7d%26facetFieldRangeQuery%3d%7bfacetFieldRangeQuery%7d%26facetHierPrefix%3d%7bfacetHierPrefix%7d%26facetHierValue%3d%7bfacetHierValue%7d%26facetHierDepth%3d%7bfacetHierDepth%7d%26facetStartIndex%3d%7bfacetStartIndex%7d%26facetPageSize%3d%7bfacetPageSize%7d%26facetSettings%3d%7bfacetSettings%7d%26facetValueFilter%3d%7bfacetValueFilter%7d%26sortBy%3d%7bsortBy%7d%26pageSize%3d%7bpageSize%7d%26startIndex%3d%7bstartIndex%7d%26searchSettings%3d%7bsearchSettings%7d%26enableSearchTuningRules%3d%7benableSearchTuningRules%7d%26searchTuningRuleContext%3d%7bsearchTuningRuleContext%7d%26searchTuningRuleCode%3d%7bsearchTuningRuleCode%7d%26facetTemplateExclude%3d%7bfacetTemplateExclude%7d%26facetPrefix%3d%7bfacetPrefix%7d%26responseOptions%3d%7bresponseOptions%7d%26cursorMark%3d%7bcursorMark%7d%26facetValueSort%3d%7bfacetValueSort%7d%26defaultSort%3d%7bdefaultSort%7d%26sortDefinitionName%3d%7bsortDefinitionName%7d%26defaultSortDefinitionName%3d%7bdefaultSortDefinitionName%7d%26responseFields%3d%7bresponseFields%7d

Parameters

Parameter NameDescription
Parameters
querytype: string 

Properties for the product location inventory provided for queries to locate products by their location.

filtertype: string 

A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.

facetTemplatetype: string 

The facet template to use on the storefront. A template displays all facets associated with the template on the web storefront product search. Currently, only category-level facet templates are available.

facetTemplateSubsettype: string 

Display a subset of the facets defined in the template specified in facetTemplate parameter.

facettype: string 

Individually list the facet fields you want to display in a web storefront product search.

facetFieldRangeQuerytype: string 

Display a range facet not specified in a template in a web storefront product search by listing the facet field and the range to display.

facetHierPrefixtype: string 

If filtering using category facets in a hierarchy, the parent categories you want to skip in the storefront product search. This parameter is only available for category facets.

facetHierValuetype: string 

If filtering using category facets in a hierarchy, the category in the hierarchy to begin faceting on. This parameter is only available for category facets.

facetHierDepthtype: string 

If filtering using category facets in a hierarchy, the number of category hierarchy levels to return for the facet. This option is only available for category facets.

facetStartIndextype: string 

When paging through multiple facets, the startIndex value for each facet.

facetPageSizetype: string 

The number of facet values to return for one or more facets.

facetSettingstype: string 

Settings reserved for future facet search functionality on a web storefront product search.

facetValueFiltertype: string 

The facet values to apply to the filter.

sortBytype: string 

The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.

pageSizetype: int 

When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.

startIndextype: int 

When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.

searchSettingstype: string 

The settings to control product search and indexing behavior.

enableSearchTuningRulestype: bool 

Enables search tuning rules on your site.

searchTuningRuleContexttype: string 

The category ID that the search tuning rule applies to.

searchTuningRuleCodetype: string 

The unique identifier of the search tuning rule.

facetTemplateExcludetype: string 

A comma-separated list of the facets to exclude from the facetTemplate.

facetPrefixtype: string 

Use this parameter to filter facet values that are returned by an associated search result by a prefix.

This parameter only supports non-categorical facets. The prefix value you provide only limits the facet values that are returned by the associated search results, and not the search results themselves.

For example, to filter on colors that start with b, such as blue, black, or brown you can specify the following:

commerce/catalog/storefront/productsearch/search/?facet=tenant~color&facetprefix=tenant~color:b
responseOptionstype: string 

Options you can specify for the response. This parameter is null by default.

You can primarily use this parameter to return volume price band information in product details, which you can then display on category pages and search results depanding on your theme configuration. To return volume price band information, set this parameter to VolumePriceBands.

cursorMarktype: string Note:  This parameter is associated with deep paging, which is an optimized search method for retrieving greater than 5,000 results at a time. More specifically, this parameter is associated with serial deep paging (rather than random access deep paging). In general, Kibo eCommerce recommends that you use serial deep paging for retrieving large result quantities. However, if you are performing sitemap generation or require parallel access to different sets of search results, you should use random access deep paging, available through the GetRandomAccessCursor operation in the commerce/catalog/storefront/productSearch resource.

In your first deep paged request, set this parameter to *. Then, in all subsequent requests, set this parameter to the subsequent values of nextCursorMark that's returned in each response to continue paging through the results. Continue this pattern until nextCursorMark is null, which signifies the end of the paged results.

facetValueSorttype: string 

Use this parameter to specify facet sorting outside the predefined facet definitions (which require a category). The most common options are:

  • count (default)—Sorts by product count (highest count first).
  • index—Sorts by lexicographic order. In most cases, this means alphabetical order.

The following code demonstrates an example of index sort:

facetSort=tenant~year:index

Tip:  Depending on the facet, you may have access to additional sort options besides count and index. If you specify an invalid value, the API responds with an error message and gives all possible values for the sort order.
defaultSorttype: string 

Sets the default sorting for content. Sort does not use AND in determining the order

sortDefinitionNametype: string 

The name of the product sort definition that is being applied.

defaultSortDefinitionNametype: string 

The name of the default product sort definition for the product results.

responseFieldstype: string 

Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.

Request Properties

No request body content

Response Properties

When successful, this operation returns a commerce/catalog/storefront/productsearch resource in the response body.