List Cities
GET
https://api.salla.dev/admin/v2/countries/{country}/citiesThis endpoint allows you to list all available cities for a specific country by passing the country
as a path parameter.
:::note
Country details will also be returned in the payload.
:::
Request
The Country ID. List of Country IDs from here
The Pagination page number
Request samples
Responses
Response status code, a numeric or alphanumeric identifier used to convey the outcome or status of a request, operation, or transaction in various systems and applications, typically indicating whether the action was successful, encountered an error, or resulted in a specific condition.
Response flag, boolean indicator used to signal a particular condition or state in the response of a system or application, often representing the presence or absence of certain conditions or outcomes.
A unique identifier or code assigned to a specific city.
The lable used for a specific urban area or municipality within a country or region.
City name expressed in English characters.
For a better response behavior as well as maintain the best security level, All retrieving API endpoints use a mechanism to retrieve data in chunks called pagination. Pagination working by return only a specific number of records in each response, and through passing the page number you can navigate the different pages.
Number of returned results.
Number of all results.
Number of results per page.
Number of current page.
Number of total pages.
Array of linkes to next and previous pages.
{
"status": 200,
"success": true,
"data": [
{
"id": 1,
"name": "الرياض",
"name_en": "Riyadh",
"country_id": 1473353380
},
{
"id": 2,
"name": "جدة",
"name_en": "Jeddah",
"country_id": 1473353380
},
{
"id": 3,
"name": "مكة",
"name_en": "Mecca",
"country_id": 1473353380
},
{
"id": 4,
"name": "المدينة المنورة",
"name_en": "Medina",
"country_id": 1473353380
},
{
"id": 5,
"name": "الدمام",
"name_en": "Dammam",
"country_id": 1473353380
},
{
"id": 6,
"name": "الأحساء",
"name_en": "Al Ahsa",
"country_id": 1473353380
},
{
"id": 7,
"name": "القطيف",
"name_en": "Al Qatif",
"country_id": 1473353380
},
{
"id": 8,
"name": "خميس مشيط",
"name_en": "Khamis Mushait",
"country_id": 1473353380
},
{
"id": 9,
"name": "المظيلف",
"name_en": "Almuzaylif",
"country_id": 1473353380
},
{
"id": 10,
"name": "تبوك",
"name_en": "Tabuk",
"country_id": 1473353380
},
{
"id": 11,
"name": "الهفوف",
"name_en": "Al Hofuf",
"country_id": 1473353380
},
{
"id": 12,
"name": "المبرز",
"name_en": "Al Mubarraz",
"country_id": 1473353380
},
{
"id": 13,
"name": "نجران",
"name_en": "Najran",
"country_id": 1473353380
},
{
"id": 14,
"name": "حفر الباطن",
"name_en": "Hafar Al Batin",
"country_id": 1473353380
},
{
"id": 15,
"name": "الجبيل",
"name_en": "Al Jubail",
"country_id": 1473353380
}
],
"country": {
"id": 1473353380,
"name": "السعودية",
"code": "SA"
},
"pagination": {
"count": 15,
"total": 716,
"perPage": 15,
"currentPage": 1,
"totalPages": 48,
"links": {
"next": "https://api.salla.dev/admin/v2/countries/1473353380/cities?page=2"
}
}
}