لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Add a variant
/ store/ v1/ carts/ {cart_id}/ lines- يدعم Idempotency-Key
Add a variant, or more of it when it's already in the cart.
معاملات المسار
cart_idstringمطلوبمعرّف من نوع
cart، مثلcart_01k8qs5s….
الترويسات
X-Cart-TokenstringمطلوبThe cart's token
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
product_idstringمطلوبTypeID with the
prodprefix.variant_idstringمطلوبTypeID with the
varprefix.quantityintegerمطلوبselling_plan_idstring · أو nullSubscribe with one of the product's selling plans; absent: bought once. Adding a variant the cart has sets its line's plan.
inputsobjectAnswers to the product's questions, by input ID. The same variant with other answers is a line of its own.
propertiesobjectFree names and values the line keeps and shows in the cart, checkout and order, such as an engraving or a gift message: at most 10, names up to 60 characters, values up to 500. The same variant with other properties is a line of its own.
bookingobject · أو nullFor a bookable service: the slot (one of its availability's), and who provides it (
null: anyone free).quantityis the seats.
ما يُرجعه
200 The updated cart.
الأخطاء
- 404
not_foundNo such cart. - 409A payment is in progress, or the cart is completed.
- 422
validation_failedUnavailable product or invalid quantity.