Jude Fisher
Jude Fisher

Reputation: 11294

Is it possible to discover the kind of vehicle a ride was completed with from the Uber API?

As the title: I'd like to be able to access a specific ride for the signed-in user and know if the vehicle in question was a Prius, Ford Galaxy, E-Class, or whatever. I don't see this in the documentation for the Riders or Rides API - is there any way to get the information?

Upvotes: 1

Views: 112

Answers (1)

Jacob Morris
Jacob Morris

Reputation: 500

Yes. You can get the Make, Model, and even license plate from the Uber API by looking at the current trips (You would just have to filter for a status of completed):

https://developer.uber.com/docs/riders/references/api/v1.2/requests-request_id-get

The response includes details of the vehicle:

"vehicle": {
    "make": "Bugatti",
    "model": "Veyron",
    "license_plate": "I<3Uber",
    "picture_url": "https:\/\/d1w2poirtb3as9.cloudfront.net\/car.jpeg"
  }

Note that retrieving this data for rides requested by an app other than your own (i.e. for any rider) requires FULL ACCESS scope for your app:

Privileged Scope This endpoint requires a privileged scope to be used in production by all Uber riders. You can use this endpoint immediately when authenticated as yourself or any of your 5 registered developers. When you are ready to distribute your application broadly for use by all Uber riders, you may request FULL ACCESS. For more information read about scopes.

Upvotes: 2

Related Questions