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

# Remove products from an existing product list

> Delete one or more product IDs from an existing list. IDs not found in the list are returned in ignored_product_ids rather than causing an error.

Use `DELETE /v1/products/lists/{list_id}/products` to remove specific products from an existing list. Pass an array of product IDs to remove in the request body. The response confirms which IDs were removed and which were skipped because they were not found in the list.

<Note>
  If you submit product IDs that are not in the list, the API does not return an error. Those IDs appear in `ignored_product_ids` in the response. Only IDs that were present in the list are removed and appear in `removed_product_ids`.
</Note>

## Request

**Endpoint:** `DELETE /v1/products/lists/{list_id}/products`

### Headers

<ParamField header="Authorization" type="string" required>
  Your API key as a Bearer token: `Bearer {your_api_key}`.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`.
</ParamField>

### Path parameters

<ParamField path="list_id" type="string" required>
  The unique identifier of the list to remove products from.
</ParamField>

### Body parameters

<ParamField body="product_ids" type="string[]" required>
  An array of product ID strings to remove from the list.

  ```json theme={null}
  {
    "product_ids": [
      "1234567890123456789",
      "9876543210987654321"
    ]
  }
  ```
</ParamField>

## Example request

```bash cURL theme={null}
curl --request DELETE \
  --url 'https://api.affiliate.com/v1/products/lists/{list_id}/products' \
  --header 'Authorization: Bearer {your_api_key}' \
  --header 'Content-Type: application/json' \
  --data '{
    "product_ids": [
      "1234567890123456789",
      "9876543210987654321"
    ]
  }'
```

## Response

A `200 OK` response confirms which product IDs were removed and which were not found in the list.

```json theme={null}
{
  "list_id": "d345e67f-89g0-1h2i-3j45-6k7891lm2345",
  "removed_product_ids": [
    "1234567890123456789"
  ],
  "ignored_product_ids": [
    "9876543210987654321"
  ],
  "meta": {
    "trace_id": "e1f2g3h4-5i6j-7k8l-9m10-n1o2p3q4r5s6"
  }
}
```

### Response fields

<ResponseField name="list_id" type="string">
  The ID of the list that was modified.
</ResponseField>

<ResponseField name="removed_product_ids" type="string[]">
  Product IDs that were successfully removed from the list.
</ResponseField>

<ResponseField name="ignored_product_ids" type="string[]">
  Product IDs that were not removed because they were not found in the list. No error is thrown for these IDs.
</ResponseField>

<ResponseField name="meta" type="object">
  <Expandable title="meta properties">
    <ResponseField name="meta.trace_id" type="string">
      Unique request identifier. Include this when contacting support.
    </ResponseField>
  </Expandable>
</ResponseField>
