GetCities

Endpoint

Overview

The "GetCities" endpoint is a GET request. It is used to retrieve a list of cities that belong to a certain county. Also, you can search for a specific city name in a certain country. Detailed functionality of how to use this endpoint is explained in the Shipping section.

The endpoint on Swagger is: Shipping_GetCities.

Now, we are going to declare the endpoint and its models along with each accepted parameter and possible value.

📘

Request Header

Add "Authorization": "Bearer {Token}" to request header. Token of demo configuration can be found here.


Request Model

The request is a GET request with the following parameters:

Input Parameter

Type

Description

shippingMethod

integer

1 for DHL
2 for ARAMEX

countryCode

string

The country code retrieved from the GetCountries endpoint.

searchValue

string, optional

The search key that will filter the cities by names


Response Model

After viewing the Response Model that you will get as a result of your request, here, you will find full details about the Data Model of this API endpoint. Let's check it and its contents.

Response Field

Type

Description

CountryCode

string

The country code of the retrieved cities.

CityNames

Array of strings

List of cities names provided for the specified shipping method.


Sample Message

/v2/Getcities?shippingMethod=1&countryCode=ae&searchValue=ABU
{
  "IsSuccess": true,
  "Message": null,
  "FieldsErrors": null,
  "Data": {
    "CountryCode": "AE",
    "CityNames": [
      "ABU DHABI",
      "ABU DHABI CITY",
      "ABU HAIL, DUBAI",
      "AL MARKAZ IND. PARK ABU DHABI",
      "BADA ZAYED, ABU DHABI",
      "BARAKA, ABU DHABI",
      "GHAYATHI, ABU DHABI",
      "GHUWAIFAT, ABU DHABI",
      "HAMIM, ABU DHABI",
      "JEBEL DHANNA, ABU DHABI",
      "MIRFA, ABU DHABI",
      "RUWAIS, ABU DHABI",
      "SILA, ABU DHABI",
      "SWEIHAN, ABU DHABI",
      "TARIF, ABU DHABI"
    ]
  }
}


Did this page help you?