Update cart item
Cart
Update cart item
Update the quantity of a product or variant already in the cart.
PATCH
Update cart item
Update base product quantity
Use this route when the cart line item references the base product (no variant).Update by item ID
You can also update any cart item (including food items) directly by its_id:
Path parameters
| Parameter | Type | Description |
|---|---|---|
productId | string | Product identifier of the cart item (for product/variant routes). |
itemId | string | Cart line item _id (for the /cart/item/:itemId route). |
Headers
| Header | Type | Description |
|---|---|---|
Authorization | string | Provide the customer token as Bearer <jwt>. |
x-shop-id | string | Identify the shop that owns the cart. |
Content-Type | string | Set to application/json. |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
quantity | integer | Yes | New quantity to set (minimum 1). |
Successful response
Error response
Authorizations
JWT issued by the Salesive Store API for authenticated shoppers.
Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.
Headers
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.
Path Parameters
Product identifier for the cart item.
Body
application/json
New quantity for the cart line item.
Required range:
x >= 1
