surveys
GET /v1/surveys/active
The surveys this organisation may currently be shown.
אימות
שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה org.read; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.
המקום שבו מזהה הארגון שלך נכנס
נקודת קצה זו מקבלת את org_id כפרמטר שאילתת חיפוש. השאר אותו ריק והקריאה תכסה את כל תת-עץ הדיירות שלך; שלח אותו כדי לצמצם את הקריאה לארגון אחד.
מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
curl -X GET https://api.zinndigital.com/v1/surveys/active \
-H "Authorization: Bearer zdk_live_…"מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרטים
Every decision ABOUT the customer is applied here, server-side, before a survey crosses the wire — good standing, the per-organisation kill switch, and archived or stopped surveys. The client is left with exactly the three things only it can know: which route it is on, whether this person has seen a survey recently, and the sampling die roll. ⛔ `available` is a first-class part of the answer. A survey store that is unconfigured, rate-limited or unreachable is NOT the same fact as "you have no surveys", and `surveys: []` on its own would tell the app every survey had been archived. On `available: false` the client keeps its previous answer. Requires `org.read`.
פרמטרים
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
org_id (query) | string | לא | — |
distinct_id (query) | string | לא | The browser's analytics distinct id, so the join resolves. |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
available | boolean | כן | — |
reason | string<, unconfigured, unreachable, refused, not_found, malformed> | כן | — |
surveys | Survey[] | כן | — |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403