Skip to content
Menu
All API groups

Assistant

Shopping assistant and its settings.

10 endpoints.

POST/v1/assistant/chat

Shopping assistant (public key with the `assistant` scope)

Needs a key or a dashboard session

Request body application/json ChatRequest

NameTypeRequiredDescription
conversation_idstring | nullnoOmit to start a new conversation.
messagestringyesmin length 1 · max length 2000
localestringnodefault "ar" · pattern ^[a-z]{2}$
sessionstring | nullnomax length 64
contextmap<string, string>noe.g. current product id or category page.
streambooleannotrue = text/event-stream of ChatEvent objects.default false

Responses

GET/v1/assistant/widget

Chat widget setup: on/off, white-label name, greeting (public key with the `assistant` scope)

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
localequerystringnodefault "ar" · pattern ^[a-z]{2}$

Responses

GET/v1/assistant/settings

Assistant Settings Get

Needs a key or a dashboard session

Responses

  • 200Successful ResponseAssistantSettings-Output
PUT/v1/assistant/settings

Assistant Settings Put

Needs a key or a dashboard session

Request body application/json AssistantSettings-Input

NameTypeRequiredDescription
enabledbooleannodefault false
display_namestringnoWhite-label name, e.g. "Ask Store".max length 60
tone"friendly" | "formal" | "brief"nodefault "friendly"
localesstring[]no
handovermap<string, string>nowhatsapp/phone/email targets.
monthly_budget_usdnumber | string | nullnoOptional cap for the assistant INSIDE the store's total monthly AI budget (ADR 0006). When it is used up only the assistant stops; search and translation go on.min 0
greetingmap<string, string>no

Responses

  • 200Successful ResponseAssistantSettings-Output
GET/v1/assistant/conversations

Assistant Conversations List

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
cursorquerystring | nullnomax length 200
limitqueryintegernodefault 50 · min 1 · max 200

Responses

GET/v1/assistant/conversations/{conversation_id}

Assistant Conversations Get

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
conversation_idpathstringyes

Responses

GET/v1/assistant/knowledge

Store FAQ and policies the assistant may use

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
cursorquerystring | nullnomax length 200
limitqueryintegernodefault 100 · min 1 · max 200

Responses

POST/v1/assistant/knowledge

Knowledge Create

Needs a key or a dashboard session

Request body application/json KnowledgeDocIn

NameTypeRequiredDescription
kind"faq" | "policy" | "page"yes
localestringyespattern ^[a-z]{2}$
titlestringyesmax length 300
contentstringyesmax length 50000
urlstring | nullnomax length 2048

Responses

PUT/v1/assistant/knowledge/{doc_id}

Knowledge Update

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
doc_idpathstringyes

Request body application/json KnowledgeDocIn

NameTypeRequiredDescription
kind"faq" | "policy" | "page"yes
localestringyespattern ^[a-z]{2}$
titlestringyesmax length 300
contentstringyesmax length 50000
urlstring | nullnomax length 2048

Responses

DELETE/v1/assistant/knowledge/{doc_id}

Knowledge Delete

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
doc_idpathstringyes

Responses

Data shapes on this page

ChatRequest

NameTypeRequiredDescription
conversation_idstring | nullnoOmit to start a new conversation.
messagestringyesmin length 1 · max length 2000
localestringnodefault "ar" · pattern ^[a-z]{2}$
sessionstring | nullnomax length 64
contextmap<string, string>noe.g. current product id or category page.
streambooleannotrue = text/event-stream of ChatEvent objects.default false

ChatResponse

NameTypeRequiredDescription
conversation_idstringyes
message_idstringyes
answerstringyes
productsProductCard[]noLive prices and stock from the index.
comparisonobject | nullnoTable when comparing 2-4 products.
sourcesSource[]no
follow_up_questionsstring[]no
handoverHandover | nullno
refused"off_topic" | "injection" | "budget" | "unavailable" | nullno

ProductCard

Display fields. Connectors that render their own cards use only `id`.

NameTypeRequiredDescription
idstringyes
namemap<string, string>yes
urlstring | nullno
image_urlstring | nullno
pricestringyes
sale_pricestring | nullno
currencystringyes
in_stockbooleanyes
brandstring | nullno
categorymap<string, string> | nullno

Source

NameTypeRequiredDescription
type"product" | "faq" | "policy" | "page"yes
idstringyes
titlestring | nullno
fieldsstring[]noCatalog fields the answer used (price, size, ...).

Handover

NameTypeRequiredDescription
channel"whatsapp" | "phone" | "email"yes
urlstring | nullno
summarystringyes

AssistantWidgetConfig

What the shopper-side chat widget needs (public key, `assistant` scope). No budget, no targets.

NameTypeRequiredDescription
enabledbooleanyesfalse: the widget hides the chat button.
display_namestringyesWhite-label name, e.g. "Ask Store" (default "Ask <store name>").
greetingstringyes
localestringyes
handover_channels"whatsapp" | "phone" | "email"[]no

AssistantSettings-Output

NameTypeRequiredDescription
enabledbooleannodefault false
display_namestringnoWhite-label name, e.g. "Ask Store".max length 60
tone"friendly" | "formal" | "brief"nodefault "friendly"
localesstring[]no
handovermap<string, string>nowhatsapp/phone/email targets.
monthly_budget_usdstring | nullnoOptional cap for the assistant INSIDE the store's total monthly AI budget (ADR 0006). When it is used up only the assistant stops; search and translation go on.
greetingmap<string, string>no

AssistantSettings-Input

NameTypeRequiredDescription
enabledbooleannodefault false
display_namestringnoWhite-label name, e.g. "Ask Store".max length 60
tone"friendly" | "formal" | "brief"nodefault "friendly"
localesstring[]no
handovermap<string, string>nowhatsapp/phone/email targets.
monthly_budget_usdnumber | string | nullnoOptional cap for the assistant INSIDE the store's total monthly AI budget (ADR 0006). When it is used up only the assistant stops; search and translation go on.min 0
greetingmap<string, string>no

Page_ConversationSummary_

NameTypeRequiredDescription
dataConversationSummary[]yes
next_cursorstring | nullno
totalinteger | nullnoPresent when cheap to count.

ConversationSummary

NameTypeRequiredDescription
idstringyes
localestringyes
started_atstring (date-time)yes
message_countintegeryes
handoverstringyes
clickedbooleanyes
cost_usdstringyes

ConversationDetail

NameTypeRequiredDescription
idstringyes
localestringyes
started_atstring (date-time)yes
message_countintegeryes
handoverstringyes
clickedbooleanyes
cost_usdstringyes
messagesConversationMessage[]yes
summarystring | nullno

ConversationMessage

NameTypeRequiredDescription
idstringyes
role"user" | "assistant"yes
contentstringyes
sourcesSource[]no
product_idsstring[]no
flaggedstring | nullno
created_atstring (date-time)yes

Page_KnowledgeDocOut_

NameTypeRequiredDescription
dataKnowledgeDocOut[]yes
next_cursorstring | nullno
totalinteger | nullnoPresent when cheap to count.

KnowledgeDocOut

NameTypeRequiredDescription
kind"faq" | "policy" | "page"yes
localestringyespattern ^[a-z]{2}$
titlestringyesmax length 300
contentstringyesmax length 50000
urlstring | nullnomax length 2048
idstringyes
updated_atstring (date-time)yes

KnowledgeDocIn

NameTypeRequiredDescription
kind"faq" | "policy" | "page"yes
localestringyespattern ^[a-z]{2}$
titlestringyesmax length 300
contentstringyesmax length 50000
urlstring | nullnomax length 2048

Deleted

NameTypeRequiredDescription
deletedbooleannodefault true
idstringyes