لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Generate barcodes
POST
/ admin/ v1/ stores/ {store_id}/ products/ barcodes- products:write
- يدعم Idempotency-Key
Give variants without a barcode an in-store EAN-13 (starting with 2, unique in the store), so they can be labelled and scanned.
معاملات المسار
store_idstringمطلوبمعرّف من نوع
store، مثلstore_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.
الترويسات
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
variant_idsarray of stringsVariants; those with a barcode keep it. 1–250 with the products' variants.
product_idsarray of stringsEvery variant of these products.
ما يُرجعه
200 Each variant with its barcode.
الأخطاء
- 403
forbiddenMissing permission. - 404
not_foundA variant that doesn't exist. - 422
validation_failedNo variants, or more than 250.