Update Cart
Cart
Update Cart
Update cart items or attributes
POST
Update Cart
Update Cart
Updates quantities of items in the cart, or updates the cart note, attributes, and discount codes.Cart update is a storefront surface, not part of the OAuth
/api/v1 app
API. It follows the Shopify-AJAX cart contract: requests are made against the
storefront origin (your store domain), identity is the cart cookie token
(not a Bearer access token), and the response is the flat Shopify cart
object — not wrapped in a { status, type, data } envelope.Request
Body Parameters
Object mapping variant IDs to new quantities. Set a quantity to
0 to
remove that item.Update the cart note
Update cart attributes (replaces existing attributes)
Discount code(s) to apply. Accepts a single code or comma-separated codes.
Pass an empty string to clear all applied discount codes.
Response
The response is the flat Shopify cart object (the same shape returned by Get Cart), reflecting the updated cart. For quantity updates the response also includes anitems_changelog object
({ added, removed }).