---
metadata:
  - name: generator
    content: Diplodoc Platform v5.15.5
alternate:
  - https://delivery.yango.com/docs/en/api/express/openapi/IntegrationV2ClaimsCancel.md
---
> **Documentation Index:** Fetch the complete configuration index at https://delivery.yango.com/docs/en/llms.txt

<div class="openapi">

# Cancel the claim

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://delivery.yango.com/docs/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.delivery.yango.tech/b2b/cargo/integration/v2/claims/cancel
```



</div>

Service URL

</div>

</div>

### Query parameters

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

||
 claim_id<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

Claim ID received at the claim creation stage<br>

*Min length:*{.openapi-description-annotation} `32`

*Max length:*{.openapi-description-annotation} `64`
 
|||#{.openapi-table}

### Headers

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

||
 Accept-Language<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

Preferred response language. Examples: "en" — English<br>Example: `en` 
|||#{.openapi-table}

<div class="openapi-entity">

### Body

{% cut "application/json" %}


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


{% endcut %}


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

||
 cancel_state<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** [CancelState](#cancelstate)

Cancellation status (paid or free)

*Example:*{.openapi-description-annotation} `free`

*Enum:*{.openapi-description-annotation} `free`, `paid`
 
||

||
 version<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** integer&lt;int64&gt;

Canceled claim version (int64)

*Example:*{.openapi-description-annotation} `1`
 
|||#{.openapi-table}

</div>

<div class="openapi-entity">

### CancelState

Cancellation status (paid or free)

#|||
 **Type** 
|
 **Description** 
||

||
 [CancelState](#cancelstate) 
|
 

*Example:*{.openapi-description-annotation} `free`

*Enum:*{.openapi-description-annotation} `free`, `paid`
 
|||#{.openapi-table}

</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": "string",
    "skip_client_notify": false
}
```


{% endcut %}


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

||
 id<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

Claim ID obtained at the claim creation stage

*Example:*{.openapi-description-annotation} `741cedf82cd464fa6fa16d87155c636`

*Min length:*{.openapi-description-annotation} `32`

*Max length:*{.openapi-description-annotation} `64`
 
||

||
 skip_client_notify<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** boolean 
||

||
 status<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** [ClaimStatus](#claimstatus)

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

*Example:*{.openapi-description-annotation} `new`

*Enum:*{.openapi-description-annotation} `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`
 
||

||
 user_request_revision<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

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

||
 version<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** integer&lt;int64&gt;

Claim version from the request (int64)

*Example:*{.openapi-description-annotation} `1`
 
|||#{.openapi-table}

</div>

<div class="openapi-entity">

### ClaimStatus

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

#|||
 **Type** 
|
 **Description** 
||

||
 [ClaimStatus](#claimstatus) 
|
 

*Example:*{.openapi-description-annotation} `new`

*Enum:*{.openapi-description-annotation} `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`
 
|||#{.openapi-table}

</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<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

Error code

*Example:*{.openapi-description-annotation} `bad_request`

*Enum:*{.openapi-description-annotation} `bad_request`
 
||

||
 message<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

Error description

*Example:*{.openapi-description-annotation} `Incorrect request body`
 
|||#{.openapi-table}

</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<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

Error code

*Example:*{.openapi-description-annotation} `not_found`

*Enum:*{.openapi-description-annotation} `not_found`
 
||

||
 message<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

Error description

*Example:*{.openapi-description-annotation} `Claim not found`
 
|||#{.openapi-table}

</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<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

Error code

*Example:*{.openapi-description-annotation} `inappropriate_status`

*Enum:*{.openapi-description-annotation} `inappropriate_status`, `free_cancel_is_unavailable`, `state_mismatch`
 
||

||
 message<span class="openapi__required">*</span> {.openapi-table-parameter-name} 
|
 **Type:** string

Error description

*Example:*{.openapi-description-annotation} `Invalid action regarding the claim`
 
|||#{.openapi-table}

</div>

</div>
<!-- markdownlint-disable-file -->

</div>



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