Reputation: 1065
Instead of getting "high_estimate": 11.0 and "low_estimate": 8.0 or "estimate": "$13-17" of using https://api.uber.com/v1.2/estimates/price? is there a way to get exact fare rate as the same as Uber app?
{
"localized_display_name": "uberX",
"distance": 12.88,
"display_name": "uberX",
"product_id": "2143f90b-ce68-4f6d-a113-4872b207e626",
"high_estimate": 17.0,
"low_estimate": 13.0,
"duration": 1800,
"estimate": "$13-17",
"currency_code": "USD"
},
Upvotes: 0
Views: 617
Reputation: 797
The feature you are referring to is called "Upfront Fare". It is being rolled out gradually in cities across the globe.
You can see which products are enabled for Upfront Fare by looking at GET /v1.2/products. If upfront_fare_enabled
is set to true, you can get an upfront fare through POST /v1.2/requests/estimate with the enabled product to get a fare_id
. The fare_id
can be used to lock down an upfront fare and arrival time for a trip. The fare_id
expires after two minutes.
Finally, you can request the ride using POST /requests with the fare_id
returned in the previous step.
You should also read the best practices on Upfront Fares here.
Upvotes: 3