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

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

Complete replacement

POST/admin/v1/stores/{store_id}/media/{media_id}/replacement/complete
  • products:write
  • content:write
  • يدعم Idempotency-Key

Confirm a replacement with the files edge's receipt. Clean new bytes take the file's place at once; bytes whose malware scan is still running wait (replacing: true) while the file keeps its current ones.

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

  • store_idstringمطلوب

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

  • media_idstringمطلوب

    معرّف من نوع med، مثل med_01k8qs5s….

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • receiptstringمطلوب

    Exactly as the edge returned it.

ما يُرجعه

200 The file: with its new bytes, or still replacing.

الأخطاء

  • 404not_foundNo such media.
  • 409No replacement waiting (no_replacement) or superseded (replacement_superseded).
  • 422validation_failedAn invalid receipt, or the scan blocked the new file.