affiliate

POST /v1/affiliate

Join the affiliate programme.

جميع نقاط نهاية affiliate

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (API) كرمز حامل (bearer token). لا يحدد نقطة النهاية هذه إذنًا محددًا في المواصفات، لذا امنح مفتاحك الحد الأدنى الذي محتاجه وتحقق من الاستجابة بدلاً من الافتراض.

حيث يتم إدخال معرف مؤسستك

تأخذ نقطة النهاية هذه org_id كمعلمة استعلام. اتركه فارغاً ليغطي الاستدعاء شجرة مستأجريك بالكامل، أو أرسله لتضييق نطاق الاستدعاء ليشمل منظمة واحدة.

معرف مؤسستك موجود على شاشة مفاتيح واجهة برمجة التطبيقات (API) في لوحة تحكمك، بجوار المفتاح نفسه. وهو نفس المعرف في كل طلب تجريه.

جربه الآن

استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.

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> }'

هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم API

التفاصيل

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.

المعلمات

الاسمالنوعمطلوبما هو هذا
org_id (query)stringلا

جسم الطلب

الاسمالنوعمطلوبما هو هذا
commission_planstring<recurring_12m, lifetime>نعم
payout_destinationstring<wallet, cash>نعم
accept_termsbooleanنعمMust be `true`. An affiliate agreement is a contract about money, so acceptance is recorded explicitly rather than assumed.

الاستجابة

الاسمالنوعمطلوبما هو هذا
idstringنعم
org_idstringنعم
statestring<pending, approved, rejected, suspended>نعم
codestringنعم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_urlstringنعمThe link to share — the public site with `?ref=CODE`.
commission_planstring<recurring_12m, lifetime>نعمThe line **new** referrals will be created on. Changing it never affects customers already referred.
payout_destinationstring<wallet, cash>نعم
kyc_statestring<not_required, required, submitted, verified, rejected>نعم
review_notestringلا
terms_accepted_atstringلا
applied_atstringلا

الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه

401 · 403 · 409 · 422