REST-API
GET
Search
Request Method: GET
Endpoint: https://core.helloretail.com/api/v1/search/partnerSearch
Parameters
Query
Name | Type | Description |
---|---|---|
brand_count |
Number | The number of brands you want to have returned. |
brand_start |
Number | This is used for pagination. See product_start for further explanation. |
blog_post_count |
Number | The number of blog posts you want to have returned. |
blog_post_start |
Number | This is used for pagination. See product_start for further explanation. |
category_count |
Number | The number of categories you want to have returned. |
category_start |
Number | This is used for pagination. See product_start for further explanation. |
exclude_sibling_filters[] |
String | It can be used when return_filters is true. It modifies what filters are returned for the specified fields. The normal behaviour for each field is to return filters as if any filters on the current field are not applied. This setting changes that so that only filters that are available in the current result set are returned. Example - where value is set to brand: Consider the situation where you have two products: - "Running Shoe" with brand "Nike" - "Tennis Shoes" with brand: "Adidas" If you search for "shoes" and add a brand filter to only get "Nike" products. The search engine would only return the "Running Shoe" product. If you set return_filters=true it would return a list of two available brand filters; The "Nike" filter that is currently selected and the "Adidas" filter that is not active. That information is typically needed to be able to build a UI where you can add filters without all filter options disappearing once you start selecting filters. If you add "brand" to exclude_sibling_filters, the "Adidas" filter will not be returned in the above example. It will only return the filter values that are available in the current filter set. |
hello_retail_id |
String | This is the tracking cookie ID. It is used for personalized search as well as ensuring more optimal search analytics. The ID can be retrieved by the Tracking user method (https://apidocs.helloretail.com/tracking-user). While optional, it is highly recommended that this query parameter is provided. |
sorting[] |
Array | Sort the order of the product results by specifying an array of sorting strings. The sorting strings are build up by a structure of "{field} {sorting order}" where field can i.e. be "inStock" and sort order can be either "asc" for ascending or "desc" for descending order. |
filters[] |
String | Limit results to those matching the specified filter(s). By default, you can filter by price, inStock, hierarchies (categories), isOnSale, brand & created. If you want to filter by other product attributes, then just contact support. For more information about filters see documentation below. |
return_filters |
String | Defaults to false. If set to true it will return all filters you can supply as a filter for the filters[] parameter. |
product_fields |
String | A comma separated list of what fields you would like to have returned in the response. Defaults to all standard fields. |
product_start |
Number | This is used for pagination, and is the offset. Defaults to 0. If you want results for page two you would put it to 10 (if you have 10 products per page) |
product_count |
Number | The number of results you want to have returned. Default is 10. |
format |
String | Format for the response. Options are json or html. Defaults to html. |
key |
String | This is the primary ID of the Search configuration. See below how you can find it. |
q |
String | The search phrase you want to search for. You can search for * if you want to find all the results. |
Responses
200 OK
{
"results": 33,
"start": 0,
"didTrackSearch": true,
"results": [
{
"title": "Pikachu bamse",
"imgUrl": "https://pokemonbutik.dk/wp-content/uploads/2016/12/Pikachu_bamse_1-150x150.jpg",
"price": 100.0,
"currency": "DKK",
"url": "https://pokemonbutik.dk/butik/bamser/pikachu/#aw_source=ps-cbcad7ef-3848-4e01-9e21-c06d6518e6b8",
"priceFormatted": "100,00",
"description": "Pikachu plysdyr, er fremstillet i en flot kvalitet med broderede øjne, næse, mund og kinder. Alle børn elsker denne Pokémon maskot, der er den mest kendte Pokémon af dem alle. Han er en oplagt gave til enhver Pokémon fan.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/Ir2bC_F8mFk\" frameborder=\"0\" allowfullscreen></iframe>",
"keywords": "bamse, pikachu",
"inStock": true,
"extraData": {
"itemNumber": "0001"
},
"productNumber": "21"
},
...
...
],
categories: [
{
"title": "Skor",
"description": "A description for skor",
"url": "mydomain.com/skor",
"keywords": "skor - beautiful shoes",
"hierarchy": [
"shoes",
"female"
]
],
brands: [
{
"title": "Skor",
"description": "A description for skor",
"url": "mydomain.com/skor",
"keywords": "skor - beautiful shoes",
"hierarchy": [
"nike"
]
]
}
Example
https://core.helloretail.com/api/v1/search/partnerSearch?key={your config key}&product_count=10&q=pika&format=json&product_start=0&filters[]=price:100,500&sorting[]=price%20asc