Add several variants at once
POST
/ store/ v1/ carts/ {cart_id}/ lines/ batch- Idempotency-Key supported
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>].
Path parameters
cart_idstringrequiredThe cart's ID, like
cart_01k8qs5s….
Headers
X-Cart-TokenstringrequiredThe cart's token
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
linesarray of objectsrequired1 to 25 lines.
Returns
200 The updated cart.
Errors
- 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.