Bu API, belirli bir şehire bağlı ilçeleri listelemesini sağlar.
{{APP_URL}}/api/v1/countries/{country_id}/states/{state_id}/citiesGETapplication/jsonAPIKEY| Parametre Adı | Parametre Tipi | Zorunluluk | Açıklama |
|---|---|---|---|
country_id |
Integer | Zorunlu | Ülke ID'si |
state_id |
Integer | Zorunlu | Şehir ID'si |
Aşağıda, API isteği için bir örnek HTTP raw request bulunmaktadır.
GET {{APP_URL}}/api/v1/countries/1/states/1/cities
Content-Type: application/json
APIKEY: {{APIKEY}}
Başarılı bir istekte, API aşağıdaki gibi bir yanıt döndürecektir:
{
"status": true,
"message": null,
"data": [
{
"id": 1,
"name": "Ashkāsham"
},
{
"id": 2,
"name": "Fayzabad"
},
{
"id": 3,
"name": "Jurm"
},
{
"id": 4,
"name": "Khandūd"
},
{
"id": 5,
"name": "Rāghistān"
},
{
"id": 6,
"name": "Wākhān"
}
]
}
API isteği başarısız olursa, API aşağıdaki gibi bir hata yanıtı döndürecektir:
{
"status": false,
"errors": [
{
"message": "City not found"
}
]
}