---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.com.tr/dev/metrika/en/management/openapi/schema/uploadSimpleOrders.md
  - https://yandex.com.tr/dev/metrika/ru/management/openapi/schema/uploadSimpleOrders.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/metrika/en/llms.txt

<!-- source: en/management-src/Managing-customer-and-order-data-from-the-CRM/uploadSimpleOrders.md -->
<div class="openapi">

# Uploading simplified data about customers and orders (CSV)

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

Using the simplified method, you can send order and customer data to Yandex Metrica in a CSV file without additional settings ([order status mapping](https://yandex.com.tr/dev/metrika/en/data-import/maporderstatuses-about.md), uploading separate lists of [customers](https://yandex.com.tr/dev/metrika/en/data-import/contacts-data.md) and [orders](https://yandex.com.tr/dev/metrika/en/data-import/orders-data.md), or uploading a [product list](https://yandex.com.tr/dev/metrika/en/management-src/Managing-customer-and-order-data-from-the-CRM/createProducts.md) and [additional attributes](https://yandex.com.tr/dev/metrika/en/management-src/Managing-customer-and-order-data-from-the-CRM/createAttributes.md)). To collect statistics, pass the order creation date and time in the tag's time zone (`create_date_time`) and one of the customer parameters ([ClientID](https://yandex.com/support/metrica/objects/get-client-id.html), phone number, email address, or a hashed phone number or email address). You can transmit orders in different statuses with revenue and cost price data.

The information sent is taken into account in [End-to-end analytics](https://yandex.com.tr/dev/metrika/en/stat/presets/preset_cdp_orders.md) reports. In addition, you can use the data for retargeting and optimizing conversions in Yandex Direct.

[Learn more about the format of transmitted data](https://yandex.com.tr/dev/metrika/en/data-import/simple-orders-data.md)

{% note info %}

The file size limit is 1 GB.

{% endnote %}

{% cut "Examples of an uploaded file" %}

- [Upload data by ClientID](https://download.cdn.yandex.net/from/yandex.ru/support/ru/metrica/files/simple_orders_client_ids.csv). We recommend using this ID type, because it's more accurate in matching the uploaded data with information about site users in Yandex Metrica.
- [Upload data by email addresses](https://download.cdn.yandex.net/from/yandex.ru/support/ru/metrica/files/simple_orders_emails.csv).
- [Upload data by phone numbers](https://download.cdn.yandex.net/from/yandex.ru/support/ru/metrica/files/simple_orders_phones.csv).
- [Upload different IDs in a single file](https://download.cdn.yandex.net/from/yandex.ru/support/ru/metrica/files/simple_orders_full.csv).

{% endcut %}

When sending order data, pass the value that corresponds to the state of the uploaded orders within the `merge_mode` parameter. If you're not sure which status to pass when resending data, specify `SAVE`.

**Sample request**

```http translate=no
POST https://api-metrika.yandex.net/cdp/api/v1/counter/2215573/data/simple_orders?merge_mode=SAVE&delimiter_type=COMMA
Content-Disposition: form-data; name="file"; filename="data.csv"
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,create_date_time,client_uniq_id,client_ids,emails,phones,order_status,revenue,cost,goals,currency
s_ord1,10.01.2024 11:56,s_user1,,"mail@example.com,mail2@example.com",,PAID,200,150,"oplata_cash:200,filial_1",
s_ord2,20.01.2024 11:59,,12345,mail3@example.com,,,200,150,,EUR
,12.02.2024,,34456,,79876543210,SPAM,,,plohoy_lead,
--------------------------7zDUQOAIAE9hEWoV--
```

{% cut "Here's an example of how data is sent" %}

Three orders are sent in this example:

#### Order with the ID s_ord1

- **Order date**: 10.01.2024 11:56
- **Customer ID from the CRM**: `s_user1`
- **Customer emails**: mail@example.com, mail2@example.com
- **ClientID and phone numbers**: Missing
- **Order status**: `PAID` (completes the goals **CRM: Order created** and **CRM: Order paid**)
- **Revenue**: 200
- **Cost**: 150 (goal revenue is set to 50)
- **In addition, the following JavaScript goals are transmitted**:
     - `oplata_cash` with revenue set to 200
     - `filial_1` with no revenue (the goal revenue from the main order columns is used: 200-150=50)
- **Currency**: Not specified (all revenue values are in rubles)

#### Order with the ID s_ord2

- **Order date**: 20.01.2024 11:59
- **Customer ID from the CRM**: Not transmitted
- **Customer email**: mail3@example.com
- **ClientID**: 12345
- **Phone numbers**: Missing
- **Order status**: Not transmitted (transmits `PAID` by default; completes the goals **CRM: Order created** and **CRM: Order paid**)
- **Revenue**: 200
- **Cost**: 150 (goal revenue is set to 50)
- **Additional goals**: None
- **Currency**: EUR (all revenue values are in euros)

#### Order with no ID

- **Order date**: 12.02.2024 (without specifying the hour and minute — Yandex Metrica searches for past sessions to associate with the order starting from 12.02.2024 23:59)
- **Customer ID from the CRM**: Not transmitted
- **Customer email**: mail3@example.com
- **ClientID**: 34456
- **Phone number**: 79876543210
- **Order status**: `SPAM` (doesn't complete any goals)
- **Revenue and cost**: Not specified
- **In addition, the following JavaScript goal is transmitted**:
     - `bad_lead`: Achieved with no revenue
- **Currency**: Not specified

{% 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/simple_orders
```

</div>

</div>

</div>

### Path parameters

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

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

ID of the tag for which you want to upload orders.
{.table-cell}
||
|#{.json-schema-properties}

### Query parameters

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

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

Data saving mode. For any value, pass all [required fields](https://yandex.com.tr/dev/metrika/en/data-import/orders-data.md), even ones that aren't modified.

- `SAVE`: All previously transmitted data is completely replaced with new data. [Details](https://yandex.com.tr/dev/metrika/en/data-import/modes.md).
- `UPDATE`: Only the data that you're currently uploading is updated. [Details](https://yandex.com.tr/dev/metrika/en/data-import/modes.md).
- `APPEND`: New data is added to previously uploaded data. [Details](https://yandex.com.tr/dev/metrika/en/data-import/modes.md).


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

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

Type of column separator used in the file:
- `COMMA`: Comma separator.
- `SEMICOLON`: Semicolon separator.


_Default:_{.json-schema-reset .json-schema-value} `COMMA`

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

<div class="openapi-entity">

### Body

{% cut "multipart/form-data" %}

```json translate=no
{
  "file": "example"
}
```

{% endcut %}

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

_file_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;binary&gt;

The file size limit is 1 GB.

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

</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-21T11:59:21.000Z",
    "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)

Upload information

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

```json translate=no
{
  "uploading_id": "example",
  "datetime": "2020-04-21T11:59:21.000Z",
  "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}

Upload information

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

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

Upload validation status:
- `PASSED`: Validation passed.
- `FAILED`: Validation failed.


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

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

Upload time.

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

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

Number of elements within the upload.
{.table-cell}
||
||

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

Entity type:
- `SYSTEM`: System entity, such as contacts or orders.
- `CUSTOM_LIST`: Custom list.
- `SYSTEM_LIST`: System list, such as products.


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

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

Upload format. Possible values:
- `JSON`
- `CSV`


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

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

Upload ID.

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

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

Upload source. Possible values: `API`

_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-21T11:59:21.000Z",
  "api_validation_status": "example",
  "elements_count": 0,
  "entity_type": "example",
  "uploading_format": "example",
  "uploading_source": "example"
}
```

{% endcut %}

</div>

</div>

</div>
<!-- endsource: en/management-src/Managing-customer-and-order-data-from-the-CRM/uploadSimpleOrders.md -->

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