Newer Version Available

This content describes an older version of this product. View Latest

Product Search Input

Product search.
JSON example
1{
2  "searchTerm": "lightweight",
3  "categoryId": "0ZGxx000000006TGAQ", //categoryId for women’s running shoes
4  "refinements": [
5   {  "nameOrId": "Color__c",
6      "values": ["red", "blue"],
7      "type": "DistinctValue"
8   },
9   {  
10      "nameOrId": "Size__c",
11      "values": ["5"],
12      "type": "DistinctValue"
13   }
14  ],
15  "fields": ["Name", "Description", "StockKeepingUnit", "Size__c", "Arch__c"],
16  "page" : 0,
17  "pageSize" : 25}
Properties
Name Type Description Required or Optional Available Version
categoryId String Category ID returns results for products in this category or its subcategories. Required if searchTerm isn’t specified 49.0
fields String[] Product fields to return in search results. Search results include fields you have access to. If unspecified, all accessible fields are returned. Optional 49.0
includePrices Boolean Specifies whether to include prices for products in search results (true) or not (false). If unspecified, defaults to false. Optional 49.0
page Integer Specifies the number of the page you want returned. Starts at 0. If you don’t specify a value or if you specify 0, the first page is returned. Optional 49.0
pageSize Integer Specifies the number of items per page. Valid values are from 1 through 200. If unspecified, the default is the value specified in Search Results per Page in Administration | General Settings | Products & Search. Optional 49.0
refinements Distinct Value Refinement Input[] Refinements for search results. Optional 49.0
searchTerm String A list of up to 32 space-separated search terms. Required if categoryId isn’t specified 49.0