Retrieve product question answers

Retrieve an AI-powered answer to a shopper's question about one product, with optional product suggestions. page_context.item_id identifies the product the question is about. 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.

Us
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 qna mode.

A shopper's question about one product, with the page it was asked from. The product is identified by page_context.item_id.

string
required
length ≄ 1

The question to answer about the product.

page_context
object
required

The shopper's current position in the catalog. qna always answers about one product, so item_id is required, including when the shopper asks from a page other than the PDP, e.g. a quick-view on a listing page.

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