surveys
GET /v1/surveys/active
The surveys this organisation may currently be shown.
Uthibitishaji
Tuma ufunguo wa API kama tokeni ya kubeba. Ufunguo lazima uwe na ruhusa ya org.read; ufunguo usio nayo unakataliwa kwa 403, si 404.
Mahali ambapo kitambulisho cha shirika lako huwekwa
Kigezo hiki kinachukua org_id kama kigezo cha utafutaji. Iache wazi na simu itashughulikia tawi lako lote la wapangaji; itume ili kupunguza simu iwe ya shirika moja tu.
Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.
Jaribu
Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.
curl -X GET https://api.zinndigital.com/v1/surveys/active \
-H "Authorization: Bearer zdk_live_…"Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API
Maelezo
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`.
Vigezo
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
org_id (query) | string | Hapana | — |
distinct_id (query) | string | Hapana | The browser's analytics distinct id, so the join resolves. |
Majibu
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
available | boolean | Ndiyo | — |
reason | string<, unconfigured, unreachable, refused, not_found, malformed> | Ndiyo | — |
surveys | Survey[] | Ndiyo | — |
Hitilafu ambazo mwisho huu unaweza kurudisha
401 · 403