Skip to main content
DELETE
/
api
/
v2
/
storefront
/
cart
Delete a Cart
const options = {method: 'DELETE', headers: {'X-Spree-Order-Token': '<api-key>'}};

fetch('https://demo.spreecommerce.org/api/v2/storefront/cart', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "error": "The resource you were looking for could not be found."
}

Authorizations

X-Spree-Order-Token
string
header
required

Order token to authorize Cart and Checkout requests.

How to obtain X-Spree-Order-Token

Response

204 Success No Content Returned - Current Cart has been removed.