> For the complete documentation index, see [llms.txt](https://help.citrusad.com/retail-media-interface/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.citrusad.com/retail-media-interface/integration/ja/data-api/catalog-products-2/syncing-products-via-api.md).

# API経由での商品同期

## 標準的な商品同期

カタログが作成されると、商品をカタログに同期できます。以下の例は、商品を同期するための標準的なコンテキストの概要を示しています。

```http
POST $BASE_URL/v1/catalog-products?teamId=<YOUR_TEAM_ID> HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "catalogProducts": [
        {
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "gtin": "23556578965543",
            "inventory": 50,
            "price": "19.99",
            "tags": [
                 "imageurl:https://your.image.host.com/image.jpg","name:Covergirl Clean 120 Creamy Natural Liquid Foundation30mL"
            ],
            "filters": [
                 "category:Health&Beauty","category:Grocery","brand:Covergirl","Special_Flag:0"
            ]
        }
    ]
}
```

成功した場合、次のオブジェクトが返されます。

```json
{
    "catalogProducts": [
        {
            "teamId": "e8158f9b-bbb9-49fb-93fe-3ad481ca8450",
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "gtin": "23556578965543",
            "inventory": 50,
            "price": 19.99,
            "tags": [
                 "imageurl:https://your.image.host.com/image.jpg",
                 "name:Covergirl Clean 120 Creamy Natural Liquid Foundation30mL"
            ],
            "filters": [
                 "category:Health&Beauty",
              	 "category:Grocery",
              	 "brand:Covergirl",
              	 "Special_Flag:0"
            ],
            "groups": [],
            "profit": null
        }
    ]
}
```

このコンテキストでは、groupsとprofitの空の値またはnull値は無視できます。

## 店舗位置情報の同期

商品が在庫として存在するさまざまな店舗位置のフィルターを同期することもできます。これは、商品情報の店舗/位置レベルでの最適化に役立ちます。

```http
POST $BASE_URL/v1/catalog-products?teamId=<YOUR_TEAM_ID> HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "catalogProducts": [
        {
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "gtin": "23556578965543",
            "inventory": 50,
            "price": "19.99",
            "tags": [
                 "imageurl:https://your.image.host.com/image.jpg","name:Covergirl Clean 120 Creamy Natural Liquid Foundation30mL"
            ],
            "filters": [
                 "category:Health&Beauty","category:Grocery","brand:Covergirl","Special_Flag:0","location:123","location:ABC"
            ]
        }
    ]
}
```

成功した場合、次のオブジェクトが返されます。

```json
{
    "catalogProducts": [
        {
            "teamId": "e8158f9b-bbb9-49fb-93fe-3ad481ca8450",
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "gtin": "23556578965543",
            "inventory": 50,
            "price": 19.99,
            "tags": [
                 "imageurl:https://your.image.host.com/image.jpg",
                 "name:Covergirl Clean 120 Creamy Natural Liquid Foundation30mL"
            ],
            "filters": [
                 "category:Health&Beauty",
              	 "category:Grocery",
              	 "brand:Covergirl",
              	 "Special_Flag:0",
              	 "location:123",
              	 "location:ABC"
            ],
            "groups": [],
            "profit": null
        }
    ]
}
```

## HFSS情報の同期

商品同期では、 `hfss:true` or `hfss:false`のフィルターを送信する必要があります。これにより、 Epsilon Retail Media がインターフェースを適切な状態にフィルタリングできるようになります。

```json
POST $BASE_URL/v1/catalog-products?teamId=<YOUR_TEAM_ID> HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "catalogProducts": [
        {
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "gtin": "23556578965543",
            "inventory": 50,
            "price": "19.99",
            "tags": [
                 "imageurl:https://your.image.host.com/image.jpg","name:Covergirl Clean 120 Creamy Natural Liquid Foundation30mL"
            ],
            "filters": [
                 "hfss:true","category:Health&Beauty","category:Grocery","brand:Covergirl","Special_Flag:0","location:123","location:ABC"
            ]
        }
    ]
}
```

{% hint style="info" %}
HFSSについてさらに詳しく知る必要がありますか？

英国政府の公開情報をこちらでご確認ください：<https://www.gov.uk/government/publications/restricting-promotions-of-products-high-in-fat-sugar-or-salt-by-location-and-by-volume-price/restricting-promotions-of-products-high-in-fat-sugar-or-salt-by-location-and-by-volume-price-implementation-guidance>
{% endhint %}

## 複数商品の同期

複数の商品を同期する場合、1リクエストあたり最大100件までシーケンス処理できます。

2つの商品を同期するためのコンテキスト例を以下に示します。

```http
POST $BASE_URL/v1/catalog-products?teamId=<YOUR_TEAM_ID> HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "catalogProducts": [
        {
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "gtin": "23556578965543",
            "inventory": 50,
            "price": "19.99",
            "tags": [
                 "imageurl:https://your.image.host.com/image.jpg",
                 "name:Covergirl Clean 120 Creamy Natural Liquid Foundation30mL"
            ],
            "filters": [
                 "category:Health&Beauty",
              	 "category:Grocery",
              	 "brand:Covergirl",
              	 "Special_Flag:0"
            ],
            "profit": "1.50"
        },
        {
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "gtin": "23556578965738",
            "inventory": 26,
            "price": "8.50",
            "tags": [
                "imageurl:https://your.image.host.com/image.jpg",
                "name:Kelloggs Froot Loops Breakfast Cereal 500g"
            ],
            "filters": [
                "brand:Kelloggs",
                "category:Pantry",
                "category:BreakfastFoods",
                "category:Cereals",
                "Special_Flag:0"
            ],
            "profit": "0.50"
        }
    ]
}
```

成功した場合、次のオブジェクトが返されます。

```json
{
    "catalogProducts": [
        {
            "gtin": "23556578965543",
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "price": 19.99,
            "teamId": "e8158f9b-bbb9-49fb-93fe-3ad481ca8450",
            "groups": [],
            "tags": [
                 "imageurl:https://your.image.host.com/image.jpg",
                 "name:Covergirl Clean 120 Creamy Natural Liquid Foundation30mL"
            ],
            "filters": [
                 "category:Health&Beauty",
              	 "category:Grocery",
              	 "brand:Covergirl",
              	 "Special_Flag:0"
            ],
            "inventory": 50,
            "profit": 1.50,
            "tags": [
                "Natural",
                "Lasting",
                "Dry Skin",
                "Beige"
            ]
        },
        {
            "gtin": "23556578965736688",
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "price": 8.50,
            "teamId": "e8158f9b-bbb9-49fb-93fe-3ad481ca8450",
            "groups": [],
            "tags": [
                "imageurl:https://your.image.host.com/image.jpg",
                "name:Kelloggs Froot Loops Breakfast Cereal 500g"
            ],
            "filters": [
                "brand:Kelloggs",
                "category:Pantry",
                "category:BreakfastFoods",
                "category:Cereals",
                "Special_Flag:0"
            ],
            "inventory": 26,
            "profit": 0.50,
            "tags": [
                "Pantry",
                "BreakfastFoods",
                "Cereals",
                "Kelloggs"
            ]
        }
    ]
}
```

## 商品在庫の更新

商品の在庫を更新するには、商品を Epsilon Retail Mediaで再同期する必要があります。同期の際、商品の在庫フラグを `0`に設定します。例を以下に示します。

```http
POST $BASE_URL/v1/catalog-products?teamId=<YOUR_TEAM_ID> HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "catalogProducts": [
        {
            "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
            "gtin": "23556578965543",
            "inventory": 0,
            "price": "19.99",
            "tags": [
                 "imageurl:https://your.image.host.com/image.jpg","name:Covergirl Clean 120 Creamy Natural Liquid Foundation30mL"
            ],
            "filters": [
                 "category:Health&Beauty","category:Grocery","brand:Covergirl","Special_Flag:0"
            ]
        }
    ]
}
```

<br>

## 商品画像の更新

Epsilon は、一貫したパフォーマンスを確保し、お客様の画像サーバーへのリクエストを削減するために画像URLをキャッシュします。 URLを変更せずに画像を更新する場合は、 Epsilonで明示的に更新をトリガーする必要があります。これを行うには：

* 商品から既存の image\_url を削除します。
* 更新が完了したら、同じ image\_url を再送信します。

あるいは、画像サーバーがサポートしている場合は、既存のURLにクエリ文字列（バージョンやタイムスタンプなど）を追加して強制的に更新することもできます。これにより、 Epsilon 画像を再読み込みするため。

{% hint style="info" %}
画像は UI でのみ使用されます

商品画像は広告レスポンスでは配信されません。画像の更新は、商品の表示方法にのみ影響します Epsilon キャッシュの更新が行われている間の UI。
{% endhint %}

## 商品の取得

カタログに商品を追加した後は、後からその商品の最新情報を取得したくなる場合があります。

これを行うには、**`v1/catalog-products/catalogId/<PRODUCT_CODE>`** という URL 形式で **GET** HTTP リクエストを送信します。このエンドポイントは、1 回のリクエストにつき 1 つの商品コードを受け取ることができます。プレースホルダーのリクエストの概要は以下のとおりです。

```http
GET $BASE_URL/v1/catalog-products/<CATALOG_ID>/<PRODUCT_CODE> HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
```

該当の商品コードについて、 Epsilon Retail Media システムに取り込まれている現在の情報が送信されるはずです。以下に例を示します

{% hint style="info" %}
商品更新の反映は、 Epsilon Retail Media システム内で即座に行われるわけではありません。が商品更新を完全に理解するまでに短時間かかる場合があります。 Epsilon Retail Media 詳細を取得した際に商品の情報が即座に更新されていなくても、心配する必要はありません。
{% endhint %}

## 商品の削除

カタログから商品を削除するには、商品が不要になった際に以下の形式で DELETE HTTP リクエストを送信します。

### リクエストパラメーター

このエンドポイントは、1 回のリクエストにつき 1 つの商品コード（通常は GTIN ID）を受け取ります。

```http
DELETE $BASE_URL/v1/catalog-products/<CATALOG_ID>/<PRODUCT_CODE> HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
```

### セラー ID を持つ商品の削除

商品にセラー ID が含まれている場合は、商品を削除する際にクエリパラメーターとして指定します。

```http
DELETE $BASE_URL/v1/catalog-products/<CATALOG_ID>/<PRODUCT_CODE>?sellerId=abc123> HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
```

### 処理時間

商品の削除処理には、30 分から 1 時間程度かかる場合があります。

{% hint style="info" %}
重要

商品が在庫切れの場合は、商品を削除するのではなく、在庫数を 0 に設定してください。商品を削除すると、商品が再入荷した場合であっても、広告主が Epsilon Retail Media プラットフォーム上でその商品を選択できなくなります。
{% endhint %}

### エラー処理

「商品が見つかりません」というエラーが発生した場合、その商品がまだ Epsilon Retail Media システムに取り込まれていない可能性があります。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.citrusad.com/retail-media-interface/integration/ja/data-api/catalog-products-2/syncing-products-via-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
