لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Add several variants at once
POST
/ store/ v1/ carts/ {cart_id}/ lines/ batch- يدعم Idempotency-Key
Add several variants at once, such as a look's pieces or a bundle a theme builds: all of them or, when one can't be bought, none. Each is added as POST /carts/{cart_id}/lines would; problems are reported under lines[<index>].
معاملات المسار
cart_idstringمطلوبمعرّف من نوع
cart، مثلcart_01k8qs5s….
الترويسات
X-Cart-TokenstringمطلوبThe cart's token
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
linesarray of objectsمطلوب1 to 25 lines.
ما يُرجعه
200 The updated cart.
الأخطاء
- 404
not_foundNo such cart. - 409A payment is in progress, or the cart is completed.
- 422
validation_failedAn unavailable product, an invalid quantity, or more than 25 lines.