Kimlik Doğrulama
Bir API anahtarını bearer token olarak gönderin. Bu uç nokta, teknik özelliklerde belirli bir yetki belirtmemektedir; bu nedenle, varsaymak yerine anahtarınıza ihtiyaç duyduğu en az yetkiyi verin ve yanıtı kontrol edin.
Kurum kimliğinizin yazılacağı yer
Bu uç nokta, org_id parametresini bir sorgu parametresi olarak alır. Bu parametreyi dışarıda bırakırsanız çağrı tüm kiracı alt ağacınızı kapsar; çağrıyı tek bir kuruluşa daraltmak için gönderin.
Kuruluş kimliğiniz (id), kontrol panelinizdeki API anahtarları ekranında, anahtarın hemen yanında yer alır. Yaptığınız her çağrıda aynı kimlik kullanılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
curl -X POST https://api.zinndigital.com/v1/campaigns/segments \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "definition": <CampaignSegmentNode> }'Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Ayrıntılar
The `definition` is a filter tree over the fields `GET /v1/campaigns/segments/fields` lists, and is validated on write — a definition that cannot be compiled cannot be stored, so a saved segment never explodes at send time in front of an operator who has already scheduled it. ⛔ An empty group (`{"op":"and","children":[]}`) is refused rather than treated as "everybody": a half-built segment must not silently mean the entire estate.
Parametreler
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
org_id (query) | string | Hayır | Which organization's campaigns to work on. Required only when you hold campaign access on more than one; staff always work on the platform scope and may omit it. |
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
name | string | Evet | — |
description | string | Hayır | — |
definition | CampaignSegmentNode | Evet | A filter tree. Two node shapes and no third: a GROUP (`op` with `children`) or a CONDITION (`field`/`operator`/`value`). `not` takes exactly one child — an n-ary `not` reads as… |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
id | string | Evet | — |
org_id | string | Evet | The segment's OWNER, not the orgs it selects. |
scope | string<platform, reseller> | Evet | — |
name | string | Evet | — |
description | string | Hayır | — |
definition | CampaignSegmentNode | Evet | A filter tree. Two node shapes and no third: a GROUP (`op` with `children`) or a CONDITION (`field`/`operator`/`value`). `not` takes exactly one child — an n-ary `not` reads as… |
status | string<active, archived> | Evet | — |
created_by | string | Hayır | — |
created_at | string | Hayır | — |
updated_at | string | Hayır | — |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 422