live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
සත්යාපනය
බෙරර් ටෝකනයක් ලෙස API යතුරක් යවන්න. යතුරෙහි livechat.manage අවසරය තිබිය යුතුය; එය නොමැති යතුරක් 404 ලෙස නොව 403 ලෙස ප්රතික්ෂේප කෙරේ.
මෙම අවසාන ලක්ෂ්යය සඳහා සංවිධාන හැඳුනුම්පතක් (organisation id) අවශ්ය නොවේ. ඔබගේ යතුර මඟින් එය අයත් වන සංවිධානය දැනටමත් හඳුනා ගන්නා අතර, ප්රතිචාරය ඒ වෙත සීමා වේ.
උත්සාහ කරන්න
<අගයන්> සමඟ කෝණික වරහන් තුළ ඇති ඕනෑම දෙයක් සහ ඔබේ උපකරණ පුවරුවෙන් ලබාගත් යතුරක් සමඟ key ස්ථාන දායකය ප්රතිස්ථාපනය කරන්න.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'පද්ධතියට පිවිස සිටිනවාද? ඔබගේ උපකරණ පුවරුවේ ඇති API කොන්සෝලය මඟින් ඔබේ සැබෑ ආයතනික හැඳුනුම්පත සහ ඔබේම යතුර පුරවා, සජීවී API වෙත ඉල්ලීම ක්රියාත්මක කරන බැවින් ඔබට සැබෑ ප්රතිචාරය දැකගත හැක. මෙම අග්රලක්ෂ්යය API කොන්සෝලය තුළ විවෘත කරන්න
විස්තර
Requires livechat.manage. Switching a widget on with no allowedOrigins is refused with 422 rather than accepted: the widget only answers pages on origins the customer listed, so an empty list would leave the chat live, looking configured, and invisible on every page with nothing saying why.
පරාමිතීන්
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
widgetId (path) | string | ඔව් | — |
ඉල්ලුම් පත්ර ශරීරය
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
name | string | නැත | — |
enabled | boolean | නැත | — |
allowed_origins | string[] | නැත | — |
greeting | string | නැත | — |
team_name | string | නැත | — |
accent_colour | string | නැත | — |
position | string<left, right> | නැත | — |
hide_branding | boolean | නැත | — |
ai_enabled | boolean | නැත | — |
offline_email | string | නැත | — |
business_hours | object | නැත | — |
පsspil
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
id | string | ඔව් | — |
site_id | string | ඔව් | — |
name | string | ඔව් | — |
public_key | string | ඔව් | — |
enabled | boolean | ඔව් | Whether the chat renders. Created FALSE always: the plugin ships in the deploy footprint of every WordPress site we host, so a widget may exist for a customer who never asked for… |
allowed_origins | string[] | ඔව් | Origins the widget may be embedded on. An EMPTY list refuses every page rather than allowing any — this is the only control stopping somebody else's site opening conversations… |
tier | string | ඔව් | The tier this widget is EFFECTIVELY on. Premium is included free with Zinn® hosting, so this may read premium on a widget nobody has paid for — read purchased_tier for what… |
tier_source | string<free, purchase, hosting> | ඔව් | Why the widget is on that tier. hosting means it is included with the customer's Zinn® hosting and there is nothing to buy; purchase means the Premium extra was bought for… |
purchased_tier | string | ඔව් | The tier actually PAID for, independent of any hosting inclusion. |
greeting | string | ඔව් | — |
team_name | string | ඔව් | — |
accent_colour | string | ඔව් | — |
position | string<left, right> | ඔව් | — |
hide_branding | boolean | ඔව් | — |
ai_enabled | boolean | ඔව් | — |
offline_email | string | ඔව් | — |
business_hours | object | නැත | — |
open_now | boolean | ඔව් | — |
ai_allowance | ChatAiAllowance | ඔව් | — |
limits | object | ඔව් | — |
premium_extra_code | string | ඔව් | The catalogue code to buy for the premium tier. |
මෙම අවසාන ලක්ෂ්යය ආපසු ලබා දිය හැකි දෝෂ
401 · 403 · 404 · 422