2.9.2 获取城市相应的城市编码

接口说明

  • 1.最新接口
  • 2.该接口配合创建审批单接口使用,在创建审批单时会需要不同城市的分贝编码,获取相应的编码调用此接口
请求方式 请求地址
POST /open/api/common/city-code
字段 名称 类型 必填 描述
access_token api鉴权Token string Y
sign 签名 string Y
timestamp 时间戳 long Y 13位时间戳
employee_id 用户ID string Y 分贝用户id或者第三方用户id
employee_type 用户类型 string Y 类型,0为分贝用户,1为第三方用户
data 请求数据 jsonstring Y
data.type 业务类型 string Y 火车:15,机票:7 , 酒店:6(包括省市县三级)

请求示例:


"access_token":"5747fbc10f0e60e0709d8d722",
"timestamp":124124325,
"sign":"oihfnlyeofdh98",
"employee_id":"59b74c1323445f2d54dd07922",
"employee_type":1,
"data":{
"type":"7"
}

返回结果(机票):

{
    "request_id": "xUolOnJHWhIO4YP8MozO",
    "code": 0,
    "msg": "成功",
    "data": {
        "cities": [{
            "id": "1715",
            "name": "南宁市",
            "pinyin": "nan ning shi",
            "description": "南宁市",
            "station_list": [{
                "name": "吴圩国际机场",
                "code": "NNG"
            }]
        },
         {
            "id": "2644",
            "name": "固原市",
            "pinyin": "gu yuan shi",
            "description": "固原市",
            "station_list": [{
                "name": "六盘山机场",
                "code": "GYU"
            }]
        }, {
            "id": "2121",
            "name": "海口市",
            "pinyin": "hai kou shi",
            "description": "海口市",
            "station_list": [{
                "name": "美兰国际机场",
                "code": "HAK"
            }]
        }
}

返回结果(火车)

{
"request_id": "xUolOnJHWhIO4YP8MozO",

    "code": 0,
    "msg": "成功",
    "data": {
        "cities": [{
            "id": "839",
            "name": "阿巴嘎旗",
            "pinyin": "a ba ga qi",
            "description": "锡林郭勒盟",
            "station_list": [{
                "name": "阿巴嘎旗站"
            }],
            "all_station_list": [{
                "name": "阿巴嘎旗站"
            }]
        }, {
            "id": "699",
            "name": "阿城区",
            "pinyin": "a cheng qu",
            "description": "哈尔滨市",
            "station_list": [{
                "name": "阿城站"
            }, {
                "name": "平山站"
            }, {
                "name": "小岭站"
            }],
            "all_station_list": [{
                "name": "玉泉站"
            }, {
                "name": "阿城站"
            }, {
                "name": "平山站"
            }, {
                "name": "小岭站"
            }]
        }, {
            "id": "897",
            "name": "阿尔山市",
            "pinyin": "a er shan shi",
            "description": "兴安盟",
            "station_list": [{
                "name": "阿尔山站"
            }, {
                "name": "阿尔山北站"
            }],
            "all_station_list": [{
                "name": "阿尔山站"
            }, {
                "name": "伊尔施站"
            }, {
                "name": "白狼站"
            }, {
                "name": "明水河站"
            }, {
                "name": "阿尔山北站"
            }]
        }, {
            "id": "2675",
            "name": "阿克苏地区",
            "pinyin": "a ke su di qu",
            "description": "",
            "station_list": [{
                "name": "阿克苏站"
            }],
            "all_station_list": [{
                "name": "阿克苏站"
            }, {
                "name": "库车站"
            }, {
                "name": "新和站"
            }]
        }, {
            "id": "2703",
            "name": "阿克陶县",
            "pinyin": "a ke tao xian",
            "description": "克孜勒苏州",
            "station_list": [{
                "name": "阿克陶站"
            }],
            "all_station_list": [{
                "name": "阿克陶站"
            }]
        }, {
            "id": "52790",
            "name": "阿拉山口市",
            "pinyin": "a la shan kou shi",
            "description": "博尔塔拉州",
            "station_list": [{
                "name": "阿拉山口站"
            }],
            "all_station_list": [{
                "name": "阿拉山口站"
            }]
        }, {
            "id": "891",
            "name": "阿拉善盟",
            "pinyin": "a la shan meng",
            "description": "",
            "station_list": [{
                "name": "岳家井站"
            }],
            "all_station_list": [{
                "name": "额济纳站"
            }, {
                "name": "岳家井站"
            }]
        }, {
            "id": "2745",
            "name": "阿勒泰市",
            "pinyin": "a le tai shi",
            "description": "阿勒泰地区",
            "station_list": [{
                "name": "阿勒泰站"
            }],
            "all_station_list": [{
                "name": "阿勒泰站"
            }]
        }
}





返回结果(酒店)

{
    "request_id": "ovywm9Nb7464wvsMlOaP",
    "code": 0,
    "msg": "success",
    "data": [
        {
            "fullCityName": "南宁市,广西壮族自治区",
            "self_city_code": "1715",
            "city_name": "南宁市",
            "pinyin": "nanningshi",
            "short_pinyin": "nns",
            "parent_id": "20",
            "areaType": 2,
            "city_code": "1715",
            "sort": "N",
            "self_city_name": "南宁市",
            "municipal_district_flag": false
        },
        {
            "fullCityName": "固原市,宁夏回族自治区",
            "self_city_code": "2644",
            "city_name": "固原市",
            "pinyin": "guyuanshi",
            "short_pinyin": "gys",
            "parent_id": "30",
            "areaType": 2,
            "city_code": "2644",
            "sort": "G",
            "self_city_name": "固原市",
            "municipal_district_flag": false
        },

               {
            "city_name": "广西壮族自治区",
            "city_code": "20"
        },
        {
            "city_name": "海南省",
            "city_code": "23"
        },
        {
            "city_name": "福建省",
            "city_code": "16"
        },
        {
            "city_name": "西藏自治区",
            "city_code": "26"
        },
        {
            "city_name": "安徽省",
            "city_code": "14"
        },
        {
            "city_name": "内蒙古自治区",
            "city_code": "11"
        },
        {
            "city_name": "山西省",
            "city_code": "6"
        },
        {
            "city_name": "山东省",
            "city_code": "13"
        },
        {
            "city_name": "贵州省",
            "city_code": "24"
        },
        {
            "city_name": "吉林省",
            "city_code": "9"
        },
        {
            "city_name": "甘肃省",
            "city_code": "28"
        },
        {
            "city_name": "江西省",
            "city_code": "21"
        },
        {
            "city_name": "黑龙江省",
            "city_code": "10"
        },
        {
            "city_name": "湖北省",
            "city_code": "17"
        },
        {
            "city_name": "河北省",
            "city_code": "5"
        },
        {
            "city_name": "新疆维吾尔自治区",
            "city_code": "31"
        },
        {
            "city_name": "河南省",
            "city_code": "7"
        },
        {
            "city_name": "江苏省",
            "city_code": "12"
        },
        {
            "city_name": "宁夏回族自治区",
            "city_code": "30"
        },
        {
            "city_name": "辽宁省",
            "city_code": "8"
        },
        {
            "city_name": "青海省",
            "city_code": "29"
        },
        {
            "city_name": "陕西省",
            "city_code": "27"
        },
        {
            "city_name": "云南省",
            "city_code": "25"
        },
        {
            "city_name": "广东省",
            "city_code": "19"
        },
        {
            "city_name": "浙江省",
            "city_code": "15"
        },
        {
            "city_name": "湖南省",
            "city_code": "18"
        },
        {
            "city_name": "四川省",
            "city_code": "22"
        }
    ]

results matching ""

    No results matching ""