Request structure and objects
The following table describes the objects and keys that you can include in a request data:
Object |
Description |
---|---|
|
Provides the text or phrase used as search term. The following key is related to the
|
|
Attributes used to further narrow query results. |
|
Selected facets applied to content results. |
|
Tips and guidance for subsequent queries including autocomplete and related searches. |
|
The identifier for the specific location on the page to display search or recommendations. It contains two IDs: |
|
The grouping of multiple requests into a single request. It has a list of objects that you can use to override specific request keys or values. Note To avoid duplicate responses when you request multiple recommendation widgets on the same page request, you must use a |
|
The expected information in the search result. The following keys are related to the request for
|
|
Rendering information contained in the HTML, CSS, and JavaScript templates and variables associated with the given widgets. |
|
Indicates that a request is a preview request. |
Additional parameters that might affect the search results. The following keys are related to the request for
| |
|
Contains the keys and fields of the specific context applied to the current request. |
Specifies the order of the search results. |
Mandatory keys
When you construct your JSON request, you must pass these keys irrespective of any other object you add to your request:
-
The page
uri
to identify the page that the user is on. -
If applicable to your implementation,
locale.locale_country
andlocale.locale_language
. to identify the country and language of the user. -
The
user_id
oruuid
to uniquely identify the user. -
The widget
rfkid
to identify the Discover widget that you want to integrate.NoteIf your Customer Engagement Console (CEC) configuration allows it, you can request all widgets. In this case, you do not need to specify a widget.
Here is a sample request with mandatory keys:
{
"context": {
"page": {
"uri": "/search",
"locale_country": "us",
"locale_language": "en"
},
"user": {
"uuid": "sampleUUID"
}
},
"widget": {
"rfkid": "rfkid_7"
}
}