Search (v2)
Get Results
Used to get search results that match the given query. Has support for filtering and
sorting.
Example response:
<pre>
{
"n_hits": 1,
"displays": [
{
"product_id": "foobar",
"title": "Foobar"
}
],
"sorts": [
{
"field": "_relevance",
"order": "desc",
"meta": {
"title": "Relevance",
"values": [
"desc"
],
"names": [
"Relevance"
]
}
},
{
"field": "title",
"order": "asc",
"meta": {
"title": "Title",
"values": [
"asc",
"desc"
],
"names": [
"A-Z",
"Z-A"
]
}
}
],
"filters": [
{
"field": "sale_price",
"op": "inrange",
"data": [
0,
2500
],
"meta": {
"group_title": "Price",
"type": "range",
"min": 0,
"max": 2500,
"currency": "EUR"
},
"id": "price0"
},
{
"field": "color_name",
"op": "in",
"meta": {
"group_title": "Color",
"type": "checkbox",
"values": [
"Blue",
"Black",
"Brown"
]
},
"id": "colors1"
}
],
"search_request_id": "1a278f4a-16eb-4d95-a002-88bd305493d4",
"cursor": "eyJjIjogMSwgInIiOiAwfQ=="
}
</pre>
Example request body for applying a filter:
<pre>
{
"tenant": "foobar"
"market": "en",
"limit": 20,
"query": "hoodie",
"filters": [
{
"field": "color_name",
"op": "in",
"data": ["Blue"]
}
]
}
</pre>
POST
Authorizations
Headers
Body
application/json
Response
200
application/json
Successful Response
The response is of type object
.