城市列表
城市数据,请求方式:http,返回json格式。
接口地址
名称 | 请求格式 | 测试地址 |
---|---|---|
城市列表 | GET | http://58.250.56.5:8158/api/city/queryCity.json?reqData=xxx |
系统输入参数
名称 | 编码 | 类型 | 示例值 | 描述 |
---|---|---|---|---|
客户编号 | appKey | String | SZ28276 | 捷旅提供 |
时间戳 | timestamp | String | 1516816895000 | Unix时间戳 |
数字签名 | sign | String | 063cae11a00896187f80eecbf922364a | 签名方法:md5(md5(secretKey+appKey)+timestamp)md5采用32位小写。 |
版本 | version | String | 3.0.1 | 版本信息,请参考版本说明 |
系统输出参数
名称 | 编码 | 类型 | 示例值 | 描述 |
---|---|---|---|---|
结果代码 | code | Integer | 0 | 0表示请求成功;非0表示存在业务异常。 |
结果描述 | errorMsg | String | 错误描述 | |
版本 | version | String | 3.0.1 | |
结果对象 | result | String | 不同的请求是不同的对象,错误的请求一般返回为空 | |
响应码 | respId | String | 单次响应的唯一编码,业务问题排查请提供编码 |
输入参数
名称 | 编码 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|---|
国家编号 | countryId | Integer | 否 | 70007 | 无 |
省份编号 | stateId | Integer | 否 | 70017 | 无 |
城市编号 | cityId | Integer | 否 | 70002 | 无 |
页码 | pageIndex | Integer | 是 | 1 | |
每页数量 | pageSize | Integer | 是 | 最大1000条记录 |
输入示例
{"head": {"appKey": "SZ28276","timestamp": "1516816895000","sign": "063cae11a00896187f80eecbf922364a","version":"3.0.1"},"data": {"pageIndex": 0,"pageSize":100}}
返回参数
名称 | 编码 | 类型 | 示例值 | 描述 |
---|---|---|---|---|
城市总数 | count | Integer | 46801 | 城市总条数 |
页码 | pageIndex | Integer | 无 | 1 |
每页数量 | pageSize | Integer | 无 | 1000 |
地区数组 | hotelGeoList | HotelGeo[] | 无 | HotelGeo定义见下表 |
hotelGeo
对象包括国家、省份、城市信息。
属性
名称 | 编码 | 类型 | 示例值 | 描述 |
---|---|---|---|---|
国家编号 | countryId | Integer | 无 | |
国家中文名 | countryCn | String | 无 | |
国家英文名 | countryEn | String | 无 | |
省份编号 | stateId | Integer | 无 | |
省份中文名 | stateCn | String | 无 | |
省份英文名 | stateEn | String | 无 | |
城市编号 | cityId | Integer | 无 | |
城市中文名 | cityCn | String | 无 | |
城市英文名 | cityEn | String | 无 |
返回示例
{"respId":"2a9ac395-8da1-46f8-ab07-ca4c6b80ce97","code":0,"errorMsg":"","result":{"count":46801,"pageIndex":1,"pageSize":2,"hotelGeoList":[{"countryId":70007,"countryCn":"Z-中国","countryEn":"China","stateId":70045,"stateCn":"S山西","stateEn":"Shanxi","cityId":101,"cityCn":"W五台山","cityEn":"WuTaiShan"},{"countryId":70007,"countryCn":"Z-中国","countryEn":"China","stateId":70029,"stateCn":"X新疆","stateEn":"Xinjiang","cityId":161,"cityCn":"A阿勒泰","cityEn":"Aletai"}]}}