Get commune by ID
Retrieve detailed information about a single commune, including its parent district and province IDs/names, postal code prefix/range, and the total number of villages within it.
Authorization
ApiKeyAuth x-api-key<token>
API key passed in the x-api-key header. Obtain a key from the developer dashboard. Example: x-api-key: YOUR_API_KEY
In: header
Path Parameters
id*string
Unique identifier of the commune
Format
uuidQuery Parameters
lang?string
Language for the response (en or km)
Default
"en"Value in
- "en"
- "km"
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/communes/beb0bdbe-4858-5cb9-87d6-4885734f38c0?lang=en"{ "statusCode": 200, "data": { "id": "beb0bdbe-4858-5cb9-87d6-4885734f38c0", "name": "Phnum Srok", "type": "commune", "postal_code_prefix": "111", "postal_code_range": "11100-11199", "district_id": "63c022ca-68c7-5074-b508-9b78f745ee8c", "district_name": "Mongkol Borei", "province_id": "79974b80-2e1c-5ffb-9e1d-caba0a2d0a0e", "province_name": "Banteay Meanchey", "total_villages": 12 }, "metadata": { "correlationId": "01a0642a-d55f-70f8-b40f-2ce1c5c12035" }}