Deleting expense data using a request
Deletes data on expenses uploaded to Yandex Metrica. With this method, you can directly include the data that you want to delete in your request.
Note
You can't delete the Yandex Direct data.
Note
The values of UTM tags are case-sensitive. Make sure the case is exactly the same as in the uploaded data.
Request
POST
https://api-metrika.yandex.net/management/v1/counter/{counterId}/expense/delete_single
Path parameters
|
Name |
Description |
|
counterId |
Type: integer ID of the counter for which you want to delete data. |
Query parameters
|
Name |
Description |
|
date |
Type: string Date in YYYY-MM-DD format or a date range in YYYY-MM-DD/YYYY-MM-DD format. Example: `` |
|
comment |
Type: string Comment. Example: `` |
|
provider |
Type: string The data provider's name that could have been sent during the API upload of expenses. When the parameter value isn't specified, data for all providers will be deleted based on the conditions in the uploaded file. Example: `` |
|
trafficSource |
Type: string First-level traffic source. Acceptable values are given in the table. Example: `` |
|
trafficSourceDetail |
Type: string Second-level traffic source. Acceptable values are given in the table. Example: `` |
|
UTMCampaign |
Type: string String, Example: `` |
|
UTMContent |
Type: string String, Example: `` |
|
UTMMedium |
Type: string String, Example: `` |
|
UTMSource |
Type: string String, Example: `` |
|
UTMTerm |
Type: string String, Example: `` |
Responses
200 OK
OK
Body
application/json
{
"uploading": {
"id": 0,
"create_time": "2025-01-01T00:00:00Z",
"source_quantity": 0,
"provider": "example",
"comment": "example",
"type": "example",
"status": "example"
}
}
|
Name |
Description |
|
uploading |
Type: ExpenseUploading Information about expense uploads. Example
|
ExpenseUploading
Information about expense uploads.
|
Name |
Description |
|
comment |
Type: string Comment. Example: |
|
create_time |
Type: string<date-time> Upload time. Example: |
|
id |
Type: integer Upload ID. |
|
provider |
Type: string Data provider name. Example: |
|
source_quantity |
Type: integer Number of rows in the source file. |
|
status |
Type: string Upload status:
Example: |
|
type |
Type: string Upload type:
Example: |
Example
{
"id": 0,
"create_time": "2025-01-01T00:00:00Z",
"source_quantity": 0,
"provider": "example",
"comment": "example",
"type": "example",
"status": "example"
}
No longer supported, please use an alternative and newer version.