Skip to content

Get Administrative Districts

Description

取得行政區列表。

Resource

GET /v1/administrative_district

Authorization

採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login

Query Parameters

Name Type Description
city_id string 縣市代碼

Request Example

GET /v1/administrative_district?city_id=2

Response

{
    "administrative_districts": [
        {
            "id": "1",
            "name": "中正區",
            "position": "1"
        },
        {
            "id": "2",
            "name": "大同區",
            "position": "2"
        },
        {
            "id": "3",
            "name": "中山區",
            "position": "3"
        },
        {
            "id": "4",
            "name": "松山區",
            "position": "4"
        },
        {
            "id": "5",
            "name": "大安區",
            "position": "5"
        },
        {
            "id": "6",
            "name": "萬華區",
            "position": "6"
        },
        {
            "id": "7",
            "name": "信義區",
            "position": "7"
        },
        {
            "id": "8",
            "name": "士林區",
            "position": "8"
        },
        {
            "id": "9",
            "name": "北投區",
            "position": "9"
        },
        {
            "id": "10",
            "name": "內湖區",
            "position": "10"
        },
        {
            "id": "11",
            "name": "南港區",
            "position": "11"
        },
        {
            "id": "12",
            "name": "文山區",
            "position": "12"
        }
    ]
}

Response Body Parameters

Name Type Description
administrative_districts AdministrativeDistrict[] 行政區列表

Response Body Parameters - AdministrativeDistrict

Name Type Description
id string 行政區代碼
name string 行政區名稱
position string 排序位置

Error Response

HTTP Status Code Description
404 Not Found 查無資料