Uploading customer data (JSON)
Uploads customer data. The data is transmitted in the POST request body in JSON format.
Sample request body
--data '{
"contacts": [
{
"uniq_id": "J3QQ4-H7H2V-2HCH4-M3HK8-6M8VW",
"name": "Doe J.",
"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": "Smith M.",
"create_date_time": "2020-05-17 16:13:21",
"update_date_time": "2020-05-17 16:14:21",
"client_ids": [
"11223344556"
]
}
]
}'
Request
POST
https://api-metrica.yandex.net/cdp/api/v1/counter/{counterId}/data/contacts/json
Path parameters
Name |
Description |
counterId* |
Type: integer<int32> ID of the counter that you want to upload contact data for. |
Query parameters
Name |
Description |
merge_mode* |
Type: string Data saving mode. For any value, pass all required fields, even ones that aren't modified. |
Body
application/json
{
"contacts": [
{
"attribute_values": [
[
"string"
]
],
"uniq_id": "string",
"name": "string",
"birth_date": "string",
"create_date_time": "2022-12-29T18:02:01Z",
"update_date_time": "2022-12-29T18:02:01Z",
"client_ids": [
0
],
"user_ids": [
"string"
],
"emails": [
"string"
],
"phones": [
"string"
],
"emails_md5": [
"string"
],
"phones_md5": [
"string"
]
}
]
}
Name |
Description |
contacts* |
Type: ContactRow[] List of customers. |
ContactRow
List of customers.
Name |
Description |
uniq_id* |
Type: string Customer ID. |
attribute_values |
Type: string[][] Custom attributes. |
birth_date |
Type: string<date> Customer's date of birth. |
client_ids |
Type: integer<int64>[] List of ClientIDs for the customer. |
create_date_time |
Type: string<date-time> Date and time of contact creation in the counter's time zone. Details. |
emails |
Type: string[] List of the customer's email addresses. |
emails_md5 |
Type: string[] List of the customer's email addresses that are MD5 hashed. |
name |
Type: string Customer name. If you're passing the full name, the string is shortened to |
phones |
Type: string[] List of the customer's phone numbers. |
phones_md5 |
Type: string[] List of the customer's phone numbers that are MD5 hashed. |
update_date_time |
Type: string<date-time> Date and time of contact update in the counter's time zone. Details. |
user_ids |
Type: string[] List of |
Responses
200 OK
OK
Body
application/json
{
"uploading": {
"uploading_id": "string",
"datetime": "2022-12-29T18:02:01Z",
"api_validation_status": "string",
"elements_count": 0,
"entity_type": "string",
"uploading_format": "string",
"uploading_source": "string"
}
}
Name |
Description |
uploading |
Type: UploadingMetaExternal Description of the |
UploadingMetaExternal
Description of the UploadingMetaExternal
object.
Name |
Description |
api_validation_status |
Type: string Upload validation status:
|
datetime |
Type: string<date-time> Upload time. |
elements_count |
Type: integer<int32> Number of elements in the upload. |
entity_type |
Type: string Entity type:
|
uploading_format |
Type: string Upload format. Possible values:
|
uploading_id |
Type: string Upload ID. |
uploading_source |
Type: string Upload source. Possible values: |
No longer supported, please use an alternative and newer version.