Deleting expense data using a request

Deletes data on adverting expenses uploaded to Yandex Metrica. Use this method to pass data to be removed right in the request.

Note. Yandex Direct data cannot be deleted.
Note. The values of UTM tags are case-sensitive. Use the same case as in the uploaded data.
  1. Request syntax
  2. Response format

Request syntax

counterId: ID of the tag for which you want to delete data.

https://api-metrika.yandex.net/management/v1/counter/{counterId}/expense/delete_single
 ? date=<string>
 & [comment=<string>]
 & [provider=<string>]
 & [UTMCampaign=<string>]
 & [UTMContent=<string>]
 & [UTMMedium=<string>]
 & [UTMSource=<string>]
 & [UTMTerm=<string>]
date *Date in YYYY-MM-DD format or a date range in YYYY-MM-DD/YYYY-MM-DD format.
commentComment.
providerName of the data provider that could have been passed when uploading expenses via the API. If the parameter value is not specified, data for all providers will be removed according to the conditions given in the uploaded file.
UTMCampaignString, utm_campaign tag value.
UTMContentString, utm_content tag value.
UTMMediumString, utm_medium tag value.
UTMSourceString, utm_source tag value.
UTMTermString, utm_term tag value.
date *Date in YYYY-MM-DD format or a date range in YYYY-MM-DD/YYYY-MM-DD format.
commentComment.
providerName of the data provider that could have been passed when uploading expenses via the API. If the parameter value is not specified, data for all providers will be removed according to the conditions given in the uploaded file.
UTMCampaignString, utm_campaign tag value.
UTMContentString, utm_content tag value.
UTMMediumString, utm_medium tag value.
UTMSourceString, utm_source tag value.
UTMTermString, utm_term tag value.

* Required

Sample request

POST https://api-metrika.yandex.net/management/v1/counter/{counterId}/expense/delete_single?date=no example

Response format


{
    "uploading" :  < _expense_uploading > 
}
Parameters Description
uploading Information about expense uploads.
Parameters Description
uploading Information about expense uploads.