3.2. Confirm claim
Confirms the claim upon successful evaluation. After confirmation, the claim takes the accepted status, and the service starts searching for a performer.
The pricing.offer offer has a limited validity period (10 minutes). If the offer is no longer valid, then if you try to confirm the order, it takes the 'failed' status.
HTTP Request
POST b2b.taxi.yandex.net/b2b/cargo/integration/v2/claims/accept\
?claim_id={string}
Query Parameters
claim_id * | string Claim ID, received upon creation of claim |
claim_id * | string Claim ID, received upon creation of claim |
* Required parameter
Header Parameters
Accept-Language * | string Preferred language of response. Examples: "ru" — Russian, "en" — English |
Accept-Language * | string Preferred language of response. Examples: "ru" — Russian, "en" — English |
* Required parameter
Request Body
{ "version": integer }
Copied to clipboard
Representation
Fields
version * | integer Claim version. Changes after the claim is modified (int64) |
version * | integer Claim version. Changes after the claim is modified (int64) |
* Required parameter
Responses
Code 200
Claim approved
{ "id": string, "skip_client_notify": boolean, "status": string, "user_request_revision": string, "version": integer }
Copied to clipboard
Representation
Fields
id * | string Claim ID, received upon creation of claim |
skip_client_notify * | boolean |
status * | string Claim status Allowed values
|
user_request_revision * | string Current version of changes in the user's claim |
version * | integer Claim version from the request (int64) |
id * | string Claim ID, received upon creation of claim |
skip_client_notify * | boolean |
status * | string Claim status Allowed values
|
user_request_revision * | string Current version of changes in the user's claim |
version * | integer Claim version from the request (int64) |
* Required parameter
Code 404
Claim not found
{ "code": string, "message": string }
Copied to clipboard
Representation
Fields
code * | string String error code Allowed values
|
message * | string Human-readable error message |
* Required parameter
Code 409
Attempt to confirm a claim that did not was not estimated
{ "code": string, "message": string }
Copied to clipboard
Representation
Fields
code * | string String error code Allowed values
|
message * | string Human-readable error message |
* Required parameter
Code 429
Too many requests
{ "code": string, "message": string }
Copied to clipboard
Representation
Fields
code * | string String error code Allowed values
|
message * | string Human-readable error message |
* Required parameter
Example
Request:
curl -X POST "b2b.taxi.yandex.net/b2b/cargo/integration/v2/claims/accept?claim_id={string}" \ -H "Accept-Language: {string}" \ -d '{ "version": 1 }'
Copied to clipboard
Responses:
{ "id": "741cedf82cd464fa6fa16d87155c636", "status": "new", "version": 1 }
Copied to clipboard
{ "code": "not_found", "message": "Claim not found" }
Copied to clipboard
{ "code": "inappropriate_status", "message": "Invalid action on the claim" }
Copied to clipboard
{ "code": "too_many_requests", "message": "Too many requests" }
Copied to clipboard