Reputation: 1
Am in the middle of using uber api(Mobile) to get the estimated fare for china region.
Am using Baidu map to get the coordinate between From: 龙居大厦 To: 虹桥火车站-地铁站. So my request to get estimate price becomes:
Response: {
"currency_code" = CNY;
"display_name" = "People's Uber +";
distance = "17.61";
duration = 2880;
estimate = "CN\U00a574-99";
"high_estimate" = 99;
"localized_display_name" = "People's Uber +";
"low_estimate" = 74;
minimum = 13;
"product_id" = "c9ded892-05bf-4efb-8056-3301bc65a3e7";
"surge_multiplier" = 1; },
{
"currency_code" = CNY;
"display_name" = "Shared Ride";
distance = "17.61";
duration = 2880;
estimate = "CN\U00a575.84";
"high_estimate" = 76;
"localized_display_name" = "Shared Ride";
"low_estimate" = 75;
minimum = "<null>";
"product_id" = "74d2f8af-5027-4d42-960e-bc879f8ea54b";
"surge_multiplier" = 1; }, etc (ignoring uberx, uber sedan, UberXl)
problem is estimated price is mismatching with real app fare (Added link for screenshot. Uber real app fare screenshot). So Can someone please help me in clearing below doubt.
Waiting for your speedy response. Thanks in advance
Upvotes: 0
Views: 109
Reputation: 1252
1) The difference between the two estimates can be explained as we use different signals when providing an estimate (v1/estimates/price) vs providing an upfront fare id (/v1/requests/estimates).
To request a fare_id (which has the most accurate fare) see the docs for /v1/requests/estimates - https://developer.uber.com/docs/riders/references/api/v1.2/requests-estimate-post
The v1 price estimates endpoint does not always reflect promotions that may be available in the local market. This is resolved in the v1.2 endpoint:
https://developer.uber.com/docs/riders/references/api/v1.2/estimates-price-get
I would recommend upgrading to v1.2 to resolve the issue with /v1/estimates/price or if this is for an authenticated user provide an upfront fare with /v1.2/requests/estimate.
I also wanted to confirm you know we are shutting down the .cn API on November 29th.
Upvotes: 2