interface SuggestRequestParameters {
    _br_uid_2: string;
    account_id: number;
    callback?: string;
    catalog_views: string;
    q: string;
    ref_url?: string;
    request_id?: number;
    request_type: "suggest";
    sort?: string;
    url: string;
    user_agent?: string;
    user_id?: string;
}

Properties

_br_uid_2: string

First Party cookie that provides unique identifier

account_id: number

Account ID

callback?: string

Indicates whether data wrapped in the function for CORS requests

catalog_views: string

A list of catalog views that you want to see in your suggestions. You must specify the catalog name within the catalog view. For Product catalogs, the catalog name is the same value as your domain_key.

A catalog_views value contains the view_ids within a catalog separated by a colon. If you pass multiple catalogs in catalog_views, they must be pipe-separated. Attributes suggestions are enabled for the first two catalogs mentioned as part of catalog_views and only for the first view passed in each of the first two catalogs.

For example, &catalog_views=product:store1,store2|recipe:premium|articles would return text and attribute suggestions for the product catalog in the store1 view, and for the recipe catalog in the premium view; only text suggestions will be displayed for the articles catalog.

q: string

Partial search query

ref_url?: string

URL of the page or HTTP referrer where request started

request_id?: number

ID to track site visitor clicks

request_type: "suggest"

The type of API request. Value should be search for Product & Category Search.

Default

search
sort?: string

Sorts results based on the field value in ascending, descending, or another combination of orders. You can sort any fl field. Value is a field name, followed by asc/desc for ascending/descending order respectively.

url: string

Absolute URL of the page where the request initiated

user_agent?: string

The user agent of the browser that's making the search request. Make sure that this value in your API request is the same as the value in the original request from your user. We optimize pages in part by crawling and gathering data, and the original user_agent lets us distinguish between our internal Bloomreach users who QA pages and everyone else who visits your site.

user_id?: string

The universal customer ID of the user. You only need to pass this field if your particular integration tracks customers this way. The parameter captures user IDs from the customer side, and reuses the information when powering apps or enhancing cross-device linking. In this way, Bloomreach recognizes users in a way that's aligned with your system. Use an anonymous string. Don't use email or other personally identifiable information. If you do not track users this way, then omit this field.