Introduction to the Search API
We recommend using the JavaScript SDK to perform the searches. One case where you might want to use the REST-API is if you have context aware pricing, where the logic resides in your system. In that case you might want to do the search whereafter you look the products up in your system to enrich with the right prices.
Search configuration key
You can find the search configuration key, by going to the search configuration in the dashboard, as shown below.
Filters
The filter parameter consists of the format &filters[]={key}:{value}. If you want to filter by the brand Nike, you would use &filters[]=brand:nike. For each value, you need to add the parameter filters[], which means that if you want to filter by both color and brand you would add &filters[]=color:blue&filters[]=brand:nike.
For range filters the format is &filters[]={key}:{value from},{value to}. As an example, if you want to filter products in the price range 20 to 100 the query parameter would look like &filters[]=price:20,100.
Response values
Specification of the values returned in the response:
Field name
Type
Description
product_results
int
The number of results found in total. The result array below only contains the number of results, specified in the input parameter “product_count”
start
int
Shows the starting position, as stated in the “start” input parameter
result
Array
An array of product search results
result[].title
String
The title of the product
result[].imageUrl
String
The URL to the image
result[].url
String
The URL of the product
result[].price
int
The price of the product
result[].priceFormatted
String
The price formatted as a String, using formatting rules applied by Hello Retail - Please contact Hello Retail support, if you need other formatting options
result[].oldPrice
int
The price of the product, as it was before a price change
result[].oldPriceFormatted
String
The price of the product, as it was before a price change, formatted by using the formatting rules applied by Hello Retail
result[].isOnSale
boolean
Indicates whether the product is on sale or not
result[].description
String
The description of the product
result[].currency
String
The currency for the configured webshop
result[].inStock
boolean
Indication whether the product is instock or not.
result[].extraData.?
-
This might hold data, used for other purposes, like filtering and rendering. The results depends on the configuration of the webshop.
filters
Map
Each entry represents a filterable property on the products. The keys are the name of the property, and the value is a list of options.
filters.?[].title
String
The value that the results can be limited to. Usually human readable, except for hierarchies-filters. (See below)
filters.?[].count
int
How many results matches this filter
filters.?[].query
String
The string that should be send in a filters[] parameter, to limit the search to these results.
Copy link