Province API¶
This module allows users to get a list of province, district & ward in Vietnam
Quick reference¶
Resource |
Operation |
Description |
---|---|---|
|
Get list of provinces |
|
|
Get list of districts with {province_id} |
|
|
Get list of wards with {district_id} |
Details¶
-
GET
/api/province/
¶ This function allows users to get a list of provinces in Vietnam
Request:
GET /api/province HTTP/1.1 Host: https://vapi.vnappmob.com Accept: application/json
Response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "results": [ { "province_id": 92, "province_name": "Thành phố Hà Nội", "province_type": "Thành phố Trung ương" } ] }
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – results
-
GET
/api/province/district/
(string: province_id)¶ This function allows users to get a list of districts in Vietnam followed by {province_id}
Request:
GET /api/province/district/{province_id} HTTP/1.1 Host: https://vapi.vnappmob.com Accept: application/json
Response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "results": [ { "district_id": 271, "district_name": "Huyện Ba Vì" } ] }
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – results
-
GET
/api/province/ward/
(string: district_id)¶ This function allows users to get a list of wards in Vietnam followed by {district_id}
Request:
GET /api/province/ward/{district_id} HTTP/1.1 Host: https://vapi.vnappmob.com Accept: application/json
Response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "results": [ { "ward_id": 271, "ward_name": "Thị trấn Tây Đằng" } ] }
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – results