3.2. Confirm claim

  1. HTTP Request
  2. Query Parameters
  3. Header Parameters
  4. Request Body
    1. Representation
    2. Fields
  5. Responses
    1. Code 200
      1. Representation
      2. Fields
    2. Code 404
      1. Representation
      2. Fields
    3. Code 409
      1. Representation
      2. Fields
    4. Code 429
      1. Representation
      2. Fields
  6. Example

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

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

Request Body

{
  "version": integer
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

version *

integer

Claim version. Changes after the claim is modified (int64)

version *

integer

Claim version. Changes after the claim is modified (int64)

Responses

Code 200

Claim approved

{
  "id": string,
  "skip_client_notify": boolean,
  "status": string,
  "user_request_revision": string,
  "version": integer
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

id *

string

Claim ID, received upon creation of claim

skip_client_notify *

boolean

status *

string

Claim status

Allowed values
  1. new
  2. estimating
  3. estimating_failed
  4. ready_for_approval
  5. accepted
  6. performer_lookup
  7. performer_draft
  8. performer_found
  9. performer_not_found
  10. pickup_arrived
  11. ready_for_pickup_confirmation
  12. pickuped
  13. delivery_arrived
  14. ready_for_delivery_confirmation
  15. pay_waiting
  16. delivered
  17. delivered_finish
  18. returning
  19. return_arrived
  20. ready_for_return_confirmation
  21. returned
  22. returned_finish
  23. failed
  24. cancelled
  25. cancelled_with_payment
  26. cancelled_by_taxi
  27. cancelled_with_items_on_hands

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
  1. new
  2. estimating
  3. estimating_failed
  4. ready_for_approval
  5. accepted
  6. performer_lookup
  7. performer_draft
  8. performer_found
  9. performer_not_found
  10. pickup_arrived
  11. ready_for_pickup_confirmation
  12. pickuped
  13. delivery_arrived
  14. ready_for_delivery_confirmation
  15. pay_waiting
  16. delivered
  17. delivered_finish
  18. returning
  19. return_arrived
  20. ready_for_return_confirmation
  21. returned
  22. returned_finish
  23. failed
  24. cancelled
  25. cancelled_with_payment
  26. cancelled_by_taxi
  27. cancelled_with_items_on_hands

user_request_revision *

string

Current version of changes in the user's claim

version *

integer

Claim version from the request (int64)

Code 404

Claim not found

{
  "code": string,
  "message": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

code *

string

String error code

Allowed values
  1. not_found

message *

string

Human-readable error message

code *

string

String error code

Allowed values
  1. not_found

message *

string

Human-readable error message

Code 409

Attempt to confirm a claim that did not was not estimated

{
  "code": string,
  "message": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

code *

string

String error code

Allowed values
  1. inappropriate_status
  2. old_version
  3. offer_expired

message *

string

Human-readable error message

code *

string

String error code

Allowed values
  1. inappropriate_status
  2. old_version
  3. offer_expired

message *

string

Human-readable error message

Code 429

Too many requests

{
  "code": string,
  "message": string
}
Copied to clipboard

Representation

Collapse all
Expand all

Fields

code *

string

String error code

Allowed values
  1. too_many_requests

message *

string

Human-readable error message

code *

string

String error code

Allowed values
  1. too_many_requests

message *

string

Human-readable error message

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