1. 地图导航-限行查询(restriction-restrictionInfo)

1.1 用户界面

手机

适用产品: 智能助手,搜索

适用产品: 语音助手

1.2 请求

城市限行查询请求

请求报文样例:

  1. {
  2.    "slots": {
  3.        "beginDate": {
  4.            "name": "beginDate",
  5.            "slotType": "string",
  6.            "values": [{
  7.                "real": "2019-01-07"
  8.            }]
  9.        },
  10.        "endDate": {
  11.            "name": "endDate",
  12.            "slotType": "string",
  13.            "values": [{
  14.                "real": "2019-01-08"
  15.            }]
  16.        },
  17.        "city": {
  18.            "name": "city",
  19.            "slotType": "string",
  20.            "values": [{
  21.                    "real": "北京}
  22.                ]
  23.            }
  24.        }
成员名称描述是否必选类型取值范围
beginDate起始时间否DateFormatString/
endDate结束时间否DateFormatString/
city城市。如:北京否String最大长度:32

1.3 响应

查询一段时间内的每天的限行尾号

响应报文样例:

  1. {
  2.  "version": "1.0",
  3.  "reply": {
  4.    "displayText": "displayText",
  5.    "commands": [
  6.      {
  7.        "head": {
  8.          "namespace": "Render",
  9.          "name": "DisplayTemplate"
  10.        },
  11.        "body": {
  12.          "templateType": "rate-exchange",
  13.          "templateContent": {
  14.            "items": [
  15.              {
  16.                "city": "北京",
  17.                "active": {
  18.                  "date": "2019-01-07",
  19.                  "number": "1和2",
  20.                  "restrictTime": "9:00-18:00",
  21.                  "restrictPlace": "北三环",
  22.                  "restrictRule": "9:00-18:00北三环限行",
  23.                  "remark": "",
  24.                  "punishment": "",
  25.                  "day": "MON"
  26.                },
  27.                "items": [
  28.                  {
  29.                    "date": "2019-01-07",
  30.                    "number": "1和2",
  31.                    "restrictTime": "9:00-18:00",
  32.                    "restrictPlace": "北三环",
  33.                    "restrictRule": "9:00-18:00北三环限行",
  34.                    "remark": "",
  35.                    "punishment": "",
  36.                    "day": "MON"
  37.                  },
  38.                  {
  39.                    "date": "2019-01-08",
  40.                    "number": "1和2",
  41.                    "restrictTime": "9:00-18:00",
  42.                    "restrictPlace": "北三环",
  43.                    "restrictRule": "9:00-18:00北三环限行",
  44.                    "remark": "",
  45.                    "punishment": "",
  46.                    "day": "TUE"
  47.                  }
  48.                ]
  49.              }
  50.            ]
  51.          }
  52.        }
  53.      }
  54.    ]
  55.  },
  56.  "isEndSession": true,
  57.  "errorCode": "0",
  58.  "errorMessage": "OK"
  59. }
成员名称描述是否必选类型取值范围
items/是estrictionInfoMainItem[]/
shortAnswer播报语否string最大长度:512 

2. 查地图-周边信息(poi-poiSearchInfo)

2.1 请求

周边检索请求

请求报文样例:

  1. {
  2.    "slots": {
  3.        "keyword": {
  4.            "name": "keyword",
  5.            "slotType": "string",
  6.            "values": [{
  7.                "real": "加油站"
  8.            }]
  9.        },
  10.        "location": {
  11.            "name": "location",
  12.            "slotType": "string",
  13.            "values": [{
  14.                "real": "{\"locationSystem\":\"BD09LL\",\"latitude\":\"39.915\",\"longitude\":\"116.404\"}"
  15.            }]
  16.        },
  17.        "radius": {
  18.            "name": "radius",
  19.            "slotType": "string",
  20.            "values": [{
  21.                "real": "2000"
  22.            }]
  23.        }
  24.    }
  25. }
成员名称描述是否必选类型取值范围
keyword检索关键字 (如:加油站、地铁站,标识检索地点分类名称。)是string最大长度:64
city区域名称,如:南京市。否string最大长度:64
location设备的经纬度,用于标识检索位置。是Location/
radius检索半径 ,单位:米,缺省值为1000(如:1000,表示以检索位置为中心,1000米半径内的检索结果。)否string最大长度:16

2.2 响应

周边检索信息

响应报文样例:

  1. {
  2.    "items": [{
  3.        "displayName": "中国石化(宣武门加油站)",
  4.        "distance": 1894,
  5.        "poiLocation": {
  6.            "locationSystem": "BD09LL",
  7.            "latitude": "39.905898",
  8.            "longitude": "116.385224"
  9.        },
  10.        "address": "北京市西城区宣武门东大街16号",
  11.        "telephone": "(010)63021072",
  12.        "detailInfo": {
  13.            "price": "147.5",
  14.            "shopHours": "11:00-14:00,17:00-21:00",
  15.            "overallRating": "4.0",
  16.            "tasteRating": "0",
  17.            "serviceRating": "0",
  18.            "environmentRating": "0",
  19.            "facilityRating": "0",
  20.            "hygieneRating ": "0",
  21.            "technologyRating ": "0",
  22.            "detailUrl": {
  23.                "webURL": "https://detailUrl",
  24.                "deepLink": {},
  25.                "quickApp": {}
  26.            },
  27.            "contentTag": "有便利店"
  28.        }
  29.    }]
  30. }
成员名称描述是否必选类型取值范围
items/是PoiSearchInfoItem[]最大Item数:15

3. 地图导航-路况查询(trafficCondition-trafficConditionInfo)

3.1 请求

定位服务请求-路况信息查询

请求报文样例-根据指定道路名称查询该道路的路况:

  1. {
  2.    "slots": {
  3.        "queryType": {
  4.            "name": "queryType",
  5.            "slotType": "integer",
  6.            "values": [{
  7.                "real": 0
  8.            }]
  9.        },
  10.        "location": {
  11.            "name": "location",
  12.            "slotType": "string",
  13.            "values": [{
  14.                "real": "{\"locationSystem\":\"BD09LL\",\"latitude\":\"39.915\",\"longitude\":\"116.404\"}"
  15.            }]
  16.        },
  17.        "roadName": {
  18.            "name": "roadName",
  19.            "slotType": "string",
  20.            "values": [{
  21.                "real": "软件大道"
  22.            }]
  23.        },
  24.        "city": {
  25.            "name": "city",
  26.            "slotType": "string",
  27.            "values": [{
  28.                "real": "南京市"
  29.            }]
  30.        }
  31.    }
  32. } {
  33.    "slots": {
  34.        "queryType": {
  35.            "name": "queryType",
  36.            "slotType": "integer",
  37.            "values": [{
  38.                "real": 1
  39.            }]
  40.        },
  41.        "location": {
  42.            "name": "location",
  43.            "slotType": "string",
  44.            "values": [{
  45.                "real": "{\"locationSystem\":\"BD09LL\",\"latitude\":\"39.915\",\"longitude\":\"116.404\"}"
  46.            }]
  47.        },
  48.        "radius": {
  49.            "name": "radius",
  50.            "slotType": "integer",
  51.            "values": [{
  52.                "real": 200
  53.            }]
  54.        },
  55.        "roadGrade": {
  56.            "name": "roadGrade",
  57.            "slotType": "integer",
  58.            "values": [{
  59.                "real": 0
  60.            }]
  61.        }
  62.    }
  63. }
成员名称描述是否必选类型取值范围
queryType查询类型,0:根据指定道路名称查询该道路的路况;1:根据指定的位置信息查询区域范围内的路况。否//
location设备的经纬度,用于标识检索位置,如果city字段未填,则使用location对应的城市信息作为city信息。否Location/
roadName要查询路况的道路名称是string最大长度:32
city要查询路况的道路所在的城市否string最大长度:32
radius要查询的区间的半径,单位:米。否int/
roadGrade区间查询时需要返回的道路等级道路等级对应表如下: 0:全部驾车道路 1:高速路 2:环路及快速路 3:主干路 4:次干路 5:支干路不传时默认值为:0。否int枚举值:  0,1,2,3,4,5

3.2 响应

定位服务请求-路况信息查询

响应报文样例-根据指定道路名称查询该道路的路况:

  1. {
  2.    "trafficDescription": "软件大道:自东向西较为畅通;自西向东畅通;东向西,软件大道转盘附近拥堵。",
  3.    "evaluation": {
  4.        "status": 1,
  5.        "description": "自东向西较为畅通;自西向东畅通"
  6.    },
  7.    "trafficDetails": [{
  8.        "roadName": "软件大道",
  9.        "congestionInfo": [{
  10.            "description": "东向西,软件大道转盘附近",
  11.            "status": 3,
  12.            "speed": 13.45,
  13.            "distance": 700,
  14.            "trend": "加重"
  15.        }]
  16.    }]
  17. }

响应报文样例-根据指定的位置信息查询区域范围内的路况:

  1. {
  2.    "trafficDescription": "该区域整体拥堵。京包高速:北向南,从开拓路5到京新高速拥堵。京新上地桥:北向南,京新上地桥拥堵。
  3.    京新高速: 北向南,
  4.    从京包高速到耳通百安拥堵。 小营西路: 西向东,
  5.    上地三街附近拥堵。 ",
  6.    "evaluation": {
  7.        "status": 3,
  8.        "description": "拥堵"
  9.    },
  10.    "trafficDetails": [{
  11.            "roadName": "上地四街"
  12.        },
  13.        {
  14.            "roadName": "京包高速",
  15.            "congestionInfo": [{
  16.                "distance": 1870,
  17.                "speed": 8.45,
  18.                "status": 3,
  19.                "trend": "持平",
  20.                "description": "北向南,从开拓路5到京新高速"
  21.            }]
  22.        },
  23.        {
  24.            "roadName": "京新上地桥",
  25.            "congestionInfo": [{
  26.                "distance": 1610,
  27.                "speed": 7.79,
  28.                "status": 3,
  29.                "trend": "持平",
  30.                "description": "北向南,京新上地桥"
  31.            }]
  32.        },
  33.        {
  34.            "roadName": "京新高速",
  35.            "congestionInfo": [{
  36.                "distance": 1870,
  37.                "speed": 8.45,
  38.                "status": 3,
  39.                "trend": "持平",
  40.                "description": "北向南,从京包高速到耳通百安"
  41.            }]
  42.        }
  43.    ]
  44. }
成员名称描述是否必选类型取值范围
trafficDescription路况描述信息,如:“软件大道:软件大道转盘附近双向行驶缓慢”。否string最大长度:10240
evaluation道路交通状况的评价信息否TrafficEvaluation/
trafficDetails路况详细信息否TrafficDetail[]/
link跳转到开发者的链接否Interaction/

4. 位置查询-逆地理编码(geocoder-geocoderInfo)

4.1 请求

定位服务请求-逆地理编码

请求报文样例:

  1. {
  2.    "slots": {
  3.        "location": {
  4.            "name": "location",
  5.            "slotType": "string",
  6.            "values": [{
  7.                "real": "{\"locationSystem\":\"BD09LL\",\"latitude\":\"39.915\",\"longitude\":\"116.404\"}"
  8.            }]
  9.        },
  10.        "radius": {
  11.            "name": "radius",
  12.            "slotType": "string",
  13.            "values": [{
  14.                "real": "2000"
  15.            }]
  16.        }
  17.    }
  18. }
成员名称描述是否必选类型取值范围
location设备的经纬度,用于标识检索位置。是Location/
radius检索半径 ,单位:米,缺省值为1000(如:1000,表示以检索位置为中心,1000米半径内的检索结果。)否string最大长度:16

4.2 响应

定位服务响应消息

响应报文样例:

  1. {
  2.    "poiLocation": {
  3.        "locationSystem": "BD09LL",
  4.        "latitude": "39.905898",
  5.        "longitude": "116.385224"
  6.    },
  7.    "formattedAddress": "北京市东城区中华路甲10号",
  8.    "business": "天安门,前门,和平门",
  9.    "addressDetailInfo": {
  10.        "country": "中国",
  11.        "countryCode": 0,
  12.        "province": "北京市",
  13.        "city": "北京市",
  14.        "district": "东城区",
  15.        "town": "",
  16.        "adcode": "110101",
  17.        "street": "中华路",
  18.        "streetNumber": "甲10号"
  19.    }
  20. }
成员名称描述是否必选类型取值范围
poiLocation地理位置坐标是Location/
formattedAddress结构化地址信息,如:北京市东城区中华路甲10号。是string最大长度:256
business坐标所在商圈信息,如:百家湖,景枫。否string最大长度:256
addressDetailInfo详细地址信息否AddressDetailInfoItem/

5. 结构

5.1 RestrictionInfoMainItem

单日尾号限行信息

成员名称描述是否必选类型取值范围
city城市,如:北京是string最大长度:16
active问到那一天是RestrictionInfoItem/
items/是RestrictionInfoItem[]/

5.2 RestrictionInfoItem

单日尾号限行信息:

成员名称描述是否必选类型取值范围
date日期否DateFormatString/
number限行尾号。如:3和7,不限行,单号,双号是string最大长度:16
restrictTime限行时间,格式HH:mm-HH:mm。如:9:00-18:00否string最大长度:256
restrictplace限行区域。如:北三环否string最大长度:256
restrictRule限行时间和区域,包含了restrictTime和restrictPlace否string最大长度:256
remark其他说明是string最大长度:256
punishment处罚事项是string最大长度:128
day星期,如:MON否string最大长度:16

5.3 PoiSearchInfoItem

周边检索结果信息

成员名称描述是否必选类型取值范围
displayName地址简要名称(如:中国石化(宣武门加油站))是string最大长度:32
distance本地址距离设备坐标的直线距离(单位:米,如:810)是number/
poiLocation地理位置坐标是Location/
address详细地址(如:秦淮区中山南路501号通服大厦4层)是string最大长度:256
telephone电话号码(如:(010)63021072)否string最大长度:32
detailInfo周边检索结果详情否

PoiDetailInfo

/
link拉起导航的链接否Interaction/

5.4 PoiDetailInfo

周边检索结果详情

成员名称描述是否必选类型取值范围
price商户价格,如:120否string最大长度:32
shopHours营业时间,如:11:00-14:00,17:00-21:00否string最大长度:256
overallRating总体评分,4.8否string最大长度:32
tasteRating口味评分否string最大长度:32
serviceRating服务评分否string最大长度:32
environmentRating环境评分否string最大长度:32
facilityRating星级(设备)评分否string最大长度:32
hygieneRating卫生评分否string最大长度:32
technologyRating技术评分否string最大长度:32
detailUrl/否Interaction/
contentTag标签信息,如:交通便利,环境不错否string最大长度:256

5.5 AddressDetailInfoItem

定位信息地址详情

成员名称描述是否必选类型取值范围
country国家否string最大长度:32
province省名否string最大长度:32
city城市名否string最大长度:32
district区县名否string最大长度:32
town乡镇名否string最大长度:32
street街道名否string最大长度:32
streetNumber街道门牌号否string最大长度:32
countryCode国家码否string最大长度:32
adcode行政区划代码否string最大长度:32

5.6 TrafficEvaluation

道路交通状况的评价信息

成员名称描述是否必选类型取值范围
status道路的整体拥堵评价0:未知路况1:畅通2:缓行3:拥堵4:严重拥堵否int枚举值:  0,1,2,3,4
description路况整体评价的语义化描述否string最大长度:10240

5.7 TrafficDetail

道路交通状况的详细信息

成员名称描述是否必选类型取值范围
roadName道路名称否string最大长度:32
congestionInfo拥堵路段详情否CongestionInfo[]/

5.8 CongestionInfo

道路拥堵详细信息

成员名称描述是否必选类型取值范围
description路段拥堵语义化描述信息否string最大长度:10240
status路段拥堵评价0:未知路况1:畅通2:缓行3:拥堵4:严重拥堵否int枚举值:  0,1,2,3,4
speed平均通行速度否number最大值:120
distance拥堵距离否int/
trend较10分钟前拥堵趋势持平:与10分钟前变化不大缓解:较10分钟前拥堵有所缓解加重:较10分钟前拥堵加重。否string最大长度:10240