Update Cart Line Item
Updates a *Cart* line item. Updates an existing, single line item quantity and the price of custom items in a cart.
If a modified product or variant needs to be changed or updated, you can remove and re-add the product to the cart with the correct variants using the [Delete Cart Line Item](/developer/api-reference/rest/storefront/carts/cart-items#delete-cart-line-item) and the [Add Cart Line Items](/developer/api-reference/rest/storefront/carts/cart-items#add-cart-line-items) endpoints. You can also use carts mutations that are part of the [GraphQL Storefront API](/developer/docs/admin/checkout-and-cart/custom-checkouts/graphql-storefront).
> #### Notes
> * Substitute your storefront domain for `yourstore.example.com`.
> * The Send a Test Request feature is not currently supported for this endpoint.
> * To prevent lost updates due to concurrent requests overriding changes made by others, it is recommended to enable optimistic concurrency control by including the `version` field in the request payload. If the provided version does not match the version on the server, a conflict error will be returned, which the client can handle accordingly.
Path parameters
cartId
itemId
Request
This endpoint expects an object.
Line item
OR
Gift certificate item
OR
line & gift certificate items
Response
id
Cart ID, provided after creating a cart with a POST.
customerId
ID of the customer to which the cart belongs.
email
The cart's email. This is the same email that is used in the billing address
currency
This will always be the same between cart and checkout.
isTaxIncluded
Whether this item is taxable.
baseAmount
Cost of cart’s contents, before applying discounts.
discountAmount
Order based discounted amount only - Coupon discounts and product based discounts are excluded.
cartAmount
Sum of line-items amounts, minus cart-level discounts and coupons. This amount includes taxes (where applicable).
coupons
discounts
lineItems
createdTime
Time when the cart was created.
updatedTime
Time when the cart was last updated.
locale
Locale of the cart.
version
The current version of the cart increments with each successful update. You can use it to enable optimistic concurrency control for subsequent updates.
Errors
409
Conflict Error