Get District by Area Code
Fetches a district based on its area code.
Endpoint
Base URL
https://api.wilayah-nusantara.id
or, if running on local
http://localhost:1945
Method and Endpoint
GET /kabupaten/{code}
Route Params
code
: string (required)
Area code of a district.
Responses
200 (success)
Example Request
GET https://api.wilayah-nusantara.id/kecamatan/3674020
Example Response
{
"code": "3674020",
"district": "3674",
"district": "SERPONG"
}
404 (not found)
Example Response
{
"statusCode": 404,
"message": "district not found"
}
500 (server error)
Example Response
{
"statusCode": 500,
"message": "Internal server error"
}