لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Create offer
POST
/ admin/ v1/ stores/ {store_id}/ offers- discounts:write
- يدعم Idempotency-Key
Add an offer after the others (at most 20).
معاملات المسار
store_idstringمطلوبمعرّف من نوع
store، مثلstore_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.
الترويسات
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
product_idstringمطلوبTypeID with the
prodprefix.discountobject | object | objectمطلوبThe price the offer gives.
headlinesobjectمطلوبNeeds one in the store's language; up to 80 characters each.
triggerobject | object | objectمطلوبWhich orders see the offer.
textsobjectUp to 300 characters each.
activeboolean
ما يُرجعه
201 Created.
الأخطاء
- 403
forbiddenMissing permission. - 409Already 20 offers (
too_many_offers). - 422
validation_failedValidation failed.