拉取订单信息
下单后到司机接单前需要轮询调取此接口,建议频率间隔10S,可用回调订单状态推拉结合模式获取派单结果,派单失败或者司机接单后,停止此接口调用
方法名
Uri |
请求方式 |
order/polling |
GET |
参数说明
参数 |
是否必须 |
说明 |
备注 |
token |
是 |
用户凭证 |
|
bookingType |
是 |
下单类型(下单返回的) |
01003即时下单等 |
pollingStart |
是 |
请求时间 格式:年-月-日 时:分:秒 |
当前时间24小时制 |
pollingCount |
是 |
请求次数>=1 |
传1即可 |
bookingId |
是 |
预约id |
下单同步返回的预约id |
成功返回值说明
名称 |
类型 |
备注 |
code |
int |
返回状态码:0成功非0失败 |
message |
string |
message |
data |
Object |
成功时的返回数据 |
orderId |
string |
异步生成的订单号,pollingState为1或2时有值 |
driverId |
string |
司机工号,pollingState为2时有值,BJ00000为默认工号 |
pollingState |
int |
0继续请求、1派单失败、2司机已接单,派单失败后不用再次取消该订单 |
channel |
String |
渠道标识 01007即为远程单 |
返回值
{
"code": 0,
"data": {
"eta": "",
"text": "发送订单中...",
"next": 5,
"driverId": "BJ00000",
"orderId": "186455359",
"timeout": 300,
"pollingState": 0,
"refreshTimeout": 0,
"incrService": {
"upGrade": false
},
"orderDetail": [],
"pollingCount": "9"
},
"message": "获取成功"
}