ConnectApi.ProductSearchInput

Product search.

PropertyTypeDescriptionRequired or OptionalAvailable Version
categoryIdStringCategory ID returns results for products in this category or its subcategories. If you omit categoryId from the request, all categories are searched. If you specify categoryId and searchTerm, only products in the specified category are searched.Required if searchTerm isn’t specified52.0
fieldsList<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.Optional52.0
groupingConnectApi.​ProductSearch​GroupingInputSpecifies whether to group products in search results and how to group them.If unspecified, the default is the value specified in Search | Results Display Settings | Results Grouping.Optional52.0
includePricesBooleanSpecifies whether to include prices for products in search results (true) or not (false). If unspecified, defaults to false.Optional52.0
includeQuantity​RuleBooleanSpecifies whether to include purchase quantity rule information for products in search results (true) or not (false). If unspecified, defaults to false.Optional52.0
pageIntegerNumber of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.Optional52.0
pageSizeIntegerSpecifies 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 Search | Results Display Settings.Optional52.0
refinementsList<ConnectApi.​RefinementInput>List up to nine refinements (facets) for search results. Buyers or shoppers can select up to 20 values for each refinement.Optional52.0
searchTermStringList of up to 32 space-separated search terms.Required if categoryId isn’t specified52.0
sortRuleIdStringID of the sort rule that specifies the order of products in the search results.Optional52.0