Retrieve product question answers
Answer a shopper's question about one specific product. The agent answers from that product's own data rather than by searching the catalog, which is what makes it suitable for the question box on a product page. Which sources it draws on is configured per index key, and typically covers the product's attributes and description, and its customer reviews where those are ingested. Frequently asked questions may be answered from a pre-generated set, so a common question returns faster than a novel one. An answer can cite the part of the product imagery it draws on, such as a size chart or a dimensions diagram, and can suggest related products where they help. page_context.item_id is the product the question is about, and shopper_input is the question itself. Pass thread_id to ask a follow-up in the same conversation. Results stream back as server-sent events (text/event-stream) so the agent's reply can be rendered as it is produced. To receive the finished reply as a single JSON document instead, send Accept: application/json.
Request
- Base URLhttps://agent.cnstrc.com
- URLhttps://agent.cnstrc.com/v1/agent_insights/qna
- Authnone required
Query parameters
The key of the index to use.
A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. When omitted, a new thread is created.
Turn the content moderation check on or off. When on, shopper input is screened before the agent processes it.
The maximum number of result events to return.
The maximum number of results to return per item_results event.
An object containing options to format different aspects of the response.
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.
The ID of the client and version that the request is coming from, such as cio-js-2.90.
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.
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 keyed by feature name. Accepts flattened feature_variants[<feature_name>] query parameters.
Feature toggles keyed by feature name. Accepts flattened features[<feature_name>] query parameters.
An integer representing the user's session number (starting with 1), incremented after a 30 minute period of inactivity.
A globally unique identifier for the user browser (or mobile application instance) making the request.
Request body
Response
AI-powered agent insights, streamed as server-sent events or aggregated into a single JSON document.
Example response
{
"follow_up_refinement": {
"options": [
"Yes, sub-zero",
"No, mild weather"
],
"question": "Do you need it for winter conditions?"
},
"item_results": [
{
"request": {
"ids": [
"item_id_1"
],
"params": {
"num_results_per_page": 20
},
"type": "browse"
},
"response": {
"results": [
{
"value": "Waterproof Hiking Boot",
"matched_terms": [
"waterproof",
"hiking"
],
"is_slotted": false,
"labels": {},
"data": {
"id": "item_id_1",
"url": "https://example.com/product/item_id_1",
"image_url": "https://cdn.example.com/item_id_1.jpg"
}
}
]
},
"result_id": "973e152a-ee03-47d2-a01b-1214da90a02b"
}
],
"message": "Based on your interest in hiking gear, here are some waterproof options...",
"result_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "complete",
"thread_id": "662e8400-e29b-41d4-a716-446655440001"
}Changes
No recorded changes to this operation across all 1 revision of this API.