# Removing products from cart

## Problem

You have some items in your shopping cart and you want to remove one of them.

![A sample cart item removal](https://2610849379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lk-ezuDClaMavTqnRi0%2Fuploads%2FKHueyYNFPhFV7kxG9LtS%2Fremove-from-cart-cover.jpg?alt=media\&token=e8168c03-3f05-4c51-83c4-1e13ea11c9de)

## Solution

Removing a product (SKU) from your shopping cart means deleting an existing line item. To do that, send a `DELETE` request to the `/api/line_items/:id` endpoint.

### Example

{% tabs %}
{% tab title="Request" %}
The following request removes the line item identified by the "aBmNkPQRst" ID from your shopping cart:

```javascript
curl -g -X DELETE \
  'http://yourdomain.commercelayer.io/api/line_items/aBmNkPQRst' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token' \
  -H 'Content-Type: application/vnd.api+json' \
```

{% endtab %}

{% tab title="Response" %}
On success, the API responds with a `204 No Content` status code.
{% endtab %}
{% endtabs %}

## More to read

See our documentation if you need more information on how to [delete a line item](https://docs.commercelayer.io/developers/v/api-reference/line_items/delete).
