This section explains how the filter object works and how you can use it to define a number of applied fields to your query and search an item by a search term, type, etc.
Filter using Search Term
To filter the search results using a specific search term, the searchTerm field is used. It takes in a string value which is the term you would like to use to filter the results. Below, the query is getting all the results that are associated with the term 'plant'.
Filter by Type
The include field allows you to filter results via the following fields - id, variants, topics, paths, shapes, skus, etc. The query below fetches all the products within a specified path.
The exclude field does the exact opposite, it excludes items. The example query below retrieves all the items in the plants folder but excludes the product whose ID we have specified. You can specify multiple IDs within the array.
If you have multiple price variants, you can retrieve a specific variant by using the priceVariants field. All you need to do is specify the identifier.