Cities

List cities

POST https://sandbox.mnasati.com/v1/cities

This endpoint allows you to list all cities of a specific country.

Headers

NameTypeDescription

Content-Type

string

Application/JSON

Access Token

string

The JWT key generated using the Authorization method.

Request Body

NameTypeDescription

country_id

integer

The ID number of the country

{
   "status":true,
   "data":[
      {
         "city_id":"1",
         "country_id":"1",
         "name":"Kuwait City",
         "name_ar":"العاصمة",
         "latitude":"29.375606",
         "longitude":"47.977318",
         "status":"1"
      },
      {
         "city_id":"99",
         "country_id":"16",
         "name":"city2",
         "name_ar":"city2",
         "latitude":null,
         "longitude":null,
         "status":"1"
      },
      {
         "city_id":"100",
         "country_id":"16",
         "name":"city3",
         "name_ar":"city3",
         "latitude":null,
         "longitude":null,
         "status":"1"
      }
   ]
}

Examples

import requests

url = "https://sandbox.mnasaticom/v1/cities"

payload = "{\"country_id\":1}"
headers = {
    'Content-Type': "",
    'Authorization-Jwt': ""
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

Last updated