Shop

Address

3 endpoints · https://pos.pages.fm/api/v1

View Markdown

List of provinces and cities

GET/geo/provinces

Get list of provinces and cities

Query parameters

country_codestringrequired

Country code (for example, Vietnam country code is 84)

Default: "84" · Example: "84"
is_newboolean

New province (for country Viet Nam)

Default: false · Example: false
allboolean

All provinces including old and new (for country Viet Nam)

Default: false · Example: false

Responses

object
dataarray<object>
Request
curl "https://pos.pages.fm/api/v1/geo/provinces?api_key=API_KEY&country_code=84"
Response 200
{
  "data": [
    {
      "id": "101",
      "name": "Hà Nội",
      "name_en": "ha noi",
      "new_id": "84_VN101"
    },
    {
      "id": "701",
      "name": "Hồ Chí Minh",
      "name_en": "ho chi minh",
      "new_id": "84_VN129"
    }
  ]
}

List of districts

GET/geo/districts

Get list of districts

Query parameters

province_idstringrequired

Province ID of districts you want to retrieve. Get province ID in api GET /geo/provinces

Example: "101"

Responses

object
dataarray<object>
Request
curl "https://pos.pages.fm/api/v1/geo/districts?api_key=API_KEY&province_id=101"
Response 200
{
  "data": [
    {
      "id": "10101",
      "name": "Quận Ba Đình",
      "name_en": "ba dinh",
      "province_id": "101"
    }
  ]
}

List of communes

GET/geo/communes

Get list of communes

Query parameters

district_idstringrequired

District ID of communes you want to retrieve. Get district ID in api GET /geo/districts

province_idstringrequired

Province ID of communes you want to retrieve. Get province ID in api GET /geo/provinces

Responses

object
dataarray<object>
Request
curl "https://pos.pages.fm/api/v1/geo/communes?api_key=API_KEY&district_id=DISTRICT_ID&province_id=PROVINCE_ID"
Response 200
{
  "data": [
    {
      "district_id": "10101",
      "id": "1010115",
      "name": "Phường Cống Vị",
      "name_en": "cong vi",
      "new_id": null,
      "postcode": null,
      "province_id": "101"
    }
  ]
}