Skip to main content
DELETE
/
cart
/
item
/
:id
DELETE /cart/item/10
204 No Content

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header.
Authorization: Bearer <token>

Path Parameters

id
integer
required
The ID of the cart item to remove (not the product ID)
DELETE /cart/item/10

Response

Returns a 204 No Content status on success with an empty response body.
204 No Content

Behavior

  • Removes the specified cart item completely from the cart
  • The cart item must belong to the authenticated user’s cart
  • After removal, the cart will still exist but without that item
  • Use the DELETE /cart/clear endpoint if you want to remove all items at once

Error Responses

Cart Item Not Found (404)

{
  "message": "Item no encontrado en tu carrito"
}
This error occurs when:
  • The cart item ID doesn’t exist
  • The cart item belongs to another user’s cart

Unauthorized (401)

{
  "message": "Usuario no autenticado"
}

Build docs developers (and LLMs) love