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: Max length: |
Headers
Name |
Description |
Accept-Language* |
Type: string Preferred response language. Examples: "en" — English |
Body
application/json
{
"version": 1,
"cancel_state": "free"
}
Name |
Description |
cancel_state* |
Type: CancelState Cancellation status (paid or free) Example: Enum: |
version* |
Type: integer<int64> Canceled claim version (int64) Example: |
CancelState
Cancellation status (paid or free)
Type |
Description |
Example: Enum: |
Responses
200 OK
Claim canceled
Body
application/json
{
"id": "741cedf82cd464fa6fa16d87155c636",
"status": "new",
"version": 1,
"user_request_revision": "string",
"skip_client_notify": false
}
Name |
Description |
id* |
Type: string Claim ID obtained at the claim creation stage Example: Min length: Max length: |
skip_client_notify* |
Type: boolean |
status* |
Type: ClaimStatus Claim status. To learn more, see Status model Example: Enum: |
user_request_revision* |
Type: string The current version of changes in the claim entered by the user |
version* |
Type: integer<int64> Claim version from the request (int64) Example: |
ClaimStatus
Claim status. To learn more, see Status model
Type |
Description |
Example: Enum: |
400 Bad Request
Bad request
Body
application/json
{
"code": "bad_request",
"message": "Incorrect request body"
}
Name |
Description |
code* |
Type: string Error code Example: Enum: |
message* |
Type: string Error description Example: |
404 Not Found
Claim not found
Body
application/json
{
"code": "not_found",
"message": "Claim not found"
}
Name |
Description |
code* |
Type: string Error code Example: Enum: |
message* |
Type: string Error description Example: |
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 Example: Enum: |
message* |
Type: string Error description Example: |