DELETE /api/v1/cart/:id
Remove a single item from the cart by its cart item ID. Only the item owner can remove it.
Authentication: Required
Cache: None
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | number | Yes | Cart item ID |
Sample Request
curl -X DELETE -H "Authorization: Bearer YOUR_TOKEN" \
https://api.grails.app/api/v1/cart/1Response
// 200 OK
{
"success": true,
"data": {
"message": "Removed from cart"
},
"meta": {
"timestamp": "2026-04-08T00:00:00.000Z",
"version": "1.0.0"
}
}Error Responses
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid token |
| 403 | FORBIDDEN | Cart item belongs to another user |
| 404 | NOT_FOUND | Cart item not found |
| 500 | INTERNAL_ERROR | Failed to remove from cart |
Last updated on