surveys

GET /v1/surveys/active

The surveys this organisation may currently be shown.

Semua titik akhir surveys

Autentikasi

Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin org.read; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.

Tempat ID organisasi Anda dimasukkan

Titik akhir ini menerima org_id sebagai parameter kueri. Kosongkan parameter tersebut dan panggilan ini akan mencakup seluruh subpohon penyewa Anda; kirimkan untuk mempersempit panggilan ke satu organisasi.

ID organisasi Anda berada di layar kunci API di dasbor Anda, di sebelah kunci itu sendiri. Itu adalah ID yang sama dalam setiap panggilan yang Anda buat.

Coba

Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.

curl -X GET https://api.zinndigital.com/v1/surveys/active \
  -H "Authorization: Bearer zdk_live_…"

Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API

Detail

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

NamaJenisWajibTentang apa ini
org_id (query)stringTidak
distinct_id (query)stringTidakThe browser's analytics distinct id, so the join resolves.

Tanggapan

NamaJenisWajibTentang apa ini
availablebooleanYa
reasonstring<, unconfigured, unreachable, refused, not_found, malformed>Ya
surveysSurvey[]Ya

Kesalahan yang dapat dikembalikan oleh titik akhir ini

401 · 403