Upload costs in a CSV file
Uploads costs.
Data is passed in the request body in CSV format. The first line of the request must pass the column names.
Required columns:
- Date — String, the data in YYYY-MM-DD format or a range of dates in YYYY-MM-DD/YYYY-MM-DD format.
- UTMSource — String, the utm_source tag.
- Expenses — Numbers, the cost amount, using a dot (.) as the decimal separator.
Optional columns:
- UTMMedium — String, the utm_medium tag.
- UTMCampaign — String, the utm_campaign tag.
- UTMTerm — String, the utm_term tag.
- UTMContent — String, the utm_content tag.
- Currency — String, the currency using the three-letter code from the ISO 4217 standard.
- Clicks — Number, the number of clicks.
Request syntax
counterId
— ID of the tag that you want to upload costs for.
https://api-metrica.yandex.net/management/v1/counter/{counterId}/expense/upload
? [comment=<string>]
& [provider=<string>]
comment | Comments. |
provider | A service that transmits data to Yandex.Metrica (provider). If not specified, the 'default' value is used. |
comment | Comments. |
provider | A service that transmits data to Yandex.Metrica (provider). If not specified, the 'default' value is used. |
Request example
POST https://api-metrica.yandex.net/management/v1/counter/{counterId}/expense/upload?
Response format
{
"uploading" : < _expense_uploading >
}
Parameters | Description |
---|---|
uploading | Information about cost uploads. |
Parameters | Description |
---|---|
uploading | Information about cost uploads. |