Update quantity of product(s) within the cart
PATCH
/carts/{cartId}/cartItems/{cartItemId}
const url = 'https://myshop.com/shopgate/v1/carts/example/cartItems/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"quantity":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://myshop.com/shopgate/v1/carts/example/cartItems/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "quantity": 1 }'Updates the quantity for one or multiple cart items referenced by their respective cartItemId. Depending on the shop and its cart rules, certain quantities can be rejected.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”cartId
required
string
cartItemId
required
string
Request Body
Section titled “Request Body”object
quantity
integer
Examplegenerated
{ "quantity": 1}object
quantity
integer
Examplegenerated
quantity=1Responses
Section titled “Responses”Media typeapplication/json
object
Examplegenerated
{}Media typeapplication/json
object
message
string
name
string
Example
{ "message": "Invalid token: access token is invalid", "name": "invalid_token"}Media typeapplication/json
object
message
string
Example
{ "message": "Not found"}
