Deleting expense data as multipart/form-data

Deletes data on adverting expenses uploaded to Yandex Metrica.

Note. Yandex Direct data cannot be deleted.

Data is passed as multipart/form-data in the file parameter in CSV format. You must pass the column names in the first line of the request.

Required columns:

  • Date: String, date in YYYY-MM-DD format or a range of dates in YYYY-MM-DD/YYYY-MM-DD format.

Optional columns:

  • UTMSource: String, utm_source tag value.
  • UTMMedium: String, utm_medium tag value.
  • UTMCampaign: String, utm_campaign tag value.
  • UTMTerm: String, utm_term tag value.
  • UTMContent: String, utm_content tag value.
Note. The values of UTM tags are case-sensitive. Use the same case as in the uploaded data.
  1. Request syntax
  2. In the request body
  3. 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
 ? [comment=<string>]
 & [provider=<string>]
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.
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.

In the request body


 < multipart_file > 

Sample request

POST https://api-metrika.yandex.net/management/v1/counter/{counterId}/expense/delete?

Response format


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