Paulo Plonke
Paulo Plonke

Reputation: 9

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'}

Upvotes: 0

Views: 182

Answers (1)

Alexander Graebe
Alexander Graebe

Reputation: 797

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

Upvotes: 1

Related Questions