当尝试多次骑行请求时,第一次骑行的"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"
}
}发布于 2017-03-29 07:32:38
每个用户/令牌只能同时运行一次,因此它是预期的。在您的例子中,您只是在沙箱中提出了一个乘车请求,并且没有将状态推进到完成或取消乘坐。
https://stackoverflow.com/questions/43040556
复制相似问题