Upload customer data (CSV)
Uploads customer data.
The data is transmitted as multipart/form-data in CSV format. In the first line of the request, pass the names of the columns. Learn more about the format of transmitted data.
Note
File size limit: 1 GB.
Sample request
POST https://api-metrica.yandex.net/cdp/api/v1/counter/2215573/data/contacts/csv?
merge_mode=SAVE&
columns_mapping=
"uniq_id":"ID",
"name":"Name",
"emails":"Email",
"age":"Age"&
delimiter_type=COMMA
Content-Type: multipart/form-data; boundary=------------------------7zDUQOAIAE9hEWoV
Context-Length: TBD
--------------------------7zDUQOAIAE9hEWoV
Content-Disposition: form-data; name="file"; filename="data.csv"
Content-Type: text/csv
ID,Name,Email,Age
11,John J.,example@example.com,40
42,Michael L.,somebody@example.com,24
--------------------------7zDUQOAIAE9hEWoV--
Request
POST
https://api-metrika.yandex.net/cdp/api/v1/counter/{counterId}/data/contacts/csv
Path parameters
|
Name |
Description |
|
counterId |
Type: integer ID of the counter that you want to upload customer data for. |
Query parameters
|
Name |
Description |
|
columns_mapping |
Type: string Correspondence between column names and attribute names. Pattern: Example: |
|
merge_mode |
Type: string Data saving mode. For any value, pass all required fields, even ones that aren't modified.
Example: |
|
delimiter_type |
Type: string Type of column separator used in the file:
Default: Example: `` |
Body
multipart/form-data
{
"file": "example"
}
|
Name |
Description |
|
file |
Type: string<binary> File size limit: 1 GB. Example: |
Responses
200 OK
OK
Body
application/json
{
"uploading": {
"uploading_id": "example",
"datetime": "2025-01-01T00:00:00Z",
"api_validation_status": "example",
"elements_count": 0,
"entity_type": "example",
"entity_subtype": "example",
"uploading_format": "example",
"uploading_source": "example",
"api_validation_errors": [
"example"
],
"uploading_title": "example"
}
}
|
Name |
Description |
|
uploading |
Type: UploadingMetaExternal Upload information Example
|
UploadingMetaExternal
Upload information
|
Name |
Description |
|
api_validation_status |
Type: string Upload validation status:
Example: |
|
datetime |
Type: string<date-time> Upload time. Example: |
|
elements_count |
Type: integer Number of elements within the upload. |
|
entity_type |
Type: string Entity type:
Example: |
|
uploading_format |
Type: string Upload format. Possible values:
Example: |
|
uploading_id |
Type: string Upload ID. Example: |
|
uploading_source |
Type: string Upload source. Possible values: Example: |
Example
{
"uploading_id": "example",
"datetime": "2025-01-01T00:00:00Z",
"api_validation_status": "example",
"elements_count": 0,
"entity_type": "example",
"uploading_format": "example",
"uploading_source": "example"
}
No longer supported, please use an alternative and newer version.