-
Notifications
You must be signed in to change notification settings - Fork 1
Show a kode wilayah
Aaron Christopher edited this page Jun 13, 2022
·
1 revision
Show a single kode wilayah.
URL : /kode-wilayah/:pk/
URL Parameters : pk=[string]
where pk
is the kodewilayah itself.
Method : GET
Auth required : NO
Permissions required : NONE
Data: {}
Condition : If kode wilayah exists.
Code : 200 OK
Content example
{
"data": {
"kodewilayah": "357807",
"provinsi": "Jawa Timur",
"kabupatenkota": "Kota Surabaya",
"kecamatan": "Genteng"
}
}
Condition : If pk
parameter is not a valid kode wilayah (6 integers).
Code : 400 BAD REQUEST
Content :
{
"statusCode": 400,
"error": "Bad Request",
"message": "params/kode must match pattern \"^\\d{6}$\""
}
Condition : If kode wilayah with given pk
does not exist.
Code : 404 NOT FOUND
Content :
{
"message": "Kode wilayah not found",
"error": "Not Found",
"statusCode": 404
}
Copyright 2022 Capstone Bangkeith