Class: module:api/SearchSuggestionApi

module:api/SearchSuggestionApi(apiClient)

new module:api/SearchSuggestionApi(apiClient)

Constructs a new SearchSuggestionApi.

Parameters:
Name Type Description
apiClient module:ApiClient

Optional API client implementation to use, default to module:ApiClient#instance if unspecified.

Source:

Methods

getSearchSuggestion(q, opts) → {Promise}

Provides keyword search functionality for products, categories, content, brands and custom suggestions. Returns suggested products, suggested categories, suggested content, suggested brands and custom suggestions for the given search phrase.

Parameters:
Name Type Description
q String

The query phrase to search for.

opts Object

Optional parameters

Properties
Name Type Description
count Number

The maximum number of suggestions per request. Default value is 5. This affects all types of suggestions (category, product, content, brand, custom suggestions).

currency String

The currency mnemonic specified for price. This parameter is effective only for product suggestions.

locale String
Source:
Returns:
Type
Promise

getSearchSuggestionWithHttpInfo(q, opts) → {Promise}

Provides keyword search functionality for products, categories, content, brands and custom suggestions. Returns suggested products, suggested categories, suggested content, suggested brands and custom suggestions for the given search phrase.

Parameters:
Name Type Description
q String

The query phrase to search for.

opts Object

Optional parameters

Properties
Name Type Description
count Number

The maximum number of suggestions per request. Default value is 5. This affects all types of suggestions (category, product, content, brand, custom suggestions).

currency String

The currency mnemonic specified for price. This parameter is effective only for product suggestions.

locale String
Source:
Returns:

a Promise, with an object containing data of type module:models/SuggestionResult and HTTP response

Type
Promise