---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/support/delivery-profile/en/api/express/openapi/IntegrationV2ClaimsCancel.md
  - https://yandex.com/support/delivery-profile/ru/api/express/openapi/IntegrationV2ClaimsCancel.md
  - href: en/api/express/openapi/IntegrationV2ClaimsCancel.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/delivery-profile/en/llms.txt

<div class="openapi">

# Cancel the claim

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

The method cancels the confirmed claim. You can cancel the claim using this method before the item is handed over to the courier. After that, you can cancel the order only by contacting the support service.
<br>
Claim cancellation can be paid or free. Free cancellation is available before the courier arrives at the departure point and paid cancellation is available before the courier starts moving to the pick-up point. To determine the type of cancellation, use the operation for getting information about the claim [claims/cancel-info](https://yandex.com/support/delivery-profile/en/api/express/openapi/IntegrationV2ClaimsCancelInfo.md) (field ''cancel_state'').
<br>
In the case of free cancellation, the claim status changes to cancelled. In case of paid cancellation, its status changes to cancelled_with_payment.


## 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
b2b.taxi.yandex.net/b2b/cargo/integration/v2/claims/cancel
```

</div>

Service URL

</div>

</div>

### Query parameters

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

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

Claim ID received at the claim creation stage

_Min length:_{.json-schema-reset .json-schema-assertion} `32`

_Max length:_{.json-schema-reset .json-schema-assertion} `64`

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

### Headers

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

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

Preferred response language. Examples: "en" — English

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

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "version": 1,
  "cancel_state": "free"
}
```

{% endcut %}

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

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

Cancellation status (paid or free)

_Enum:_{.json-schema-reset .json-schema-value} `free`, `paid`
{.table-cell}
||
||

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

Canceled claim version (int64)
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### CancelState {#entity-CancelState}

Cancellation status (paid or free)

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `free`, `paid`

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

Claim canceled

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "id": "741cedf82cd464fa6fa16d87155c636",
  "status": "new",
  "version": 1,
  "user_request_revision": "example",
  "skip_client_notify": true
}
```

{% endcut %}

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

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

Claim ID obtained at the claim creation stage

_Min length:_{.json-schema-reset .json-schema-assertion} `32`

_Max length:_{.json-schema-reset .json-schema-assertion} `64`

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

_skip_client_notify_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

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

Claim status. To learn more, see [Status model](https://yandex.com/support/delivery-profile/en/api/express/claim-process.md)

_Enum:_{.json-schema-reset .json-schema-value} `new`, `estimating`, `estimating_failed`, `ready_for_approval`, `accepted`, `performer_lookup`, `performer_draft`, `performer_found`, `performer_not_found`, `pickup_arrived`, `ready_for_pickup_confirmation`, `pickuped`, `delivery_arrived`, `ready_for_delivery_confirmation`, `delivered`, `delivered_finish`, `returning`, `return_arrived`, `ready_for_return_confirmation`, `returned`, `returned_finish`, `failed`, `cancelled`, `cancelled_with_payment`, `cancelled_by_taxi`, `cancelled_with_items_on_hands`
{.table-cell}
||
||

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

The current version of changes in the claim entered by the user

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

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

Claim version from the request (int64)
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### ClaimId {#entity-ClaimId}

Claim ID obtained at the claim creation stage

**Type**: string

_Min length:_{.json-schema-reset .json-schema-assertion} `32`

_Max length:_{.json-schema-reset .json-schema-assertion} `64`

_Example:_{.json-schema-reset .json-schema-example} `741cedf82cd464fa6fa16d87155c636`

</div>

<div class="openapi-entity">

### ClaimStatus {#entity-ClaimStatus}

Claim status. To learn more, see [Status model](https://yandex.com/support/delivery-profile/en/api/express/claim-process.md)

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `new`, `estimating`, `estimating_failed`, `ready_for_approval`, `accepted`, `performer_lookup`, `performer_draft`, `performer_found`, `performer_not_found`, `pickup_arrived`, `ready_for_pickup_confirmation`, `pickuped`, `delivery_arrived`, `ready_for_delivery_confirmation`, `delivered`, `delivered_finish`, `returning`, `return_arrived`, `ready_for_return_confirmation`, `returned`, `returned_finish`, `failed`, `cancelled`, `cancelled_with_payment`, `cancelled_by_taxi`, `cancelled_with_items_on_hands`

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Bad request

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "bad_request",
  "message": "Incorrect request body"
}
```

{% endcut %}

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

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

Error code

_Const:_{.json-schema-reset .json-schema-value} `bad_request`

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

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

Error description

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

</div>

</div>

<div class="openapi__response__code__404">

## 404 Not Found

Claim not found

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "not_found",
  "message": "Claim not found"
}
```

{% endcut %}

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

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

Error code

_Const:_{.json-schema-reset .json-schema-value} `not_found`

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

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

Error description

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

</div>

</div>

<div class="openapi__response__code__409">

## 409 Conflict

Attempting to cancel the invalid claim version

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "inappropriate_status",
  "message": "Invalid action regarding the claim"
}
```

{% endcut %}

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

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

Error code

_Enum:_{.json-schema-reset .json-schema-value} `inappropriate_status`, `free_cancel_is_unavailable`, `state_mismatch`
{.table-cell}
||
||

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

Error description

_Example:_{.json-schema-reset .json-schema-example} `Invalid action regarding the claim`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

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