Province API

This module allows users to get a list of province, district & ward in Vietnam

Quick reference

Resource

Operation

Description

  1. Province

GET /api/province/

Get list of provinces

  1. District

GET /api/province/district/(string:province_id)

Get list of districts with {province_id}

  1. Ward

GET /api/province/ward/(string:district_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
Status Codes
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
Status Codes
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
Status Codes