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.


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 (field ''cancel_state'').


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

POST

b2b.taxi.yandex.net/b2b/cargo/integration/v2/claims/cancel

Service URL

Query parameters

Name

Description

claim_id

Type: string

Claim ID received at the claim creation stage

Min length: 32

Max length: 64

Example: ``

Headers

Name

Description

Accept-Language

Type: string

Preferred response language. Examples: "en" — English

Example: en

Body

application/json
{
  "version": 1,
  "cancel_state": "free"
}

Name

Description

cancel_state

Type: CancelState

Cancellation status (paid or free)

Enum: free, paid

version

Type: integer

Canceled claim version (int64)

CancelState

Cancellation status (paid or free)

Type: string

Enum: free, paid

Responses

200 OK

Claim canceled

Body

application/json
{
  "id": "741cedf82cd464fa6fa16d87155c636",
  "status": "new",
  "version": 1,
  "user_request_revision": "example",
  "skip_client_notify": true
}

Name

Description

id

Type: ClaimId

Claim ID obtained at the claim creation stage

Min length: 32

Max length: 64

Example: 741cedf82cd464fa6fa16d87155c636

skip_client_notify

Type: boolean

status

Type: ClaimStatus

Claim status. To learn more, see Status model

Enum: 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

Type: string

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

Example: example

version

Type: integer

Claim version from the request (int64)

ClaimId

Claim ID obtained at the claim creation stage

Type: string

Min length: 32

Max length: 64

Example: 741cedf82cd464fa6fa16d87155c636

ClaimStatus

Claim status. To learn more, see Status model

Type: string

Enum: 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

400 Bad Request

Bad request

Body

application/json
{
  "code": "bad_request",
  "message": "Incorrect request body"
}

Name

Description

code

Type: string

Error code

Const: bad_request

Example: bad_request

message

Type: string

Error description

Example: Incorrect request body

404 Not Found

Claim not found

Body

application/json
{
  "code": "not_found",
  "message": "Claim not found"
}

Name

Description

code

Type: string

Error code

Const: not_found

Example: not_found

message

Type: string

Error description

Example: Claim not found

409 Conflict

Attempting to cancel the invalid claim version

Body

application/json
{
  "code": "inappropriate_status",
  "message": "Invalid action regarding the claim"
}

Name

Description

code

Type: string

Error code

Enum: inappropriate_status, free_cancel_is_unavailable, state_mismatch

message

Type: string

Error description

Example: Invalid action regarding the claim

No longer supported, please use an alternative and newer version.