Autenticazione
Invia una chiave API come bearer token. Questo endpoint non specifica un permesso specifico nella specifica, quindi assegna alla tua chiave i permessi minimi necessari e verifica la risposta invece di fare supposizioni.
L'ID della tua organizzazione va qui
Questo endpoint accetta org_id come parametro di query. Omettilo e la chiamata coprirà l'intero sottoalbero del tuo tenant; invialo per limitare la chiamata a una singola organizzazione.
L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua 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> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
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.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
org_id (query) | string | No | — |
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
commission_plan | string<recurring_12m, lifetime> | Sì | — |
payout_destination | string<wallet, cash> | Sì | — |
accept_terms | boolean | Sì | Must be `true`. An affiliate agreement is a contract about money, so acceptance is recorded explicitly rather than assumed. |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
id | string | Sì | — |
org_id | string | Sì | — |
state | string<pending, approved, rejected, suspended> | Sì | — |
code | string | Sì | 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 | Sì | The link to share — the public site with `?ref=CODE`. |
commission_plan | string<recurring_12m, lifetime> | Sì | The line **new** referrals will be created on. Changing it never affects customers already referred. |
payout_destination | string<wallet, cash> | Sì | — |
kyc_state | string<not_required, required, submitted, verified, rejected> | Sì | — |
review_note | string | No | — |
terms_accepted_at | string | No | — |
applied_at | string | No | — |
Errori che questo endpoint può restituire
401 · 403 · 409 · 422