# 车辆导航位置查询

# 简介

司乘同显-车辆导航位置查询

# 服务提供方

享道

# 接口URL

/openapi/order/vehiclelocation

# 请求方式

post

# 请求频次

轮询 (5s)

# 请求参数

参数名称 类型 必选 说明
timestamp long 请求时间,Unix Timestamp单位毫秒
order_id string 享道订单ID
oid string 合作方订单ID

# 响应参数

参数名称 类型 必有 说明
errCode int 服务响应状态,参见附录5
errMsg string 服务响应状态说明,参见附录3
content object
content.vehicles list 车辆信息
content.vehicles.vehicleID string 车辆唯一标识
content.vehicles.orderID string 当车辆正在服务的订单ID,如果没有正在服务的订单,该字段可不传
content.vehicles.oid string 合作方订单ID
content.vehicles.driverID string 司机唯一标识
content.vehicles.location string 司机当前位置
content.vehicles.pointTs string 本次导航位置时间戳
content.vehicles.navTs string 本次导航位置匹配的导航路线的时间戳,若和3.2.11的navTs不一致,表示路线已变更,需重新同步
content.vehicles.remainingDistance string 本次导航剩余距离
content.vehicles.remainingDuration string 本次导航剩余时间
content.vehicles.currentStep int 当前路段,若只有一个总路段,传0
content.vehicles.currentIndex int 本次坐标在routePlan当前路段的下标,用于已行驶路线擦除。若无该属性,index取当前GPS距离路线最近点,掉头路线会出错。
content.viaPoint list 途径点信息
content.viaPoint.lon double 地址经度
content.viaPoint.lat double 地址纬度
content.viaPoint.addressLong string 长地址
content.viaPoint.addressShort string 短地址
content.viaPoint.seq int 点位顺序
content.viaPoint.cityCode string 城市编码
content.viaPoint.enter_time string 途径点进入时间
content.viaPoint.exit_time string 途径点离开时间

# 请求示例

请求

curl --location --request POST 'https://open-sit.saicmobility.com/merchant/v1/openapi/order/vehiclelocation' \
--header 'X-Sign: aab078dd08a60c2a2e72bbbdfca3c9f94ab40e13' \
--header 'X-SignAlgorithm: 1' \
--header 'X-Timestamp: 20201021113700' \
--header 'X-MerchantId: open_app_OqPcV19dBV1KoBHs' \
--header 'Content-Type: application/json' \
--data-raw '{"timestamp":1603216497167,"oid":"Tess30vs2v9ehceptscs15ingh63dhd4gamx","order_id":"U4b3x6n9w1bb71ee8f5da34d208e0fd8cfc0f0cdfc"}'

响应

{
  "errCode": 10000,
  "errMsg": "successful",
  "content": {
    "vehicles": [
      {
        "pointTs": "0",
        "currentStep": 0,
        "remainingDistance": "0",
        "orderID": "T4y6b6n9w18b8522d4982e400eb213c79b89f8926e",
        "remainingDuration": "0",
        "navTs": "0",
        "currentIndex": 0
      }
    ],
    "tid": "ctripgtw-0abc862a-M28483458-13"
  }
}