لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Update discount
PATCH
/ admin/ v1/ stores/ {store_id}/ discounts/ {discount_id}- discounts:write
Partially update a discount. Send If-Match: "v{version}" to avoid overwriting someone else's changes.
معاملات المسار
store_idstringمطلوبمعرّف من نوع
store، مثلstore_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.discount_idstringمطلوبمعرّف من نوع
disc، مثلdisc_01k8qs5s….
الترويسات
If-Matchstring · أو nullETag from the last read, e.g. "v3"
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
titlestring · أو nulltitle_translationsobject · أو nullReplaces the names in other languages; a blank name removes that language.
codestring · أو nulleffectobject | object | object | object | object | object · أو nullWhat a discount does.
requirementobject | object | object · أو nullWhat the cart must contain.
eligibilityobject | object | object | object · أو nullWho may use a discount.
combines_withobject · أو nullThe other kinds of discounts this one can be used together with.
availabilityobject · أو nullWhere and for whom a discount is offered, and what it never applies to.
ما يُرجعه
200 Updated discount.
الأخطاء
- 404
not_foundNo such discount. - 409Code taken or automatic discount limit reached.
- 412
precondition_failedThe discount changed since it was read. - 422
validation_failedValidation failed.