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

# Sincronizzazione dei dati dei clienti tramite API

## Invio dei dati dei clienti a Epsilon Retail Media

Per inviare i dati dei clienti a Epsilon Retail Media, usa un comando simile a quello seguente. Nota che i dati nel campo `customers` campo sono dati fittizi e vengono forniti qui solo a titolo esemplificativo.

{% hint style="info" %}
Tutti i `customer` campi dell'oggetto sono opzionali. Se invii un `customer` oggetto senza alcun valore nei campi, verrà creato un nuovo `id` verrà creato, quindi non specificare un `id` se stai creando `customer` oggetti.

Tutti i valori nel campo `targetingData` campo sono arbitrari e configurabili dal retailer. Visita la pagina di riferimento per maggiori informazioni.
{% 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"
            }
        }
    ]
}
```

In caso di successo, verrà restituito il seguente oggetto:

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

## Sincronizzazione di più clienti

Se stai sincronizzando più clienti, puoi inviare fino a 100 elementi in un batch per ogni richiesta. Il numero di richieste che puoi effettuare è illimitato.

L'ordine del payload dei clienti inviato è lo stesso dell'ordine del risultato restituito, rendendo possibile per i dati rimanere congruenti con la rappresentazione del cliente che l'integratore mantiene nel proprio backend.

```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"
            }
        }
    ]
}
```

In caso di successo, verrà restituito il seguente oggetto:

```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` campi

Tieni presente che questi campi non sono più utilizzati e rimangono solo per le integrazioni storiche.
{% endhint %}

### Ingestione di dati dei clienti in blocco

Durante l'integrazione, ti consigliamo di inviare il tuo primo batch di dati dei clienti sotto forma di file per l'ingestione, poiché l'API accetta batch di 100 alla volta.


---

# 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/it/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.
