Retrieve by prefix

Retrieve AI optimized autocomplete results for products and search suggestions (and/or optionally other sections). Prefix length is limited to 200 characters.

Related content


Path Params
string
required
Query Params
string
required
length between 1 and 100

The key of the index to use.

num_section_results_per_page
object

The number of section results per page to return.

offset_per_section
object

The offset of section results to return.

page_per_section
object

The page of section results to return.

filters
object

Any number of filtering criteria (accessible to end users) used to narrow the result set, such as color=blue or group_id=sandals or price=100-200. Facets and Item Groups and Collections can be used as filters. If filter_value has the form <min>-<max>, it is interpreted as a range. Filters with the same key are ORed together and filters with different keys are ANDed together by default. Only results that match the filters are returned. Boolean values are serialized with the first letter capitalized (e.g., True / False) as a convention. Supports per-section format using bracket notation (e.g., filters[Products][color]=blue) to apply filters to a specific section only.

filter_match_types
object

An object specifying whether results must match all, any or none of a given filter when multiple options of the same facet (e.g: color: yellow & blue) are selected.

object | Encoded JSON string

A JSON-encoded filter expression containing any number of filters (inaccessible to end users) used to narrow the result set. Applied before user-selected filters. Only items that match this expression are considered in facet counts. Only results that match the filters are returned. Read more. Supports per-section format using bracket notation (e.g., pre_filter_expression[Products]={...}) to apply to specific sections only.

integer
0 to 50
date-time

A date time representing the current moment in time when applying filtering by product age. Used to emulate "past/future" requests. Requires authentication.

json

A JSON string containing a instructions on how to map item variation data in the response (typically used for swatches). More details, including the exact schema for this value can be found here

fmt_options
object

An object containing options to format different aspect of the response.

json

A JSON-encoded query string. Any query parameters listed for this endpoint can be serialized into a JSON string and parsed thru the qs param.

string

The url or app location where the request originated.

string
length between 1 and 100

The ID of the client and version that the request is coming from, such as cio-js-2.90.

us
array of strings

A customer defined context (such as vip-club-member) used to evaluate redirect or refined tag rules. Pass multiple segments by passing multiple us arguments.

us
string

A customer generated obfuscated identifier for a user on a customer website. It should only be sent for logged in customers and helps Constructor to tie multiple client and session IDs together to form a behavioral data profile across devices. For a shopper who has not consented, or who has withdrawn consent, omit this parameter, even if the shopper is logged in.

integer

An integer representing the user's session number (starting with 1), incremented after a 30 minute period of inactivity. Send it with every request, including for a shopper who has not consented. If no stored value is available, send a fixed integer such as 1.

string

A globally unique identifier for the user browser (or mobile application instance) making the request. For a shopper who has not consented, or who has withdrawn consent, omit this parameter when the browser or app sends the request. Constructor may treat those requests as non-human traffic. They can get slower or stale results, and they can be rejected, occasionally or permanently. In a backend integration, send an identifier your server creates for that visit and keeps only in its own session. See Setting up shopper consent in Data-driven event tracking.

string
enum

A specification of the user query language. When provided, this parameter enables language-specific processing such as stemming to improve relevance and recall.

Headers
string

Backend only. The token that Constructor gives you for a backend integration. Send it on every request from your servers. Never send it from a browser or an app, because anyone can read it there. See Required parameters.

string

The User-Agent of the end user's device. A browser sends it for you. In a backend integration, forward the value from the end user's browser. In a native app, use the format on Required parameters.

string

Backend only. The IP address of the end user's device. IPv4 and IPv6 addresses are both supported. Send one address, not a comma-separated chain. For rate limiting, Constructor uses this header as the end user's IP only when the request also has a valid x-cnstrc-token. See Required parameters.

Responses

400

Validation Error

Language
LoadingLoading…
Response
Choose an example:
application/json