Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Dieser Endpunkt gibt in der Spezifikation keine spezifische Berechtigung an. Versehen Sie Ihren Schlüssel daher mit den minimal erforderlichen Rechten und prüfen Sie die Antwort, anstatt Annahmen zu treffen.
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 POST https://api.zinndigital.com/v1/affiliate \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "commission_plan": <string<recurring_12m, lifetime>>, "payout_destination": <string<wallet, cash>>, "accept_terms": <boolean> }'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
Gated on `affiliate.manage`. The account lands `pending` and accrues nothing until staff approve it — otherwise the programme is an open invitation to self-refer at scale. Choosing cash payouts sets `kyc_state` to `required`; wallet credit needs no verification because the money never leaves the platform.
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
org_id (query) | string | Nein | — |
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
commission_plan | string<recurring_12m, lifetime> | Ja | — |
payout_destination | string<wallet, cash> | Ja | — |
accept_terms | boolean | Ja | Must be `true`. An affiliate agreement is a contract about money, so acceptance is recorded explicitly rather than assumed. |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
id | string | Ja | — |
org_id | string | Ja | — |
state | string<pending, approved, rejected, suspended> | Ja | — |
code | string | Ja | The referral code. Its alphabet excludes the characters people transcribe wrongly (`0`/`O`, `1`/`I`/`l`), because it is read aloud and typed off a slide. |
referral_url | string | Ja | The link to share — the public site with `?ref=CODE`. |
commission_plan | string<recurring_12m, lifetime> | Ja | The line **new** referrals will be created on. Changing it never affects customers already referred. |
payout_destination | string<wallet, cash> | Ja | — |
kyc_state | string<not_required, required, submitted, verified, rejected> | Ja | — |
review_note | string | Nein | — |
terms_accepted_at | string | Nein | — |
applied_at | string | Nein | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 409 · 422