Reset Cart
Empties the cart and starts over, keeping the same cart ID. Every item, discount, donation, tip and fee is dropped, and so is the cart context — the venue, the order type and its properties. After a reset the cart is as empty as a freshly initialized one, so the next PUT /cart/{cart_id} must send metadata.venue_id and metadata.order_type again.
Use this when the customer wants to start from scratch, or to walk away from a reorder or an order edit: because the context is cleared, the cart stops being an edit of the original order.
The difference from POST /cart/init is that init derives a new cart ID, can adopt a guest cart and returns only id and is_empty, while reset reuses the ID you already have and returns the full cart object.
Send Content-Type: application/json even though there is no request body.
Path Parameters
- Type: stringcart
_id requiredThe cart identifier returned by
POST /cart/init
Headers
- Type: stringContent
- Type requiredRequired on every POST, even when the body is empty
- Type: stringApplicationrequired
The
keyattribute of the application instance that sent the request - Type: stringApi
- Version requiredVersion of the API that client app expects
Body
No request body.
Responses
- application/json
- 403
The brand is not on the new product structure (NMG).
- 404
Unknown cart ID, or the cart belongs to another brand or customer.
curl https://api-public-demo.menu.app/api/cart/f6ce31f7b7549cc7c3e5326661cf1dc3b5ea5c3fd89cce634667e483e23fb51a/reset \
--request POST \
--header 'Content-Type: application/json' \
--header 'Application: ' \
--header 'Api-Version: 4.78.0'
{
"status": "OK",
"code": 200,
"data": {
"cart": {
"id": "f6ce31f7b7549cc7c3e5326661cf1dc3b5ea5c3fd89cce634667e483e23fb51a",
"products": [],
"discounts": [],
"donations": [],
"tip": null,
"fees": [],
"summary": {},
"metadata": {
"venue_id": null,
"order_type_id": null,
"is_reorder": false,
"is_order_edit": false
}
}
}
}