GET /api/provinces
Returns all active provinces. Authentication: None Request: No parameters.Response Fields
array
Array of active province objects.
integer
Province ID.
string
Province name.
Example Request
Example Response
GET /api/counties/
Returns all active counties within the given province. Authentication: NonePath Parameters
integer
required
The province ID whose counties you want to retrieve.
Example Request
Example Response
GET /api/districts/
Returns all active districts within the given county. Authentication: NonePath Parameters
integer
required
The county ID whose districts you want to retrieve.
Example Request
Example Response
GET /api/cities/
Returns all active cities within the given district. Authentication: NonePath Parameters
integer
required
The district ID whose cities you want to retrieve.
Example Request
Example Response
GET /api/villages/
Returns all active villages within the given district. Authentication: NonePath Parameters
integer
required
The district ID whose villages you want to retrieve.
Example Request
Example Response
GET /api/geographic/continents
Returns all continents. This is the entry point for the full hierarchical children traversal described below. Authentication: None Request: No parameters.Response Fields
array
Flat JSON array (not wrapped in a
data key) of continent objects, each with id and name.Example Request
Example Response
The
/api/geographic/continents response is a bare JSON array, not an object with a data key — unlike the /api/provinces family of endpoints.GET /api/geographic///children
Returns the direct children of a given geographic entity at any level of the hierarchy. This is the recommended endpoint for building cascading location selectors because it covers the full hierarchy in a single consistent shape. Authentication: NonePath Parameters
string
required
The level of the parent entity. Accepted values (case-insensitive):
string
required
The ID of the parent entity. For the
section level, city results use the prefixed format city_{id} and rural results use rural_{id} — pass these prefixed strings as parentId when fetching the next level down (e.g. city_30 to get regions of city 30).Response Fields
array
A flat JSON array of child objects. Each item has at minimum
id and name.section (district) level, each city item has a prefixed id and each rural item has a rural_ prefix:
Example Requests
Example Response — province/1/children
Example Response — section/20/children (mixed cities and rurals)
Building a Cascading Location Selector
Here is the recommended sequence for a complete location picker starting at continent level:GET /api/geographic/continents— populate the continent dropdownGET /api/geographic/continent/{continentId}/children— populate countriesGET /api/geographic/country/{countryId}/children— populate provincesGET /api/geographic/province/{provinceId}/children— populate countiesGET /api/geographic/county/{countyId}/children— populate districtsGET /api/geographic/section/{districtId}/children— populate cities and rurals (note prefixed IDs)GET /api/geographic/city/{city_N}/children— populate regions within a city
/api/provinces, /api/counties/{id}, /api/districts/{id}, and /api/cities/{id} endpoints instead.