surveys
GET /v1/surveys/active
The surveys this organisation may currently be shown.
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Der Schlüssel muss über die Berechtigung org.read verfügen; ein Schlüssel ohne diese wird mit 403 statt 404 abgelehnt.
Hier kommt Ihre Organisations-ID hin
Dieser Endpunkt akzeptiert org_id als Abfrageparameter. Lassen Sie ihn weg, erfasst der Aufruf Ihren gesamten Mandanten-Unterbaum; übergeben Sie ihn, um den Aufruf auf eine Organisation einzugrenzen.
Die ID Ihrer Organisation finden Sie im Dashboard auf dem Bildschirm für API-Schlüssel direkt neben dem Schlüssel selbst. Sie ist bei jedem Ihrer Aufrufe dieselbe.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.
curl -X GET https://api.zinndigital.com/v1/surveys/active \
-H "Authorization: Bearer zdk_live_…"Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
Details
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`.
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
org_id (query) | string | Nein | — |
distinct_id (query) | string | Nein | The browser's analytics distinct id, so the join resolves. |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
available | boolean | Ja | — |
reason | string<, unconfigured, unreachable, refused, not_found, malformed> | Ja | — |
surveys | Survey[] | Ja | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403