Get Cities
Description
取得縣市列表。
Resource
GET /v1/cities
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Query Parameters
| Name | Type | Description |
|---|---|---|
| area | string (enum) |
區域代碼 ALLOWED VALUES:
|
Request Example
GET /v1/cities?area=NORTH
Response
{
"cities": [
{
"id": "1",
"name": "基隆市",
"position": "1",
"area_id": "NORTH",
"area_name": "北部"
},
{
"id": "2",
"name": "台北市",
"position": "2",
"area_id": "NORTH",
"area_name": "北部"
},
{
"id": "3",
"name": "新北市",
"position": "3",
"area_id": "NORTH",
"area_name": "北部"
},
{
"id": "4",
"name": "桃園縣",
"position": "4",
"area_id": "NORTH",
"area_name": "北部"
},
{
"id": "5",
"name": "新竹市",
"position": "5",
"area_id": "NORTH",
"area_name": "北部"
},
{
"id": "6",
"name": "新竹縣",
"position": "6",
"area_id": "NORTH",
"area_name": "北部"
},
{
"id": "7",
"name": "苗栗縣",
"position": "7",
"area_id": "NORTH",
"area_name": "北部"
}
]
}
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| cities | City | 縣市列表 |
Response Body Parameters - City
| Name | Type | Description |
|---|---|---|
| id | string | 縣市代碼 |
| name | string | 縣市名稱 |
| position | string | 排序位置 |
| area_id | string | 區域代碼 |
| area_name | string | 區域名稱 |