Update Line Item

Updates a *Checkout Line Item*. Updates an existing, single line item in the cart. If a variant needs to be changed or updated, the product will need to be removed and re-added to the cart with the correct variants using the [Add Cart Line Items](/developer/api-reference/rest/storefront/carts/cart-items/add-cart-line-item) endpoint or the [GraphQL Storefront API](/developer/docs/storefront/guides/graphql-storefront-api/overview). > #### Notes > * Substitute your storefront domain for `yourstore.example.com`. > * The Send a Test Request feature is not currently supported for this endpoint. > * Please note that this API endpoint is not concurrent safe, meaning multiple simultaneous requests could result in unexpected and inconsistent results. > * This endpoint requires using Stencil CLI, a local session, and a CSRF token to work.

Path parameters

checkoutIdstringRequiredformat: "uuid"
The ID of the subject checkout. Identical to the cart ID.
cartIdstringRequiredformat: "uuid"
The ID of the cart associated with this checkout. Identical to the checkout ID.
itemIdstringRequired
The ID of an item being purchased.

Headers

AcceptstringRequiredDefaults to application/json
The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Request

This endpoint expects an object.
lineItemobjectOptional
giftCertificateobjectOptional

Response

billingAddressobject
cartobject

A cart contains a collection of items, prices, discounts, etc. It does not contain customer-related data.

channelIdinteger
Channel ID.
consignmentslist of objects
couponslist of objects
Coupons applied at the checkout level.
feeslist of objects
Fees applied at the checkout level.
createdTimestring
Time when the cart was created.
customerobject
Customer details.
customerMessagestring

Shopperʼs message provided as details for the order to be created from this cart

giftCertificateslist of objects

Applied gift certificate (as a payment method).

giftWrappingCostTotaldouble
Gift wrapping cost for all items, including or excluding tax.
grandTotalfloat
The total payable amount, before applying any store credit or gift certificate.
handlingCostTotalfloat
Handling cost for all consignments including or excluding tax.
idstringformat: "uuid"
isStoreCreditAppliedboolean

true value indicates StoreCredit has been applied.

orderIdstring or null
outstandingBalancedouble

grandTotal subtract the store-credit amount

paymentslist of objects
promotionslist of objects
shippingCostBeforeDiscountfloat
Total shipping cost for the checkout before discounts are applied.
comparisonShippingCostfloat
Total shipping cost for the checkout after automatic promotions are applied.
shippingCostTotalfloat
Shipping cost before any discounts are applied.
shouldExecuteSpamCheckboolean
subtotalfloat

Subtotal of the checkout before applying item-level discounts. Tax inclusive based on the store settings.

taxeslist of objects
taxTotalfloat
updatedTimestring
Time when the cart was last updated.
versioninteger
The current version of the checkout increments with each successful update. You can use it to enable optimistic concurrency control for subsequent updates.