> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.papertracc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.papertracc.com/_mcp/server.

# Remove Cart Item

DELETE https://api.papertracc.com/v1/store/cart/items/{item_id}

Removes one line from the cart.

**Keys:** public key or secret key.

Reference: https://api-docs.papertracc.com/storefront/cart/remove-cart-item

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `identity` header (required) — The identity for the active workspace.

## Servers

- `https://api.papertracc.com/v1` (Production, default)
- `https://api.papertracc.com/rc-1` (Release Candidate 1)

## Request

### Path parameters

- `item_id` (string, required) — The cart line's `id`.

### Headers

- `cart-token` (string, required) — The `token` returned when the cart was created. Treat it as a secret: never put it in a URL or a log.

## Response

### 200

Successfully removed item from cart

- `status` (boolean, required) — Always `true` on success.
- `message` (string, required) — Human-readable outcome.
- `data` (Cart, required)

## Errors

### 400 Bad Request Error

The `channel` header is missing, the body is not valid JSON, or a field failed validation.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 401 Unauthorized Error

The API key is missing or invalid, the key owner is no longer an active member of the organisation, or the key owner is not a member of the workspace in the `identity` header.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 402 Payment Required Error

The workspace's subscription plan does not include the Open API.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 404 Not Found Error

The cart token is missing, unknown or expired, the cart has been checked out, or the line or variant named does not exist.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

## Types

### Cart

- `currency` (string, required) — ISO 4217 code. Follows the price book of the cart's country.
- `country_code` (string, required, nullable) — Market the cart was opened for, as a three-letter code.
- `lines` (list of CartLine, required)
- `items_count` (integer, required) — Units in the cart. A measured line, such as 1.5 kg, counts as one.
- `subtotal` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `discount_total` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `tax_total` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `total` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `discounts` (list of CartDiscount, required)
- `promotion_code` (string, required, nullable)
- `promotion_issue` (CartIssue, required, nullable) — Why the promotion code on the cart is not applying.
- `updated_at` (datetime, required)

### CartLine

- `id` (string, required) — Line id. Use it to change the quantity or remove the line.
- `variant_id` (string, required)
- `product_id` (string, required)
- `handle` (string, required) — Product handle.
- `title` (string, required) — Product title.
- `variant_title` (string, required) — Variant title.
- `sku` (string, required) — Stock keeping unit.
- `image` (Image, required, nullable)
- `quantity` (string, required) — Decimal quantity as a string.
- `unit` (string, required) — Unit the quantity is counted in.
- `unit_price` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `compare_at_price` (string, required, nullable)
- `subtotal` (string, required) — Unit price times quantity, before discounts.
- `discount` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `tax` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `total` (string, required) — What the shopper pays for the line.
- `available` (string, required, nullable) — Stock on hand at the fulfilling location. Informational: whether a shortfall blocks the cart depends on the workspace's stock settings.
- `sell_mode` (enum, required) — How this line will ship. `BACKORDER` only when the cart holds more than is in stock. Show the wait before the shopper checks out, because they pay up front.
  - Allowed values: `STOCK`, `BACKORDER`, `PREORDER`, `MADE_TO_ORDER`
- `lead_time_days` (integer, required, nullable) — Days from the order until it ships (`BACKORDER`) or is ready (`MADE_TO_ORDER`). `null` when the merchant has not set one, and for `STOCK` and `PREORDER`.
- `release_date` (date, required, nullable) — Date a pre-order ships from. Set only when `sell_mode` is `PREORDER`.
- `needed_by` (date, required, nullable) — Date the shopper needs a made-to-order line by. Set only for products with a `BUY_NOW` request form.
- `add_on` (string, required, nullable) — Extra per unit for priced options the shopper chose, already included in `unit_price`.
- `answers` (list of CartLineAnswer, required) — The shopper's answers to the product's request form. Empty for other lines.

### CartDiscount

- `title` (string, required) — Promotion name.
- `code` (string, required, nullable)
- `amount` (string, required) — Decimal amount as a string, in the currency shown alongside it.

### CartIssue

Why the promotion code on the cart is not applying.

- `code` (string, required)
- `reason` (string, required) — Machine-readable reason.
- `message` (string, required) — Explanation that can be shown to the shopper.

### Image

- `id` (string, required)
- `src` (string, required) — Absolute image URL.
- `alt` (string, required) — Alternative text. Falls back to the file name.
- `type` (string, required) — Media type.
- `width` (integer, required) — Width in pixels, `0` when unknown.
- `height` (integer, required) — Height in pixels, `0` when unknown.

### CartLineAnswer

- `label` (string, required) — The question.
- `value` (string, required) — The answer, written out for display.

## Examples

**Response**

```json
{
  "status": true,
  "message": "Successfully removed item from cart",
  "data": {
    "currency": "NGN",
    "country_code": "NGA",
    "lines": [
      {
        "id": "string",
        "variant_id": "string",
        "product_id": "string",
        "handle": "silk-scarf",
        "title": "Silk scarf",
        "variant_title": "Blue",
        "sku": "SCARF-BLUE",
        "image": {
          "id": "string",
          "src": "https://cdn.papertracc.com/projects/acme/products/silk-scarf.jpg",
          "alt": "Blue silk scarf",
          "type": "image",
          "width": 1,
          "height": 1
        },
        "quantity": "2",
        "unit": "EACH",
        "unit_price": "25000.00",
        "compare_at_price": "string",
        "subtotal": "50000.00",
        "discount": "0.00",
        "tax": "0.00",
        "total": "50000.00",
        "available": "string",
        "sell_mode": "STOCK",
        "lead_time_days": 14,
        "release_date": "2026-12-12",
        "needed_by": "2026-12-01",
        "add_on": "5000.00",
        "answers": [
          {
            "label": "Fabric",
            "value": "Gold embroidery"
          }
        ]
      }
    ],
    "items_count": 1,
    "subtotal": "50000.00",
    "discount_total": "0.00",
    "tax_total": "0.00",
    "total": "50000.00",
    "discounts": [
      {
        "title": "Launch week",
        "code": "string",
        "amount": "5000.00"
      }
    ],
    "promotion_code": "string",
    "promotion_issue": {
      "code": "string",
      "reason": "string",
      "message": "string"
    },
    "updated_at": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.papertracc.com/v1/store/cart/items/item_id"

headers = {
    "cart-token": "cart-token",
    "channel": "channel",
    "Authorization": "Bearer <apiKey>"
}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.papertracc.com/v1/store/cart/items/item_id';
const options = {
  method: 'DELETE',
  headers: {
    'cart-token': 'cart-token',
    channel: 'channel',
    Authorization: 'Bearer <apiKey>'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/store/cart/items/item_id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("cart-token", "cart-token")
	req.Header.Add("channel", "channel")
	req.Header.Add("Authorization", "Bearer <apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/store/cart/items/item_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["cart-token"] = 'cart-token'
request["channel"] = 'channel'
request["Authorization"] = 'Bearer <apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.papertracc.com/v1/store/cart/items/item_id")
  .header("cart-token", "cart-token")
  .header("channel", "channel")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.papertracc.com/v1/store/cart/items/item_id', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'cart-token' => 'cart-token',
    'channel' => 'channel',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/store/cart/items/item_id");
var request = new RestRequest(Method.DELETE);
request.AddHeader("cart-token", "cart-token");
request.AddHeader("channel", "channel");
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "cart-token": "cart-token",
  "channel": "channel",
  "Authorization": "Bearer <apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/store/cart/items/item_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```