获取城市列表

说明

  1. 获取全量城市列表

地址URL

/v1/common/Cities/getAll

支持格式

{url}?k1=v1&k2=v2&k3=v3&...

HTTP请求方式

GET

是否需要登录

是 关于登录授权,参见 如何登录授权

访问授权限制

暂无

请求参数

名称 类型 必选 描述
client_id string yes 申请应用时分配的APP_KEY
access_token string yes 乘客认证信息
timestamp int yes 时间戳
sign string yes 签名

注意事项

sign签名请参照 签名算法

请求示例

curl -X GET -H "Content-Type: application/x-www-form-urlencoded" 'https://api.es.xiaojukeji.com/v1/common/Cities/getAll?client_id=testclient&access_token=test&timestamp=2867831074&sign=test'

返回参数说明

返回字段 字段类型 字段说明
errno int 错误码
errmsg string 错误信息
data object
name string 城市名称
cityid int 城市id
open_zhuanche int 是否开通专车 1-开通 0-未开通
open_kuaiche int 是否开通快车 1-开通 0-未开通

返回示例

{
    "errno": 0,
    "errmsg": "SUCCESS",
    "data": [
        {
            "name": "A",
            "cities": [
                {
                    "name": "鞍山市",
                    "cityid": 64,
                    "open_zhuanche": 0,
                    "open_kuaiche": 1
                },
                {
                    "name": "安庆市",
                    "cityid": 149,
                    "open_zhuanche": 0,
                    "open_kuaiche": 1
                },
                ...
            ]
        },
        {
              "name": "B",
              "cities": [
                {
                  "name": "北京市",
                  "cityid": 1,
                  "open_zhuanche": 1,
                  "open_kuaiche": 1
                },
                {
                  "name": "保定市",
                  "cityid": 62,
                  "open_zhuanche": 0,
                  "open_kuaiche": 1
                },
                ...
        },
         ...
    ]
}

results matching ""

    No results matching ""