Skip to main content
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 subsequent add 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 standard /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 cart object — not an { status, data } envelope.
string
The cart token (unchanged)
array
Line items — empty after a clear
integer
Number of items in the cart (0 after a clear)
integer
Cart total in the currency’s smallest unit (cents)
string
Presentment currency code

Example Response

Errors

A failed clear returns the same bare response body with an HTTP error status and a message/description: