> For the complete documentation index, see [llms.txt](https://zrpl-co-1.gitbook.io/zrpl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zrpl-co-1.gitbook.io/zrpl/reference/api-reference/delete-cart.md).

# Delete Cart

This API is used to delete an item from the shopping cart

<mark style="color:red;">`DELETE`</mark> {{Base\_url}}`/rest/V1/carts/mine/items/97337`

{% tabs %}
{% tab title="Request Body" %}

```javascript
{
  "items": [
    {
      "item_id": 97337,
       "sku": "IFPZMB-RD0",
      "qty": 1
    }
  ]
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```json
curl --location --request DELETE '{{Base_url}}/rest/V1/carts/mine/items/97337' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiIxIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOjIxMDAyNywidXR5cGlkIjozLCJpYXQiOjE3Mzc0NjcwMDQsImV4cCI6MTczNzQ3MDYwNH0.7ns-z-L5XysjFdCRy9X8RroLGQA-kixwDthq6C1ii-Q' \
--header 'Cookie: PHPSESSID=2639naaq26nbe7st472kk4ms4i' \
--data '{
  "items": [
    {
      "item_id": 97337,
       "sku": "IFPZMB-RD0",
      "qty": 1
    }
  ]
}
'
```

{% endtab %}
{% endtabs %}

* **`items`**: Array of items to be deleted from the cart.
  * **`item_id`**: Unique identifier of the item in the cart to be removed. (`97337`).
  * **`sku`**: Stock Keeping Unit (SKU) of the item, a unique identifier for the product (`"IFPZMB-RD0"`).
  * **`qty`**: Quantity of the item to be removed. (`1` indicates one unit of the item).

The payload tells the API to delete the item with `item_id: 97337`, `sku: "IFPZMB-RD0"`, and quantity `1` from the user's cart.

{% tabs %}
{% tab title="Success Response 200" %}

```javascript
true
```

{% endtab %}

{% tab title="Wrong url 404 " %}

```python
{
    "message": "The %1 Cart doesn't contain the %2 item.",
    "parameters": [
        615776,
        97333
    ]
}
```

{% endtab %}
{% endtabs %}

The response `true` indicates that the requested action was successfully completed.

In this case, it means that the item with the `item_id: 97337` and `sku: "IFPZMB-RD0"` was successfully removed from the user's cart. The `true` value is a confirmation from the API that the operation was successful.
