> For the complete documentation index, see [llms.txt](https://docs.whisk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.whisk.com/api/shopping-lists/delete-an-item-from-a-shopping-list.md).

# Delete an Item from a Shopping List

## Delete Item

<mark style="color:red;">`DELETE`</mark> `https://api.whisk.com/list/v2/{list_id}/item/{item_id}`

You can use the following path parameters to delete an item from a shopping list:

#### Path Parameters

| Name     | Type   | Description                                                             |
| -------- | ------ | ----------------------------------------------------------------------- |
| list\_id | string | The unique identifier of the list that contains the item to be deleted. |
| item\_id | string | The unique identifier of the item to be deleted.                        |

#### Headers

| Name           | Type   | Description                                                                                                                    |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Authentication | string | User Access token containing `shopping_list:write` scope to authorize the API usage. For more information, see Authentication. |

```graphql
{
  "list": {
    "id": "string",
    "name": "string",
    "primary": true
  },
  "content": {
    "items": [
      {
        "id": "string",
        "item": {
          "name": "string",
          "brand": "string",
          "comment": "string",
          "quantity": 0,
          "unit": "string"
        },
        "checked": true,
        "image_url": "string",
        "analysis": {
          "product": {
            "canonical_name": "string",
            "original_name": "string"
          },
          "category": {
            "canonical_name": "string"
          },
          "brand": {
            "canonical_name": "string"
          }
        },
        "recipe": {
          "recipe_id": "string",
          "position": 0
        },
        "combined": {
          "combined_item_id": "string",
          "quantity": 0
        },
        "created_time": "string",
        "updated_at": "string",
        "matching_properties": {
          "gtin": "string",
          "custom_product_id": "string"
        }
      }
    ],
    "combined_items": [
      {
        "id": "string",
        "item": {
          "name": "string",
          "brand": "string",
          "comment": "string",
          "quantity": 0,
          "unit": "string"
        },
        "checked": true,
        "image_url": "string",
        "analysis": {
          "product": {
            "canonical_name": "string",
            "original_name": "string"
          },
          "category": {
            "canonical_name": "string"
          },
          "brand": {
            "canonical_name": "string"
          }
        },
        "created_time": "string",
        "updated_at": "string"
      }
    ],
    "recipes": [
      {
        "id": "string",
        "name": "string",
        "images": [
          {
            "responsive": {
              "url": "string",
              "width": 0,
              "height": 0,
              "selection": {
                "x": 0,
                "y": 0,
                "width": 0,
                "height": 0
              }
            },
            "url": "string"
          }
        ],
        "source": {
          "name": "string",
          "display_name": "string",
          "source_recipe_url": "string",
          "image": {
            "responsive": {
              "url": "string",
              "width": 0,
              "height": 0,
              "selection": {
                "x": 0,
                "y": 0,
                "width": 0,
                "height": 0
              }
            },
            "url": "string"
          },
          "license": "LICENCE_INVALID"
        }
      }
    ]
  }
}
```

```yaml
{
  "error_code": "REAL_CODES_ARE_IN_ENDPOINT_DESCRIPTION",
  "message": "Additional details about error are not static and can be changed"
}
```

{% tab title="401 This failed response appears due to API authentication failure. The possible error codes that may appear are: auth.tokenNotFound , auth.tokenExpired, auth.tokenInvalid, auth.tokenRequired." %}

```yaml
{
  "code": "auth.tokenNotFound"
}
```

```yaml
This is unexpected response, something is wrong on our side, please contact: help@whisk.com
```

### Sample Request and Response

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

```bash
curl -X DELETE "https://api.whisk.com/list/v2/106c5fa85ddbba343099347c57e54632500/item/23c0bff5-c910-4b06-97d9-4137f8c6a657"
    -H "Accept: application/json" 
    -H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"
```

{% hint style="info" %}
Whisk allows you to discover and understand its API capabilities on the Swagger interface with the ability to try out the API calls directly in your browser. You can call this endpoint [here](https://api.whisk.com/spec/#/ShoppingListAPI/ShoppingListAPI_RemoveItem).
{% endhint %}
{% endtab %}

{% tab title="Response" %}

```graphql
{
  "list": {
    "id": "106c5fa85ddbba343099347c57e54632500",
    "name": "My New Shopping List"
  },
  "content": {
    "items": [
       {
        "id": "867a0cf5-f0a6-4db9-bcff-8c21cba1ae80",
        "item": {
          "name": "strawberry ice cream",
          "brand": "magnum",
          "comment": "frozen",
          "quantity": 10,
          "unit": "scoop"
        },
        "image_url": "https://image-cdn.whisk.com/image/upload/v1579874533/custom_upload/05b8a428286fb4177ae5d82a4d00bc03.jpg",
        "analysis": {
          "product": {
            "canonical_name": "STRAWBERRY ICE CREAM"
          },
          "category": {
            "canonical_name": "FROZEN"
          },
          "brand": {
            "canonical_name": "MAGNUM"
          }
        },
        "created_time": "1614715353",
        "updated_at": "1614715353",
        "matching_properties": {
          "gtin": "00000034411207"
        }
      },
      {
        "id": "e324f720-2bba-4372-8f4b-d129d072281c",
        "item": {
          "name": "onion",
          "comment": "chopped",
          "quantity": 2
        },
        "image_url": "https://image-cdn.whisk.com/image/upload/v1550764494/graph/fooddb/d5bd477463b289845a984f7792ed6d70.jpg",
        "analysis": {
          "product": {
            "canonical_name": "ONION"
          },
          "category": {
            "canonical_name": "FRUITS AND VEGETABLES"
          }
        },
        "recipe": {
          "recipe_id": "1011f5a116db3c3e56e57bea0a52ffbfca5fc96f6b1",
          "position": 1
        },
        "created_time": "1614715353",
        "updated_at": "1614715353",
        "matching_properties": {}
      },
      {
        "id": "f55ebf96-7902-4ae4-ba26-b6a217e5abd5",
        "item": {
          "name": "garlic cloves",
          "quantity": 2
        },
        "image_url": "https://image-cdn.whisk.com/image/upload/v1550764463/graph/fooddb/fb90ea8fbd3e81005fc22ada2c8ddd1f.jpg",
        "analysis": {
          "product": {
            "canonical_name": "GARLIC CLOVE"
          },
          "category": {
            "canonical_name": "FRUITS AND VEGETABLES"
          }
        },
        "created_time": "1614715353",
        "updated_at": "1614715353",
        "matching_properties": {
          "gtin": "00000075259567",
          "custom_product_id": "6037bd956f0187c6c0f56241"
        }
      }
    ],
    "recipes": [
      {
        "id": "1011f5a116db3c3e56e57bea0a52ffbfca5fc96f6b1",
        "name": "Bacon Cheeseburger Casserole",
        "images": [
          {
            "responsive": {
              "url": "https://image-cdn.whisk.com/image/upload/v1536910467/recipe/94f698dfcafefe3223aa66f1b3b21ae7.jpg",
              "width": 428,
              "height": 640
            },
            "url": "https://assets.kraftfoods.com/recipe_images/opendeploy/126725_MXM_K59919V0_OR1_CR_640x428.jpg"
          }
        ],
        "source": {
          "name": "myfoodandfamily.com",
          "display_name": "My Food and Family",
          "source_recipe_url": "https://www.myfoodandfamily.com/recipe/126725/bacon-cheeseburger-casserole",
          "image": {
            "responsive": {
              "url": "https://image-cdn.whisk.com/image/upload/v1565965713/publishers/logos/myfoodandfamily-logo.png",
              "width": 256,
              "height": 256
            },
            "url": "https://image-cdn.whisk.com/image/upload/v1565965713/publishers/logos/myfoodandfamily-logo.png"
          },
          "license": "LICENCE_FAIRUSE"
        }
      }
    ]
  }
}
```

{% hint style="info" %}
A successful response returns the shopping list definition with the remaining list of items. To understand the data structure of a shopping list definition, see [Shopping List Object](/api/shopping-lists.md#shopping-list-object).
{% endhint %}
{% endtab %}
{% endtabs %}
