Skip to main content

searchSuggest

Requires a customer (portal or buyer app) session.

Returns typeahead suggestions.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query SearchSuggest($q: String!) {
searchSuggest(q: $q) {
query
suggestions {
id
href
imageUrl
kind
label
}
}
}

Variables:

{
"q": "string"
}

Response:

{
"data": {
"searchSuggest": {
"query": "string",
"suggestions": [
{
"id": "id",
"href": "string",
"imageUrl": "string",
"kind": "BRAND",
"label": "string"
}
]
}
}
}
searchSuggest(
addressId: ID
q: String!
): SearchSuggestResponse!

Arguments​

searchSuggest.addressId ● ID scalar​

The delivery address that decides what is in stock.

searchSuggest.q ● String! non-null scalar​

The text the shopper typed.

Type​

SearchSuggestResponse object​

Search suggestions for a query.