Skip to main content
POST
Clear cart

Body

application/json
keep_removed_items
boolean
default:false

Keeps removed items in session when clearing the cart.

Response

Cart cleared successfully.

Complete cart object with enhanced v2 structure.

cart_hash
string

Unique cart hash.

cart_key
string

Unique cart key for the customer.

currency
object
customer
object
items
object

Cart items indexed by item key.

item_count
integer

Total number of items in cart.

items_weight
number

Total weight of all items.

coupons
object[]

Applied coupons.

needs_payment
boolean

Whether the cart needs payment.

needs_shipping
boolean

Whether the cart needs shipping.

shipping
object
fees
object[]

Cart fees.

taxes
object[]

Cart taxes.

totals
object
removed_items
object[]

Recently removed items that can be restored.

cross_sells
object[]

Cross-sell products.

notices
object

Cart notices and messages.

extensions
object

Additional data from extensions.