Newer Version Available
Product Search Input
- JSON example
-
1{ 2 "searchTerm": "lightweight", 3 "categoryId": "0ZGxx000000006TGAQ", //categoryId for women’s running shoes 4 "refinements": [ 5 { 6 "attributeType": "Custom", 7 "nameOrId": "Color__c", 8 "values": ["red", "blue"], 9 "type": "DistinctValue" 10 }, 11 { 12 13 "attributeType": "Custom", 14 "nameOrId": "Size__c", 15 "values": ["5"], 16 "type": "DistinctValue" 17 } 18 ], 19 "fields": ["Name", "Description", "StockKeepingUnit", "Size__c", "Arch__c"], 20 "grouping": { 21 "groupingOption": "VariationParent" 22 }, 23 "page" : 0, 24 "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, returns the Name, Description, StockKeepingUnit, ProductCode, and Family fields. Optional 49.0 grouping Product Search Grouping Input Specifies whether to group products in search results and how to group them. If unspecified, the default is the value specified in . Optional 51.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 includeQuantityRule Boolean Specifies whether to include purchase quantity rule information for products in search results (true) or not (false). If unspecified, defaults to false. Optional 52.0 page Integer 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.
When multiplying the page and pageSize property values together, they can’t exceed 5000. For example, for a pageSize of 20, you can specify a page value up to 250.
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 Results per Page in .
When multiplying the page and pageSize property values together, they can’t exceed 5000. For example, for a pageSize of 20, you can specify a page value up to 250.
Optional 49.0 refinements Distinct Value Refinement Input[] List up to nine refinements (facets) for search results. Buyers or shoppers can select up to 20 values for each refinement. Optional 49.0 searchTerm String List of up to 32 space-separated search terms. Required if categoryId isn’t specified 49.0 sortRuleId String ID of the sort rule that specifies the order of products in the search results. Optional 52.0