> 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/customer-data/syncing-customer-data-via-api-1.md).

# API経由での顧客データ同期

## 顧客データの送信先: Epsilon Retail Media

顧客データを送信するには、 Epsilon Retail Media以下のコマンドに類似したものを使用します。なお、 `customers` フィールド内のデータはダミーデータであり、ここでは例としてのみ提供されていることに注意してください。

{% hint style="info" %}
すべての `customer` オブジェクトフィールドはオプションです。フィールド値を指定せずに `customer` オブジェクトをプッシュした場合、新しい `id` が作成されるため、指定しないでください `id` を作成する場合、 `customer` オブジェクト。

内内のすべての値 `targetingData` フィールドのすべての値は任意であり、リテールメディア企業ごとに設定可能です。詳細についてはリファレンスページをご覧ください。
{% endhint %}

```http
POST $BASE_URL/v1/customers HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "customers": [
        {
            "id": "i4358f9b-bbb9-49fb-93fe-3ad481ce564",
            "targetingData": {
            "customer_type": "Corporate"
            }
        }
    ]
}
```

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

```json
{
    "customers": [
        {
            "targetingData": {
                "customer_type": "Corporate"
            },
            "gender": "Other",
            "teamId": "9be784a8-22fc-4315-a335-b7d2c2494f0a",
            "postcode": "",
            "suburb": "",
            "id": "i4358f9b-bbb9-49fb-93fe-3ad481ce564",
            "yearOfBirth": 0
        }
    ]
}
```

## 複数の顧客の同期

複数の顧客を同期する場合、各リクエストで最大100個のアイテムをバッチとして送信できます。実行できるリクエストの回数に制限はありません。

送信された顧客のペイロード順序は返される結果の順序と同じであるため、インテグレーターがバックエンドで維持している顧客表現とのデータの整合性を保つことができます。

```http
POST $BASE_URL/v1/customers HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "customers": [
        {
            "id": "i4358f9b-bbb9-49fb-93fe-3ad481ce564",
            "targetingData": {
            "customer_type": "Corporate"
            }
        },
        {
            "id": "c7792468-07ea-4cc3-9b1a-975bb43dfa02",
            "targetingData": {
            "customer_type": "Retail"
            }
        }
    ]
}
```

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

```json
{
    "customers": [
        {
            "targetingData": {
                "customer_type": "Corporate"
            },
            "gender": "Other",
            "teamId": "9be784a8-22fc-4315-a335-b7d2c2494f0a",
            "postcode": "",
            "suburb": "",
            "id": "i4358f9b-bbb9-49fb-93fe-3ad481ce564",
            "yearOfBirth": 0
        },
        {
            "targetingData": {
                "customer_type": "Retail"
            },
            "gender": "Other",
            "teamId": "9be784a8-22fc-4315-a335-b7d2c2494f0a",
            "postcode": "",
            "suburb": "",
            "id": "c7792468-07ea-4cc3-9b1a-975bb43dfa02",
            "yearOfBirth": 0
        }
    ]
}
```

{% hint style="warning" %}
`gender`,`postcode`,`suburb`,`yearOfBirth` フィールド

これらのフィールドは現在使用されておらず、過去の統合のためにのみ残されていますのでご注意ください。
{% endhint %}

### 一括顧客データの取り込み

統合の際、APIは一度に100個のバッチを受け入れるため、顧客データの最初のバッチを取り込み用ファイルとして送信することをお勧めします。


---

# 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/customer-data/syncing-customer-data-via-api-1.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.
