Updates the quantity of one or more line items in a specified cart.
The updateLineItemsQuantity()
function returns a Promise that resolves when the quantities of the specified cart's line items are updated.
This endpoint is only for updating the quantity of line items. To entirely remove a line item from the cart, use removeLineItems()
. To add a new line item to the cart, use addToCart()
.
This endpoint checks the amount of stock remaining for this line item. If the specified quantity
is greater than the remaining stock, then the quantity
returned in the response is the total amount of remaining stock.
Cart ID.
Line item IDs and their new quantity.