商城系統(tǒng) 注冊

視頻號小店獲取地址行政編碼接口

2023-03-16|HiShop
導(dǎo)讀:獲取地址編碼 最多獲取4級地址的行政編碼 接口調(diào)用請求說明 http請求方式:POST https://api.weixin.qq.com/channels/ec/basics/addresscode/get?access_token=xxxxxxxxx 請求參數(shù)示例 { addr_code:0 } 回包示例 {...

  獲取地址編碼

  最多獲取4級地址的行政編碼

  接口調(diào)用請求說明

  http請求方式:POST

  https://api.weixin.qq.com/channels/ec/basics/addresscode/get?access_token=xxxxxxxxx

  請求參數(shù)示例

  {

  "addr_code":0

  }

  回包示例

  {

  "errcode": 0,

  "errmsg": "ok",

  "addrs_msg": {

  "name": "中華人民共和國",

  "code": 0,

  "level": 0

  },

  "next_level_addrs": [

  {

  "name": "澳門特別行政區(qū)",

  "code": 820000000,

  "level": 1

  },

  {

  "name": "香港特別行政區(qū)",

  "code": 810000000,

  "level": 1

  },

  {

  "name": "寧夏回族自治區(qū)",

  "code": 640000000,

  "level": 1

  },

  {

  "name": "青海省",

  "code": 630000000,

  "level": 1

  },

  {

  "name": "甘肅省",

  "code": 620000000,

  "level": 1

  },

  {

  "name": "貴州省",

  "code": 520000000,

  "level": 1

  },

  {

  "name": "西藏自治區(qū)",

  "code": 540000000,

  "level": 1

  },

  {

  "name": "四川省",

  "code": 510000000,

  "level": 1

  },

  {

  "name": "江蘇省",

  "code": 320000000,

  "level": 1

  },

  {

  "name": "河南省",

  "code": 410000000,

  "level": 1

  },

  {

  "name": "臺灣省",

  "code": 710000000,

  "level": 1

  },

  {

  "name": "遼寧省",

  "code": 210000000,

  "level": 1

  },

  {

  "name": "上海市",

  "code": 310000000,

  "level": 1

  },

  {

  "name": "福建省",

  "code": 350000000,

  "level": 1

  },

  {

  "name": "黑龍江省",

  "code": 230000000,

  "level": 1

  },

  {

  "name": "湖北省",

  "code": 420000000,

  "level": 1

  },

  {

  "name": "新疆維吾爾自治區(qū)",

  "code": 650000000,

  "level": 1

  },

  {

  "name": "陜西省",

  "code": 610000000,

  "level": 1

  },

  {

  "name": "吉林省",

  "code": 220000000,

  "level": 1

  },

  {

  "name": "河北省",

  "code": 130000000,

  "level": 1

  },

  {

  "name": "天津市",

  "code": 120000000,

  "level": 1

  },

  {

  "name": "北京市",

  "code": 110000000,

  "level": 1

  },

  {

  "name": "浙江省",

  "code": 330000000,

  "level": 1

  },

  {

  "name": "重慶市",

  "code": 500000000,

  "level": 1

  },

  {

  "name": "江西省",

  "code": 360000000,

  "level": 1

  },

  {

  "name": "安徽省",

  "code": 340000000,

  "level": 1

  },

  {

  "name": "山東省",

  "code": 370000000,

  "level": 1

  },

  {

  "name": "湖南省",

  "code": 430000000,

  "level": 1

  },

  {

  "name": "云南省",

  "code": 530000000,

  "level": 1

  },

  {

  "name": "內(nèi)蒙古自治區(qū)",

  "code": 150000000,

  "level": 1

  },

  {

  "name": "山西省",

  "code": 140000000,

  "level": 1

  },

  {

  "name": "廣東省",

  "code": 440000000,

  "level": 1

  },

  {

  "name": "廣西壯族自治區(qū)",

  "code": 450000000,

  "level": 1

  },

  {

  "name": "海南省",

  "code": 460000000,

  "level": 1

  }

  ]

  }

  請求參數(shù)說明

  參數(shù)類型是否必填說明

  addr_codenumber否地址行政編碼,不填或者填0時,拉取全國的省級行政編碼

  回包參數(shù)說明

  參數(shù)類型說明

  errcodenumber錯誤碼

  errmsgstring錯誤信息

  addrs_msgObject本行政編碼地址信息

  next_level_addrsArray下一級所有地址信息

  AddrMsg

  參數(shù)類型說明

  namestring地址名稱

  codenumber地址行政編碼

  levelnumber地址級別 1-省級 2-市級 3-區(qū)縣級 4-街道

  返回碼

  返回碼錯誤類型

  -1系統(tǒng)異常

  10021402無效的地址編碼

電話咨詢 預(yù)約演示 0元開店