This endpoint allows you to delete a user's shopping cart from your Venddor store. This operation is useful for clearing abandoned carts or resetting a customer's shopping session.
Deletes the cart associated with the specified user ID.
Parameter | Type | Required | Description |
---|---|---|---|
user_id | integer | Yes | The unique identifier of the user whose cart you want to delete. |
DELETE /api/carts/3
This request deletes the cart for the user with user_id=3
.
The endpoint returns no content on successful deletion, only a status code indicating success.
Status Code | Description |
---|---|
204 No Content |
The cart has been deleted successfully. |
404 Not Found |
The specified cart doesn't exist or has already been deleted. |
When using the Delete Cart endpoint, consider the following use cases and best practices: