انتقل إلى المحتوى
القائمة
كل مجموعات الواجهة

Assistant

Shopping assistant and its settings.

10 نقاط وصول. أسماء نقاط الوصول وأوصافها مأخوذة من ملف OpenAPI، لذلك تظهر بالإنجليزية.

POST/v1/assistant/chat

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

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

جسم الطلب application/json ChatRequest

الاسمالنوعإلزاميالوصف
conversation_idstring | nullلاOmit to start a new conversation.
messagestringنعمmin length 1 · max length 2000
localestringلاdefault "ar" · pattern ^[a-z]{2}$
sessionstring | nullلاmax length 64
contextmap<string, string>لاe.g. current product id or category page.
streambooleanلاtrue = text/event-stream of ChatEvent objects.default false

الردود

GET/v1/assistant/widget

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

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

المعاملات

الاسمالموضعالنوعإلزاميالوصف
localequerystringلاdefault "ar" · pattern ^[a-z]{2}$

الردود

GET/v1/assistant/settings

Assistant Settings Get

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

الردود

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

Assistant Settings Put

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

جسم الطلب application/json AssistantSettings-Input

الاسمالنوعإلزاميالوصف
enabledbooleanلاdefault false
display_namestringلاWhite-label name, e.g. "Ask Store".max length 60
tone"friendly" | "formal" | "brief"لاdefault "friendly"
localesstring[]لا
handovermap<string, string>لاwhatsapp/phone/email targets.
monthly_budget_usdnumber | string | nullلاOptional 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>لا

الردود

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

Assistant Conversations List

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

المعاملات

الاسمالموضعالنوعإلزاميالوصف
cursorquerystring | nullلاmax length 200
limitqueryintegerلاdefault 50 · min 1 · max 200

الردود

GET/v1/assistant/conversations/{conversation_id}

Assistant Conversations Get

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

المعاملات

الاسمالموضعالنوعإلزاميالوصف
conversation_idpathstringنعم

الردود

GET/v1/assistant/knowledge

Store FAQ and policies the assistant may use

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

المعاملات

الاسمالموضعالنوعإلزاميالوصف
cursorquerystring | nullلاmax length 200
limitqueryintegerلاdefault 100 · min 1 · max 200

الردود

POST/v1/assistant/knowledge

Knowledge Create

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

جسم الطلب application/json KnowledgeDocIn

الاسمالنوعإلزاميالوصف
kind"faq" | "policy" | "page"نعم
localestringنعمpattern ^[a-z]{2}$
titlestringنعمmax length 300
contentstringنعمmax length 50000
urlstring | nullلاmax length 2048

الردود

PUT/v1/assistant/knowledge/{doc_id}

Knowledge Update

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

المعاملات

الاسمالموضعالنوعإلزاميالوصف
doc_idpathstringنعم

جسم الطلب application/json KnowledgeDocIn

الاسمالنوعإلزاميالوصف
kind"faq" | "policy" | "page"نعم
localestringنعمpattern ^[a-z]{2}$
titlestringنعمmax length 300
contentstringنعمmax length 50000
urlstring | nullلاmax length 2048

الردود

DELETE/v1/assistant/knowledge/{doc_id}

Knowledge Delete

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

المعاملات

الاسمالموضعالنوعإلزاميالوصف
doc_idpathstringنعم

الردود

أشكال البيانات في هذه الصفحة

ChatRequest

الاسمالنوعإلزاميالوصف
conversation_idstring | nullلاOmit to start a new conversation.
messagestringنعمmin length 1 · max length 2000
localestringلاdefault "ar" · pattern ^[a-z]{2}$
sessionstring | nullلاmax length 64
contextmap<string, string>لاe.g. current product id or category page.
streambooleanلاtrue = text/event-stream of ChatEvent objects.default false

ChatResponse

الاسمالنوعإلزاميالوصف
conversation_idstringنعم
message_idstringنعم
answerstringنعم
productsProductCard[]لاLive prices and stock from the index.
comparisonobject | nullلاTable when comparing 2-4 products.
sourcesSource[]لا
follow_up_questionsstring[]لا
handoverHandover | nullلا
refused"off_topic" | "injection" | "budget" | "unavailable" | nullلا

ProductCard

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

الاسمالنوعإلزاميالوصف
idstringنعم
namemap<string, string>نعم
urlstring | nullلا
image_urlstring | nullلا
pricestringنعم
sale_pricestring | nullلا
currencystringنعم
in_stockbooleanنعم
brandstring | nullلا
categorymap<string, string> | nullلا

Source

الاسمالنوعإلزاميالوصف
type"product" | "faq" | "policy" | "page"نعم
idstringنعم
titlestring | nullلا
fieldsstring[]لاCatalog fields the answer used (price, size, ...).

Handover

الاسمالنوعإلزاميالوصف
channel"whatsapp" | "phone" | "email"نعم
urlstring | nullلا
summarystringنعم

AssistantWidgetConfig

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

الاسمالنوعإلزاميالوصف
enabledbooleanنعمfalse: the widget hides the chat button.
display_namestringنعمWhite-label name, e.g. "Ask Store" (default "Ask <store name>").
greetingstringنعم
localestringنعم
handover_channels"whatsapp" | "phone" | "email"[]لا

AssistantSettings-Output

الاسمالنوعإلزاميالوصف
enabledbooleanلاdefault false
display_namestringلاWhite-label name, e.g. "Ask Store".max length 60
tone"friendly" | "formal" | "brief"لاdefault "friendly"
localesstring[]لا
handovermap<string, string>لاwhatsapp/phone/email targets.
monthly_budget_usdstring | nullلاOptional 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>لا

AssistantSettings-Input

الاسمالنوعإلزاميالوصف
enabledbooleanلاdefault false
display_namestringلاWhite-label name, e.g. "Ask Store".max length 60
tone"friendly" | "formal" | "brief"لاdefault "friendly"
localesstring[]لا
handovermap<string, string>لاwhatsapp/phone/email targets.
monthly_budget_usdnumber | string | nullلاOptional 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>لا

Page_ConversationSummary_

الاسمالنوعإلزاميالوصف
dataConversationSummary[]نعم
next_cursorstring | nullلا
totalinteger | nullلاPresent when cheap to count.

ConversationSummary

الاسمالنوعإلزاميالوصف
idstringنعم
localestringنعم
started_atstring (date-time)نعم
message_countintegerنعم
handoverstringنعم
clickedbooleanنعم
cost_usdstringنعم

ConversationDetail

الاسمالنوعإلزاميالوصف
idstringنعم
localestringنعم
started_atstring (date-time)نعم
message_countintegerنعم
handoverstringنعم
clickedbooleanنعم
cost_usdstringنعم
messagesConversationMessage[]نعم
summarystring | nullلا

ConversationMessage

الاسمالنوعإلزاميالوصف
idstringنعم
role"user" | "assistant"نعم
contentstringنعم
sourcesSource[]لا
product_idsstring[]لا
flaggedstring | nullلا
created_atstring (date-time)نعم

Page_KnowledgeDocOut_

الاسمالنوعإلزاميالوصف
dataKnowledgeDocOut[]نعم
next_cursorstring | nullلا
totalinteger | nullلاPresent when cheap to count.

KnowledgeDocOut

الاسمالنوعإلزاميالوصف
kind"faq" | "policy" | "page"نعم
localestringنعمpattern ^[a-z]{2}$
titlestringنعمmax length 300
contentstringنعمmax length 50000
urlstring | nullلاmax length 2048
idstringنعم
updated_atstring (date-time)نعم

KnowledgeDocIn

الاسمالنوعإلزاميالوصف
kind"faq" | "policy" | "page"نعم
localestringنعمpattern ^[a-z]{2}$
titlestringنعمmax length 300
contentstringنعمmax length 50000
urlstring | nullلاmax length 2048

Deleted

الاسمالنوعإلزاميالوصف
deletedbooleanلاdefault true
idstringنعم