Skip to main content
PATCH
Update cart item

Update base product quantity

Use this route when the cart line item references the base product (no variant).
The path id is resolved flexibly — it may be the cart line’s own _id, or the product, food, or service id it holds. Set quantity to 0 to remove the line.
A catalog id (product/food/service) that matches more than one line — for example a food added twice with different add-on combinations — returns 409. Target the exact line by its _id with the /cart/item/:itemId route below.

Update by item ID

You can also update any cart item (including food and service items) directly by its _id. This is the unambiguous way to update one specific add-on line:

Path parameters

Headers

Body parameters

Successful response

Error response

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Path Parameters

productId
string
required

Identifier of the cart line to target. Accepts the cart line's own _id, or the product, food, or service id it holds. A catalog id (product/food/service) matches every line for that item — for a food or service added with different add-on combinations, target one specific line by its _id via /cart/item/{itemId}.

Body

application/json
quantity
integer
required

New quantity for the cart line item. Set to 0 to remove the line.

Required range: x >= 0

Response

Cart item updated successfully.

status
integer
required

HTTP status code returned by the API.

success
boolean
required

Indicates whether the request succeeded.

message
string
required

Human-readable response message.

data
object
required