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

# Sincronizando dados do cliente via API

## Enviando dados do cliente para Epsilon Retail Media

Para enviar dados do cliente para Epsilon Retail Media, use um comando semelhante ao abaixo. Observe que os dados no campo `customers` são dados fictícios e são fornecidos aqui apenas como exemplo.

{% hint style="info" %}
Todos os `customer` campos do objeto são opcionais. Se você enviar um `customer` objeto sem valores nos campos, um novo `id` será criado; portanto, não especifique um `id` se você estiver criando `customer` objetos.

Todos os valores no campo `targetingData` são arbitrários e configuráveis pelo varejista. Visite a página de referência para obter mais informações.
{% 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"
            }
        }
    ]
}
```

Se for bem-sucedido, o seguinte objeto será retornado:

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

## Sincronizando vários clientes

Se estiver sincronizando vários clientes, você poderá enviar até 100 itens como um lote em cada solicitação. O número de solicitações que você pode fazer é ilimitado.

A ordem da carga útil do cliente enviada é a mesma ordem do resultado retornado, tornando possível que os dados permaneçam congruentes com a representação do cliente que o integrador mantém em seu 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"
            }
        }
    ]
}
```

Se for bem-sucedido, o seguinte objeto será retornado:

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

Observe que esses campos não são mais usados e permanecem apenas para integrações históricas.
{% endhint %}

### Ingerindo dados de clientes em lote

Ao integrar, recomendamos que você envie seu primeiro lote de dados de clientes como um arquivo para ingestão, pois a API aceita lotes de 100 por vez.


---

# 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/pt-br/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.
