HomeGuides
Submit Documentation FeedbackJoin Developer CommunityLog In

Autocomplete API handler

This topic describes the process for querying products by partial search criteria.

HTTP Verb: GET

URL: /api/v1/autocomplete /api/v1/autocomplete/products

Description: Query products by partial search criteria

Base: HandlerBase<GetAutocompleteProductCollectionParameter, GetAutocompleteProductCollectionResult>

Handlers:

OrderHandlerDescription
500GetAutocompleteProductCollectionHandlerGets product collection for autocomplete. If requester is not signed in and website setting WebSiteNavigation set to 'SignInRequiredToBrowse' then handler return error result. Also if requester restricted from website then handler return error result. NOTE: This handler was obsolesced as of version 4.3.1 and subsequent version should use the /api/v1/autocomplete endpoint in its place.
OrderHandlerDescription
500GetAutocompleteProductResultsRetrieves autocomplete product results from Elasticsearch using a query. If any of the following is "true", this handler is skipped.
The Autocomplete "Show Products" setting equals "false"The ProductEnabled property on the parameter object equals "false"The Query property on the parameter object is blank
Uses the GetProductSettingsHandler handler chain to retrieve product search settings. If the CanSeeProducts property on the settings object equals "false", an error is returned (the current user cannot search for or see products).

The product results are stored in the Products property on the result object.
600GetAutocompleteContentResultsRetrieves autocomplete content page results from Elasticsearch. If any of the following is "true", this handler is skipped.
The Autocomplete "Show Website Pages" setting equals "false"The ContentEnabled property on the parameter object equals "false"The Query property on the parameter object is blank
The content page results are stored in the Content property on the result object.
700GetAutocompleteCategoryResultsRetrieves autocomplete category results from Elasticsearch. If any of the following is "true", this handler is skipped.
The Autocomplete "Show Categories" setting equals "false"The CategoryEnabled property on the parameter object equals "false"The Query property on the parameter object is blank
The category results are stored in the Categories property on the result object.

Did this page help you?