Storefront Checkouts
Update a Line Item
PUT /checkouts/{checkoutId}/carts/{cartId}/items/{itemId}
Request
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 endpoint or the GraphQL Storefront API.
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.
Parameters
- store_domain in path - string
- Content-Type in header with default of application/json - stringrequired
The MIME type of the request body.
Body
lineItemobject
giftCertificateobject
example
Response
Body
idstring
cartobject
A cart contains a collection of items, prices, discounts, etc. It does not contain customer-related data.
billingAddressobject
consignmentsarray[object]
couponsarray[object]
Coupons applied at the checkout level.
orderIdstring or null
shippingCostTotalnumber
Shipping cost before any discounts are applied.
giftWrappingCostTotalnumber
Gift wrapping cost for all items, including or excluding tax.
handlingCostTotalnumber
Handling cost for all consignments including or excluding tax.
taxTotalnumber
taxesarray[object]
subtotalnumber
Subtotal of the checkout before applying item-level discounts. Tax inclusive based on the store settings.
grandTotalnumber
The total payable amount, before applying any store credit or gift certificate.
giftCertificatesarray[array]
Applied gift certificate (as a payment method).
createdTimestring
Time when the cart was created.
updatedTimestring
Time when the cart was last updated.
customerMessagestring
Shopperʼs message provided as details for the order to be created from this cart
outstandingBalancenumber
grandTotal
subtract the store-credit amountisStoreCreditAppliedboolean
true
value indicates StoreCredit has been applied.
example
Delete a Line Item
DELETE /checkouts/{checkoutId}/carts/{cartId}/items/{itemId}
Request
Deletes a Line Item from the Cart.
Note
- Substitute your storefront domain for
yourstore.example.com
. - The Send a Test Request feature is not currently supported for this endpoint.
Parameters
- store_domain in path - string
- checkoutId in path - stringrequired
The ID of the subject checkout. Identical to the cart ID.
- cartId in path - stringrequired
The ID of the cart associated with this checkout. Identical to the checkout ID.
- itemId in path - stringrequired
The ID of an item being purchased.
- Accept in header with default of application/json - stringrequired
The MIME type of the response body.
example
Response
NOTE: Discounted line items are re-evaluated on cart actions and may be automatically added back to your cart with a new line item ID to satisfy promotional requirements.
Body
idstring
cartobject
A cart contains a collection of items, prices, discounts, etc. It does not contain customer-related data.
billingAddressobject
consignmentsarray[object]
couponsarray[object]
Coupons applied at the checkout level.
orderIdstring or null
shippingCostTotalnumber
Shipping cost before any discounts are applied.
giftWrappingCostTotalnumber
Gift wrapping cost for all items, including or excluding tax.
handlingCostTotalnumber
Handling cost for all consignments including or excluding tax.
taxTotalnumber
taxesarray[object]
subtotalnumber
Subtotal of the checkout before applying item-level discounts. Tax inclusive based on the store settings.
grandTotalnumber
The total payable amount, before applying any store credit or gift certificate.
giftCertificatesarray[array]
Applied gift certificate (as a payment method).
createdTimestring
Time when the cart was created.
updatedTimestring
Time when the cart was last updated.
customerMessagestring
Shopperʼs message provided as details for the order to be created from this cart
outstandingBalancenumber
grandTotal
subtract the store-credit amountisStoreCreditAppliedboolean
true
value indicates StoreCredit has been applied.