fabiokz
fabiokz

Reputation: 31

Uber API map endpoint

I'm trying to to get a response from this sandbox endpoint

sandbox-api.uber.com/v1/requests/resource_id/map

instead of getting something like this

{ "request_id":"b5512127-a134-4bf4-b1ba-fe9f48f56d9d", "href":"https://sandbox-api.uber.com/v1/sandbox/map" }

why am I getting this response?

{ "message": null, "code": "conflict" }

With the same Bearer token and resource_id I'm getting the right response to this endpoint sandbox-api.uber.com/v1/requests/resource_id/map

Thank you!

Upvotes: 0

Views: 399

Answers (1)

Dustin Whittle
Dustin Whittle

Reputation: 1252

It looks like the receipt_id is being used instead of the request_id.

The 409 error can happen for a few different reasons: no_drivers_available, missing_payment_method, surge, fare_expired, retry_request, current_trip_exists. Details can be found here - https://developer.uber.com/docs/rides/api/v1-requests

I don't see the different between the two api requests examples you provided. The sandbox will always show a static map.

In production, maps are only available after a ride has been accepted by a driver and is in the accepted state. Attempting to GET this resource before that will result in a 404 not found error. The sandbox environment provides /v1/sandbox/map for testing, but it provides a static map.

Upvotes: 0

Related Questions