Skip to main content
POST
This endpoint removes all items from a cart while preserving the cart itself, customer information, and applied settings. Useful for “Clear Cart” functionality.

Authentication

This endpoint requires a valid API key with carts:write permissions.

Path Parameters

string
required
The unique identifier of the cart to clear

Request Body

boolean
default:"false"
Keep applied coupon codes
string
Reason for clearing the cart (for analytics)

Response

Returns the cleared cart object.