لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Create upload
POST
/ admin/ v1/ stores/ {store_id}/ media/ uploads- products:write
- content:write
- يدعم Idempotency-Key
Reserve a file and get the permission to upload it. Send the bytes to the files edge as upload says, then call POST /media/{media_id}/complete with the edge's receipt.
معاملات المسار
store_idstringمطلوبمعرّف من نوع
store، مثلstore_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.
الترويسات
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
filenamestringمطلوبcontent_typestringمطلوبJPEG, PNG,
WebP, GIF, AVIF (≤ 20 MB), MP4,WebM(≤ 500 MB) or PDF (≤ 25 MB).size_bytesintegerمطلوبaltstring · أو null
ما يُرجعه
201 Upload slot created.
الأخطاء
- 403
forbiddenMissing permission. - 422
validation_failedUnsupported type, size or name.