Product Suggest API
Product suggest
POST
https://api-eu.attraqt.io/search/suggest
Search and group suggested products using the XO Search engine.
Request Body
token
string
XO Search token (can be found in the XO Console)
query
string
The query string used for the search
options.sortBy
array
Sorting:
\
Sort the results using the specified sort options.
\
Defaults to an empty array (no sort applied, ie. results are sorted by relevancy).
\
Check
Sorting
page for more info about the
sortBy
array format.
options.filter
string
Filtering:
\
Filters the results based on the filter query (SQL-like syntax).
\
Defaults to an empty array (no filter applied).
\
Check
Filtering
page for more info about the
filter
string format.
options.customResponseMask
string
Attributes to retrieve:
\
If specified, you have the control which attributes to retrieve and which not to retrieve.
options.groupBy
object
Grouping:
\
Group the results by specific values.
\
Check
Grouping
page for more info about the format
Example product suggest request
The following sample request includes all possible parameters you can use
Response
The product suggest response contains two parts:
groups
array
Array of groups fetched from the catalog. Depends on the groupBy
options of the request.
metadata
object
Metadata about the search request: available facets, pagination, number of items, elapsed time, ...
groups
groups
The groups matching the product suggest query.
value
string
Value on which this group was aggregated
count
number
Number of items included in this group. Note that only the first size
items are returned, not all items of the group.
items
array
List of items returned for this group. This array has the same format as the items
returned for a regular search response.
metadata
metadata
Metadata about the search query and its results.
time
number
Time the request took to complete (in milliseconds)
token
string
Search API token used for the request
url
string
Equivalent url that can be used to send the same request
id
string
Unique identifier
configurationId
string
Search configuration id used
Example
Last updated