Endpoint
GET http://api.opencube.tw/twzipcode
Request
| # | 參數名稱 | 必填 | 說明 |
|---|
| 1 | city | 否 |
縣市, ex:台北市、新北市, 若未輸入預設為全部.
縣市資料請參考 台灣縣市列表 |
| 2 | district | 否 |
行政區, ex:中山區、萬華區, 若未輸入預設為全部.
|
| 3 | zip_code | 否 |
3碼郵遞區號, ex:104、105, 若未輸入預設為全部.
|
Response
| # | 參數名稱 | 說明 |
|---|
| 1 | city | 縣市 |
| 2 | district | 行政區 |
| 3 | zip_code | 3碼郵遞區號 |
| 4 | lat | 緯度 |
| 5 | lng | 經度 |
Response Example
{"data":[{"zip_code":"300","district":"東區","city":"新竹市","lat":24.7903,"lng":120.993},{"zip_code":"300","district":"北區","city":"新竹市","lat":24.8227,"lng":120.949},{"zip_code":"300","district":"香山區","city":"新竹市","lat":24.771,"lng":120.924}],"status":200}
錯誤代碼
| status | 說明 |
|---|
| 200 | 成功 |
| 400 | 發生錯誤 |
| 404 | Endpoint錯誤 |
| 500 | 系統錯誤 |