UberPool的票价比UberX贵吗?

时间:2018-12-01 00:21:40

标签: python uber-api fare

我正在使用请求v1.2查询Uber API端点。 (https://api.uber.com/v1.2/requests/estimate

我看到了一些奇怪的行为,即返回的UberPool游乐设施的票价比UberX游乐设施的票价更高。以我个人的经验,这在应用程序中总是相反的。我已经检查并仔细检查了产品ID等。

以下只是一个示例查询,该查询返回的 UberPool估算值比UberX昂贵。据我所知,这似乎一直发生在长途旅行中(这仍然不符合我在Uber应用程序中总是看到的比UberX便宜的UberPool):

POOL

{'fare': {'breakdown': [{'name': 'Promotion',
                         'type': 'promotion',
                         'value': -4.0},
                        {'name': 'Base Fare',
                         'type': 'base_fare',
                         'value': 64.01}],
          'currency_code': 'USD',
          'display': '$60.01',
          'expires_at': 1543621842,
          'fare_id': '3383930c3076db034e70d03623fa2938e92276e5c47d668f8092c0286c298928',
          'value': 60.01},
 'pickup_estimate': 5,
 'trip': {'distance_estimate': 29.76,
          'distance_unit': 'mile',
          'duration_estimate': 3300}}

这是使用v1.2端点和以下查询数据参数生成的:

data = '{\n       "product_id": "26546650-e557-4a7b-86e7-6a3942445247",\n      "start_latitude": "37.9779776",\n       "start_longitude": "-122.0310733",\n       "end_latitude": "37.7941378",\n       "end_longitude": "-122.4077914"\n     }'

UBERX

{'fare': {'breakdown': [{'name': 'Promotion',
                         'type': 'promotion',
                         'value': -4.0},
                        {'name': 'Base Fare',
                         'type': 'base_fare',
                         'value': 47.36}],
          'currency_code': 'USD',
          'display': '$43.36',
          'expires_at': 1543621878,
          'fare_id': '24098c789d23e5e4c961e268963269ea3313654acc41555b73ef232e6b4219b9',
          'value': 43.36},
 'pickup_estimate': 4,
 'trip': {'distance_estimate': 29.76,
          'distance_unit': 'mile',
          'duration_estimate': 3300}}

除product_id是UberX而不是UberPool之外,生成的代码相同:

data = '{\n       "product_id": "a1111c8c-c720-46c3-8534-2fcdd730040d",\n      "start_latitude": "37.9779776",\n       "start_longitude": "-122.0310733",\n       "end_latitude": "37.7941378",\n       "end_longitude": "-122.4077914"\n     }'

1 个答案:

答案 0 :(得分:0)

我相信我已经解决了自己的问题,并希望分享答案: UberPool请求具有一个隐含的参数“ seat_count = 2”,该参数在我称为“数据”的字典中传递以上。当我在字典中添加明确的参数“ seat_count = 1”时,价格变得比预期的要高,UberPool比UberX便宜!

请注意-在API方面,这仍然是很奇怪的行为,并且已被Uber员工注意到。 UberPool绝不应该比UberX贵,包括如果您需要两个席位-从产品的角度来看这没有意义,因为如果直接的UberX便宜且快速,那么为什么有人会为自己和朋友称呼circuit回的UberPool? ?