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

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

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 strings

    Variants; those with a barcode keep it. 1–250 with the products' variants.

  • product_idsarray of strings

    Every variant of these products.

ما يُرجعه

200 Each variant with its barcode.

الأخطاء

  • 403forbiddenMissing permission.
  • 404not_foundA variant that doesn't exist.
  • 422validation_failedNo variants, or more than 250.