Uploading customer data (JSON)
Uploads customer data. The data is submitted within the POST request body in JSON format.
Sample request body
--data '{
"contacts": [
{
"uniq_id": "J3QQ4-H7H2V-2HCH4-M3HK8-6M8VW",
"name": "John Smith",
"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": "Jane Smith",
"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-metrika.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": [
{}
],
"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. Min items: |
ContactRow
List of customers.
|
Name |
Description |
|
uniq_id* |
Type: string Customer ID. Min length: |
|
attribute_values |
Type: object[] Custom attributes. |
|
birth_date |
Type: string<date> Customer's date of birth. |
|
client_ids |
Type: integer<int64>[] List of the customer's ClientIDs. Min items: Max items: Unique items |
|
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. Min length: Min items: Max items: Unique items |
|
emails_md5 |
Type: string[] List of the customer's email addresses that are MD5 hashed. Min length: Min items: Max items: Unique items |
|
name |
Type: string Customer name. When you send the full name, the string will be truncated to |
|
phones |
Type: string[] List of the customer's phone numbers. Min length: Min items: Max items: Unique items |
|
phones_md5 |
Type: string[] List of the customer's phone numbers that are MD5 hashed. Min length: Min items: Max items: Unique items |
|
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 the customer's Min length: Min items: Max items: Unique items |
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 within 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.