انتقل إلى المحتوى

لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.

Create affiliate

POST/admin/v1/stores/{store_id}/affiliates
  • discounts:write
  • يدعم Idempotency-Key

Adds an affiliate and emails them their private page.

معاملات المسار

  • store_idstringمطلوب

    معرّف من نوع store، مثل store_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.

الترويسات

  • Idempotency-Keystring

    أرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.

  • shop-api-versionYYYY-MM

    الإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.

الجسم

  • namestringمطلوب
  • emailstringمطلوب
  • phonestring · أو null
  • codestring · أو null

    Left empty, it comes from their name.

  • discount_idstring · أو null

    TypeID with the disc prefix.

  • commission_bpinteger · أو null

    Basis points; or send commission_fixed for an amount per order.

  • commission_fixedinteger · أو null

    Minor units per order.

  • socialsstring · أو null
  • licence_numberstring · أو null
  • notestring · أو null

ما يُرجعه

201 The affiliate.

الأخطاء

  • 409That code or email is taken.
  • 422validation_failedInvalid fields.