لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Replace media
POST
/ admin/ v1/ stores/ {store_id}/ media/ {media_id}/ replacement- products:write
- content:write
- يدعم Idempotency-Key
Reserve new bytes under the same media ID, so everything that uses the file shows the new one. Send the file to the files edge as upload says, then call …/replacement/complete with the edge's receipt. The new file must be the same kind.
معاملات المسار
store_idstringمطلوبمعرّف من نوع
store، مثلstore_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.media_idstringمطلوبمعرّف من نوع
med، مثلmed_01k8qs5s….
الترويسات
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
filenamestringمطلوبcontent_typestringمطلوبsize_bytesintegerمطلوب
ما يُرجعه
201 Replacement slot created.
الأخطاء
- 404
not_foundNo such media. - 409The file isn't uploaded yet.
- 422
validation_failedUnsupported type, size or name, or another kind of file.