Access to the testing API
Host: https://delivery-office.sandbox.sdg.yandex.ru
OAuth: Link to get token
Before testing, you need to obtain a token. You also need to clarify that the partner has been added to the test environment. The authorization token is valid for one year and is updated when obtaining a new token. For adding a partner and getting a token, please contact your manager.
Successful Scenario
create_claims_body.json - file with request body for creating an order
- Create a claim (order status new)
curl -X POST "https://delivery-office.sandbox.sdg.yandex.ru/claims/create?idempotency_key=12345" -H "Authorization: OAuth $EXT_TOKEN" -H "Content-Type: application/json" -d "$(cat create_claims_body.json)"
- Wait until the robot receives the order and drives to the point (order status accepted -> pickUp)
curl -X POST "https://delivery-office.sandbox.sdg.yandex.ru/claims/info?claim_id=$CLAIM_ID" -H "Authorization: OAuth $EXT_TOKEN"
- Open/Close the hatch to "place the order"
curl -X POST "https://delivery-office.sandbox.sdg.yandex.ru/claims/open_hatch?claim_id=$CLAIM_ID" -H "Authorization: OAuth $EXT_TOKEN"
curl -X POST "https://delivery-office.sandbox.sdg.yandex.ru/claims/close_hatch?claim_id=$CLAIM_ID" -H "Authorization: OAuth $EXT_TOKEN"
- Confirm loading of the order (order status taken -> dropOff)
curl -X POST "https://delivery-office.sandbox.sdg.yandex.ru/claims/confirm_exchange?claim_id=$CLAIM_ID" -H "Authorization: OAuth $EXT_TOKEN"
- Wait until the robot "drives to the point" and transitions to dropOff status
- Open/Close the hatch to "retrieve the order"
curl -X POST "https://delivery-office.sandbox.sdg.yandex.ru/claims/open_hatch?claim_id=$CLAIM_ID" -H "Authorization: OAuth $EXT_TOKEN"
curl -X POST "https://delivery-office.sandbox.sdg.yandex.ru/claims/close_hatch?claim_id=$CLAIM_ID" -H "Authorization: OAuth $EXT_TOKEN"
- Confirm receipt of the order (order status taken -> delivered)
curl -X POST "https://delivery-office.sandbox.sdg.yandex.ru/claims/confirm_exchange?claim_id=$CLAIM_ID" -H "Authorization: OAuth $EXT_TOKEN"
Was the article helpful?
Previous
Next