Remove cart items from the cart
DELETE
/carts/{cartId}/cartItems/{cartItemId}
const url = 'https://myshop.com/shopgate/v1/carts/example/cartItems/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://myshop.com/shopgate/v1/carts/example/cartItems/example \ --header 'Authorization: Bearer <token>'Removes a cart item from the cart entirely.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”cartId
required
string
cartItemId
required
string
Responses
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"}The product can’t be removed from the cart because it depends on another product.
Media typeapplication/json
object
message
string
Example
{ "message": "The product 'Some Product' doesn't exist in your cart."}
