# 附近车辆

# 简介

根据用户下单位置,返回3公里半径内空闲车辆情况

# 服务提供方

享道

# 接口URL

/openapi/driver/nearby

# 请求方式

POST

# 请求频次

单次

# 请求参数

参数名称 类型 必选 说明
timestamp long 请求时间,Unix Timestamp单位毫秒
city_code string 城市code,参见附录6
product_type string 产品类型,参见附录1
ride_type string 运力类型,参见附录1
lon double 当前坐标,经度
lat double 当前坐标,纬度
radius int 查找半径,单位米(查询半径最大3000米,超过则按3000米计算)

# 响应参数

参数名称 类型 必有 说明
errCode int 服务响应状态,参见附录5
errMsg string 服务响应状态说明,参见附录5
content object
content.count int 附近车辆数量
content.product_type string 产品类型,参见附录1
content.detail list 车辆位置
content.detail.lon double 经度
content.detail.lat double 纬度
content.detail.estimate_time int 预计接驾时间,单位分总
content.detail.ride_type string 运力类型,参见附录1

# 请求示例

请求

curl --location --request POST 'https://open-sit.saicmobility.com/merchant/v1/openapi/driver/nearby' \
--header 'X-Sign: f98eee52891568d00ca331fc815c0da71a153517' \
--header 'X-SignAlgorithm: 1' \
--header 'X-Timestamp: 20201021101100' \
--header 'X-MerchantId: open_app_Eg77IK8qngB97nOP' \
--header 'Content-Type: application/json' \
--header 'Cookie: tgw_l7_route=f06f7ba39346f19da3808decf50bb648' \
--data-raw '{"timestamp":1603164774068,"city_code":"021","lat":31.249601,"lon":121.455704,"radius":3000,"product_type":"private-car","ride_type":"compact"}'

响应

{
  "errCode": 10000,
  "errMsg": "successful",
  "content": {
    "count": 1,
    "product_type": "private-car",
    "detail": [
      {
        "lat": 11.01,
        "lon": 88.01,
        "estimate_time": 5,
        "ride_type": "compact"
      }
    ]
  }
}