> ## Documentation Index
> Fetch the complete documentation index at: https://docs-test.rye.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# removeCart

> Removes an existing shopping cart based on the provided cart ID. It allows users to remove a cart that is no longer needed or relevant.

<Warning>
  This mutation has been **deprecated**. It is a no-op, and the cart specified by `input.id` will not actually be deleted.
</Warning>

***

### Arguments

<ParamField path="input" type={<><a href="/api-reference/cartdeleteinput">CartDeleteInput!</a></>} required>
  The `input` object contains the unique identifier (`ID`) for the cart that needs to be deleted.
</ParamField>

***

### Returns

<ParamField path="DeletedCart.deletedId" type={<><a href="/api-reference/deletedcart">DeletedCart</a></>}>
  The unique identifier (`ID`) of the deleted cart.
</ParamField>

***

### Example - request

```json Query arguments theme={null}
{
    "input": {
        "id": "{{cartId}}"
    }
}
```

```GraphQL GraphQL theme={null}
mutation ($input: CartDeleteInput!) {
    removeCart(input: $input) {
        deletedId
    }
}
```

### Example - response

```json Response theme={null}
{
    "data": {
        "removeCart": {
            "deletedId": "teWvPufPy8c2AcfkfBo9"
        }
    }
}
```

***

### Errors

If the cart is not found then a corresponding error is returned

```JSON JSON theme={null}
{
    "errors": [
        {
            "message": "Cart not found: someInvalidCartId",
            "path": [
                "removeCart"
            ],
            "extensions": {
                "code": "CART_NOT_FOUND_ERROR"
            }
        }
    ],
    "data": null
}
```
