---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://yandex.com/dev/metrika/en/management/openapi/schema/uploadContactJson_1.md
  - https://yandex.com/dev/metrika/ru/management/openapi/schema/uploadContactJson_1.md
  - href: ru/management/openapi/schema/uploadContactJson_1.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/metrika/ru/llms.txt

<!-- source: ru/management-src/Upravlenie-dannymi-o-klientah-i-zakazah-iz-CRM/uploadContactJson.md -->
<div class="openapi">

# Загрузка данных о клиентах (JSON)

<!-- markdownlint-disable-file -->

Выполняет загрузку данных о клиентах. Данные передаются как JSON в теле POST-запроса.

{% cut "Пример тела запроса" %}

```json translate=no
--data '{
        "contacts": [
            {
                "uniq_id": "J3QQ4-H7H2V-2HCH4-M3HK8-6M8VW",
                "name": "Иванов И.",
                "create_date_time": "2020-04-17 16:12:21",
                "update_date_time": "2020-04-17 16:12:21",
                "client_ids": [
                    "12345678910",
                    "10987654321"
                ],
                "emails": [
                    "exampl1@example.com",
                    "example2@example.com"
                ],
                "phones": [
                    "78005553535",
                    "73449932378"
                ]
            },
            {
                "uniq_id": "ZYX4-H7H2V-2HCH4-M3HK8-6M8VW",
                "name": "Петрова М.",
                "create_date_time": "2020-05-17 16:13:21",
                "update_date_time": "2020-05-17 16:14:21",
                "client_ids": [
                    "11223344556"
                ]
            }
        ]
    }'
```

{% endcut %}


## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api-metrika.yandex.net/cdp/api/v1/counter/{counterId}/data/contacts/json
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_counterId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор счетчика, для которого вы хотите загрузить контакты.
{.table-cell}
||
|#{.json-schema-properties}

### Query parameters

#|
|| **Name** | **Description** ||
||

_merge_mode_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Режим сохранения данных. При любом из значений передавайте все [обязательные поля](https://yandex.com/dev/metrika/ru/data-import/contacts-data.md) — даже те, которые не меняются.

- `SAVE` — вся ранее переданная информация полностью заменяется новой. [Подробно](https://yandex.com/dev/metrika/ru/data-import/modes.md).
- `UPDATE` – обновляется только та информация, которую вы загружаете в данный момент. [Подробно](https://yandex.com/dev/metrika/ru/data-import/modes.md).
- `APPEND` — новая информация добавляется к ранее загруженной. [Подробно](https://yandex.com/dev/metrika/ru/data-import/modes.md).


_Example:_{.json-schema-reset .json-schema-example} `SAVE`
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "contacts": [
    {
      "attribute_values": {},
      "uniq_id": "example",
      "name": "example",
      "birth_date": "2025-01-01",
      "create_date_time": "2025-01-01T00:00:00Z",
      "update_date_time": "2025-01-01T00:00:00Z",
      "client_ids": [
        1234567890
      ],
      "emails": [
        "user@example.com"
      ],
      "phones": [
        "example"
      ],
      "emails_md5": [
        "example"
      ],
      "phones_md5": [
        "example"
      ],
      "user_comment": "example"
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_contacts_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [ContactRow](#entity-ContactRow)[]

_Min items:_{.json-schema-reset .json-schema-assertion} `1`

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "attribute_values": {},
    "uniq_id": "example",
    "name": "example",
    "birth_date": "2025-01-01",
    "create_date_time": "2025-01-01T00:00:00Z",
    "update_date_time": "2025-01-01T00:00:00Z",
    "client_ids": [
      1234567890
    ],
    "emails": [
      "user@example.com"
    ],
    "phones": [
      "example"
    ],
    "emails_md5": [
      "example"
    ],
    "phones_md5": [
      "example"
    ],
    "user_comment": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### ContactRow {#entity-ContactRow}

Список клиентов.

#|
|| **Name** | **Description** ||
||

_uniq_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Идентификатор клиента.

_Min length:_{.json-schema-reset .json-schema-assertion} `1`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_attribute_values_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: object

Пользовательские атрибуты.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
||

_birth_date_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date&gt;

Дата рождения клиента.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01`
{.table-cell}
||
||

_client_ids_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer[]

_Min items:_{.json-schema-reset .json-schema-assertion} `0`

_Max items:_{.json-schema-reset .json-schema-assertion} `500`

_Unique items:_{.json-schema-reset .json-schema-assertion} `true`

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  1234567890
]
```

{% endcut %}
{.table-cell}
||
||

_create_date_time_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата и время создания контакта в часовом поясе счетчика. [Подробно](https://yandex.com/dev/metrika/ru/data-import/date.md#orders).

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_emails_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;email&gt;[]

_Min items:_{.json-schema-reset .json-schema-assertion} `0`

_Max items:_{.json-schema-reset .json-schema-assertion} `50`

_Unique items:_{.json-schema-reset .json-schema-assertion} `true`

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "user@example.com"
]
```

{% endcut %}
{.table-cell}
||
||

_emails_md5_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

_Min items:_{.json-schema-reset .json-schema-assertion} `0`

_Max items:_{.json-schema-reset .json-schema-assertion} `50`

_Unique items:_{.json-schema-reset .json-schema-assertion} `true`

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_name_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Название клиента. Если вы передаете фамилию, имя и отчество, строка будет сокращена до вида `Иванов И.`.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_phones_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

_Min items:_{.json-schema-reset .json-schema-assertion} `0`

_Max items:_{.json-schema-reset .json-schema-assertion} `50`

_Unique items:_{.json-schema-reset .json-schema-assertion} `true`

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_phones_md5_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

_Min items:_{.json-schema-reset .json-schema-assertion} `0`

_Max items:_{.json-schema-reset .json-schema-assertion} `50`

_Unique items:_{.json-schema-reset .json-schema-assertion} `true`

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_update_date_time_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата и время обновления контакта в часовом поясе счетчика. [Подробно](https://yandex.com/dev/metrika/ru/data-import/date.md#orders).

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_user_comment_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Комментарий к клиенту.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `1000`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "attribute_values": {},
  "uniq_id": "example",
  "name": "example",
  "birth_date": "2025-01-01",
  "create_date_time": "2025-01-01T00:00:00Z",
  "update_date_time": "2025-01-01T00:00:00Z",
  "client_ids": [
    1234567890
  ],
  "emails": [
    "user@example.com"
  ],
  "phones": [
    "example"
  ],
  "emails_md5": [
    "example"
  ],
  "phones_md5": [
    "example"
  ],
  "user_comment": "example"
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "uploading": {
    "uploading_id": "example",
    "datetime": "2020-04-21 11:59:21",
    "api_validation_status": "example",
    "elements_count": 0,
    "entity_type": "example",
    "uploading_format": "example",
    "uploading_source": "example"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_uploading_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [UploadingMetaExternal](#entity-UploadingMetaExternal)

Информация о загрузке

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "uploading_id": "example",
  "datetime": "2020-04-21 11:59:21",
  "api_validation_status": "example",
  "elements_count": 0,
  "entity_type": "example",
  "uploading_format": "example",
  "uploading_source": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### UploadingMetaExternal {#entity-UploadingMetaExternal}

Информация о загрузке

#|
|| **Name** | **Description** ||
||

_api_validation_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Статус валидации загрузки:
- `PASSED` — валидация прошла успешно.
- `FAILED` — валидация прошла не успешно.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_datetime_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Время загрузки.

_Example:_{.json-schema-reset .json-schema-example} `2020-04-21 11:59:21`
{.table-cell}
||
||

_elements_count_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Количество элементов в загрузке.
{.table-cell}
||
||

_entity_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Тип сущности:
- `SYSTEM` — системная сущность, например, контакты или заказы.
- `CUSTOM_LIST` — пользовательский список.
- `SYSTEM_LIST` — системный список, например товары.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_uploading_format_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Формат загрузки. Возможные значения:
- `JSON`.
- `CSV`.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_uploading_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Идентификатор загрузки.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_uploading_source_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Источник загрузки. Возможные значения:
- API — прямая загрузка через API;
- CRM — Битрикс24;
- CONVERSION_CENTER — центр конверсий Директа;
- ALBATO — интеграция с АМО;
- UI — управление заказами.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "uploading_id": "example",
  "datetime": "2020-04-21 11:59:21",
  "api_validation_status": "example",
  "elements_count": 0,
  "entity_type": "example",
  "uploading_format": "example",
  "uploading_source": "example"
}
```

{% endcut %}

</div>

</div>

</div>
<!-- endsource: ru/management-src/Upravlenie-dannymi-o-klientah-i-zakazah-iz-CRM/uploadContactJson.md -->


[*Deprecated]: No longer supported, please use an alternative and newer version.