Disclaimer: This website requires JavaScript to function properly. Some features may not work as expected. Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Autocomplete

Describes the Autocomplete API handler in Optimizely Configured Commerce.

HTTP Verb – GET

URL – /api/v1/autocomplete /api/v1/autocomplete/products

Description – Query products by partial search criteria

Base – HandlerBase<GetAutocompleteProductCollectionParameter, GetAutocompleteProductCollectionResult>

Handlers –

OrderHandlerDescription
500GetAutocompleteProductResults

Retrieves 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.

600GetAutocompleteContentResults

Retrieves 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.

700GetAutocompleteCategoryResults

Retrieves 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.