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

<!-- source: en/management-src/Managing-ad-spending-uploads/uploadRemoveSingleLine.md -->
<div class="openapi">

# Deleting expense data using a request

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

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 info %}

You can't delete the Yandex Direct data.

{% endnote %}

{% note info %}

The values of UTM tags are case-sensitive. Make sure the case is exactly the same as in the uploaded data.

{% endnote %}


## 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/management/v1/counter/{counterId}/expense/delete_single
```

</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 delete data.
{.table-cell}
||
|#{.json-schema-properties}

### Query parameters

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

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

Date in YYYY-MM-DD format or a date range in YYYY-MM-DD/YYYY-MM-DD format.

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

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

Comment.

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

_provider_{.json-schema-reset .json-schema-property}
{.table-cell}|
**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:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
||

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

First-level traffic source. Acceptable values are given in the [table](https://yandex.com.tr/dev/metrika/en/management/table-source.md).

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

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

Second-level traffic source. Acceptable values are given in the [table](https://yandex.com.tr/dev/metrika/en/management/table-source.md).

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

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

String, `utm_campaign` label value.

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

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

String, `utm_content` label value.

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

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

String, `utm_medium` label value.

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

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

String, `utm_source` label value.

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

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

String, `utm_term` label value.

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

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "uploading": {
    "id": 0,
    "create_time": "2025-01-01T00:00:00Z",
    "source_quantity": 0,
    "provider": "example",
    "comment": "example",
    "type": "example",
    "status": "example"
  }
}
```

{% endcut %}

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

_uploading_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [ExpenseUploading](#entity-ExpenseUploading)

Information about expense uploads.

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

```json translate=no
{
  "id": 0,
  "create_time": "2025-01-01T00:00:00Z",
  "source_quantity": 0,
  "provider": "example",
  "comment": "example",
  "type": "example",
  "status": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### ExpenseUploading {#entity-ExpenseUploading}

Information about expense uploads.

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

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

Comment.

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

_create_time_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Upload time.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

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

Upload ID.
{.table-cell}
||
||

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

Data provider name.

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

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

Number of rows in the source file.
{.table-cell}
||
||

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

Upload status:
- `UPLOADED`: Upload complete.
- `IN_PROGRESS`: Upload in progress.
- `PROCESSED`: Upload processed.


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

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

Upload type:
- `EXPENSES`: Expenses.
- `REMOVES`: Deleting expenses.


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

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

```json translate=no
{
  "id": 0,
  "create_time": "2025-01-01T00:00:00Z",
  "source_quantity": 0,
  "provider": "example",
  "comment": "example",
  "type": "example",
  "status": "example"
}
```

{% endcut %}

</div>

</div>

</div>
<!-- endsource: en/management-src/Managing-ad-spending-uploads/uploadRemoveSingleLine.md -->

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