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

# 商品カタログ内の商品を変更する

> Remove ProductsおよびUpdate Products APIエンドポイントを使用して、Kameleoon商品カタログ内の商品を削除し、在庫状況を更新します。

このガイドでは、Kameleoon商品カタログ内の商品を **削除** し、**在庫状況を更新** する方法について説明します。その他の商品更新については、**[商品カタログのインポートチュートリアル](./import-a-product-catalog-into-kameleoon-using-the-product-recommendation-api)** を参照してください。

以下のエンドポイントを使用します。

* **[Remove Products](../all-endpoints/Import/remove-products)**
* **[Update available Products](../all-endpoints/Import/update-products)**

## 目的

Kameleoon商品カタログ内の商品を削除する、または在庫ありとしてマークします。

## 適切なAPIエンドポイントを呼び出す

### a. 利用可能な商品の更新

このエンドポイントを使用して、現在 **在庫がある** 商品を示します。

<Warning>
  リストに記載されていない商品は在庫切れとしてマークされます。
</Warning>

**エンドポイント:**

```sqlite3 theme={null}
PATCH https://api.products.kameleoon.com/import/products
```

| 名前            | 型      | 必須   | 説明                |
| ------------- | ------ | ---- | ----------------- |
| `shop_id`     | string | True | KameleoonストアID    |
| `shop_secret` | string | True | KameleoonシークレットID |
| `items`       | List   | True | 在庫がある商品IDのリスト。    |

これは **完全な置換** です。在庫のある商品IDのみを含めてください。リストに記載されていない商品はすべて **在庫切れ** とみなされます。

**例:**

```bash theme={null}
curl -X PATCH -L 'https://api.products.kameleoon.com/import/products' \
             -H 'Content-Type: application/json' \
             -d '{
    "shop_id": "eehj3eu84299kg5ghw5a6743r8",
    "shop_secret": "pmd5362597thrgq8k256ep01t0",
    "items": ["1235", "4337", "7578"]
}'
```

### b. 商品の削除

Kameleoonから商品を削除して、推奨結果に表示されないようにします。

**エンドポイント:**

```
DELETE https://api.products.kameleoon.com/import/products
```

| 名前            | 型      | 必須   | 説明                |
| ------------- | ------ | ---- | ----------------- |
| `shop_id`     | string | True | KameleoonストアID    |
| `shop_secret` | string | True | KameleoonシークレットID |
| `items`       | List   | True | 商品IDのリスト          |

<Note>
  削除したい商品のIDのみを送信してください。
</Note>

```bash theme={null}
curl -X DELETE -L 'https://api.products.kameleoon.com/import/products' \
             -H 'Content-Type: application/json' \
             -d '{
"shop_id": "eehj3eu84299kg5ghw5a6743r8",
"shop_secret": "pmd5362597thrgq8k256ep01t0",
"items": ["1635", "3743", "7578", "432"]
}'
```
