Clear Cart
Cart
Clear Cart
Remove all items from the cart
POST
Clear Cart
Clear Cart
Removes all line items from the cart. The cart itself (and its token) is preserved, so the same token keeps working for subsequentadd requests.
The cart is a storefront, cookie-based resource, not part of the OAuth
/api/v1 app API. Requests go to the shop’s own domain (e.g.
https://mystore.launchmystore.io/cart/clear.js) and the cart is identified by
the cart cookie that the storefront sets — there is no Authorization: Bearer
header. This mirrors the Shopify /cart/clear.js AJAX endpoint.Request
Body Parameters
No parameters required. The request body is ignored —clearCart only ever
deletes the cart’s line items.
Response
Returns the (now empty) cart as a bare Shopify-style cart object — not an{ status, data } envelope.
The cart token (unchanged)
Line items — empty after a clear
Number of items in the cart (0 after a clear)
Cart total in the currency’s smallest unit (cents)
Presentment currency code
Example Response
Errors
A failed clear returns the same bare Shopify-style body with an HTTP error status and amessage/description: