Search code examples
uber-api

Code "not_found" with message "No trip with id ..."


I get requset_id = XXX with "GET /history" request. When sending "GET /requests/XXX" request I returns a valid response with all information about requset, but if it's 'PUT /sandbox/requests/XXX' UBER server return {'code':'not_found', 'message':'No trip with id XXX'}


Solution

  • You are looking at a real request with your GET command. However, the Sandbox for PUT /sandbox/requests/{request_id} just allows you to modify sandbox requests only. You have to create a new request with the same body but send it to a different base URL: https://sandbox-api.uber.com, like so:

    curl  -X POST -H "Authorization: Bearer <ACCESS_TOKEN>" \
         -H "Content-Type: application/json" -d \
         '{"product_id": "", "start_latitude":"", "start_longitude": "", "end_latitude":"", "end_longitude": "", "seat_count": "", "fare_id":""}' \
          https://sandbox-api.uber.com/v1.2/requests