Chat API
Interactive chat bot style conversation for item discovery. Pass inconversation_id to continue an existing conversation.
Endpoint
Request Body (ChatRequest)
| Field | Type | Required | Description |
|---|---|---|---|
message | String | Yes | The chat message. Example: ‘I am looking for a birthday gift for my dad’. |
conversation_id | String | No | A string uniquely identifying a conversation. Pass this to continue an existing conversation. |
session_id | String | No | A string uniquely identifying a session. |
user_id | String | No | A string uniquely identifying a user. |
events | Array | No | A list of events associated with the conversation. See Event object structure. |
limit | Integer | No | The maximum number of items to return. Default is 4. |
Event Object Structure
Theevents array contains a list of Event objects, each describing a user interaction or context relevant to the conversation.
| Field | Type | Required | Description |
|---|---|---|---|
timestamp | String | Yes | ISO 8601 timestamp of the event. |
type | String | Yes | Type of the event (e.g., browse, click, purchase). |
item_id | String | No | The ID of the item associated with the event, if applicable. |
description | String | No | A free-text description of the event. |
Example Request
Response Body (ChatResponse)
| Field | Type | Description |
|---|---|---|
conversation_id | String | A string uniquely identifying the conversation. |
message | String | The chat message response. |
items | Array | A list of items (Item objects) related to the chat response. |
Example Response
Responses
200 OK: Successful Response (ChatResponse)422 Validation Error: (HTTPValidationError)

