开放平台

扒书 ERP Open API

省市区树

一次性返回省、市、区三级行政区划树,地址选择器直接渲染成三级联动。

请求方式GET/POST
接口路径/api/region/tree
Content-Type-
鉴权免登录(无需 Token)

curl 调用

curl -s 'https://www.8shu8.com/api/region/tree'

响应示例

data 为数组,每项结构见下方字段说明。

{
  "code": 200,
  "message": "操作成功",
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "string",
      "value": "string",
      "children": [
        {
          "id": "...",
          "name": "...",
          "value": "...",
          "children": "..."
        }
      ]
    }
  ]
}