لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
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 · أو nullcodestring · أو nullLeft empty, it comes from their name.
discount_idstring · أو nullTypeID with the
discprefix.commission_bpinteger · أو nullBasis points; or send
commission_fixedfor an amount per order.commission_fixedinteger · أو nullMinor units per order.
socialsstring · أو nulllicence_numberstring · أو nullnotestring · أو null
ما يُرجعه
201 The affiliate.
الأخطاء
- 409That code or email is taken.
- 422
validation_failedInvalid fields.