多个并发游乐设施为不工作的客人

时间:2017-03-27 07:42:21

标签: uber-api

当尝试多次乘车请求时,在第二次请求中返回第一次乘车的“request_id”,这意味着没有为第二次乘车请求预订新乘车。请参阅下面的请求/回复,

乘车请求1:

https://sandbox-api.uber.com/v1.2/requests
{
  "start_latitude": "37.713706",
  "start_longitude": "-122.403708",
  "end_latitude": "37.744186",
  "end_longitude": "-122.466388",
  "fare_id" :"48ba6200227450d3965081024657275f9d1ff5cbb719aaa0bf30be234325f300",
  "guest_id" : "5b357e78-c495-4614-afa1-e2a0b0f3dffc",
  "product_id": "a1111c8c-c720-46c3-8534-2fcdd730040d",
}

**Response :**

{
"status": "processing",
"product_id": "a1111c8c-c720-46c3-8534-2fcdd730040d",
"destination": {
"latitude": 37.744186,
"longitude": -122.466388
},
"driver": null,
"pickup": {
"latitude": 37.713706,
"longitude": -122.403708
},
"request_id": "2be01f1e-6687-4393-9fcf-e3b840803849",
"eta": null,
"location": null,
"vehicle": null,
"shared": false,
"guest": {
"guest_id": "5b357e78-c495-4614-afa1-e2a0b0f3dffc",
"phone_number": "+14150001234",
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@email.com"
}
}

乘车请求2:

https://sandbox-api.uber.com/v1.2/requests
{
  "start_latitude": "37.743033",
  "start_longitude": "-122.389675",
  "end_latitude": "37.7759073",
  "end_longitude": "-122.4245247",
  "fare_id" :"502eed0ccbb906363df23cf9e81ecb6ceb35b8af46a25194775ac9560871da12",
  "guest_id" : "ecc5adeb-fa20-4580-ac24-1ae184bffce9",
  "product_id" : "26546650-e557-4a7b-86e7-6a3942445247"
}

Response:
{
"status": "processing",
"product_id": "26546650-e557-4a7b-86e7-6a3942445247",
"destination": {
"latitude": 37.744186,
"longitude": -122.466388
},
"driver": null,
"pickup": {
"latitude": 37.713706,
"longitude": -122.403708
},
"request_id": "2be01f1e-6687-4393-9fcf-e3b840803849",
"eta": null,
"location": null,
"vehicle": null,
"shared": false,
"guest": {
"guest_id": "ecc5adeb-fa20-4580-ac24-1ae184bffce9",
"phone_number": "+14150001234",
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@email.com"
}
}

1 个答案:

答案 0 :(得分:0)

每个用户/令牌只能有一个并发乘坐,所以这是预期的。在您的情况下,您刚刚在沙箱中提出了乘车请求,并且没有将状态推进到完成或取消乘坐。