Retrieve conversational agent replies

Hold one turn of a conversation with the full shopping agent: multi-turn dialog, product discovery across search, browse and recommendations, and answers drawn from the knowledge base configured for the domain. parameters.domain selects which configured conversational domain answers, and thread_id continues an existing conversation instead of starting a new one. The response streams back as server-sent events (text/event-stream). Streaming is the default: to receive the complete aggregated response as a single JSON document instead, send an Accept header that contains application/json and does not contain text/event-stream. A request that accepts both, sends */*, or omits the header streams. This differs from /v1/item_questions/{question}/answer, which returns JSON unless text/event-stream is requested.

Query Params
string
required
length ≄ 1

The key of the index to use.

uuid

A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. When omitted, a new thread is created.

boolean
Defaults to false

Turn the content moderation check on or off. When on, shopper input is screened before the agent processes it.

integer

The maximum number of result events to return.

integer

The maximum number of results to return per item_results event.

fmt_options
object

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

json

Additional query parameters to forward to the underlying Constructor search, browse and recommendations API calls, as a JSON-encoded string: for example qs={"sort_by":"price","sort_order":"ascending"}. Each mode forwards only the keys that apply to the calls it makes, and any key managed by page_context.filters must not be overridden here.

string

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.

User segments
string

A customer generated anonymized 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 ID's together to form a behavioral data profile across devices.

feature_variants
object

Feature variants keyed by feature name. Accepts flattened feature_variants[<feature_name>] query parameters.

features
object

Feature toggles keyed by feature name. Accepts flattened features[<feature_name>] query parameters.

integer

An integer representing the user's session number (starting with 1), incremented after a 30 minute period of inactivity.

string

A globally unique identifier for the user browser (or mobile application instance) making the request.

Body Params

The request body for the chat mode.

A shopper's message to the conversational agent, with the page it was sent from. parameters.domain selects which configured conversational domain answers it.

string
required
length ≄ 1

The shopper's message to the agent.

page_context
object
required

The shopper's current position in the catalog. chat filters the products it retrieves by filters, and echoes the whole object back on the start event.

parameters
object
required

Extra parameters for chat. Required, because domain has no default.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
LoadingLoading…
Response
Choose an example:
application/json
text/event-stream