Cities

A city in the T-Gate platform represents a geographical sub-region within a country. Cities sit one level below countries in the address hierarchy: every branch and company address is anchored to a city, and the city's country drives downstream concerns such as locale, dial code, and timezone choices.

For more details on the hierarchical structure and how different entities relate to each other, please refer to General → High Level Structure Guides.

Model Attributes

AttributeDescriptionType
idThe unique identifier of that table entity.Integer
name_enCity name in English.String
name_arCity name in Arabic.String
nameLocalized city name returned according to the request's Accept-Language header. Resolves to name_en for en and to name_ar for ar.String
📘

name VS name_en / name_ar

Endpoints that return a city object always include the raw name_en and name_ar attributes so that consumers can render either translation regardless of the current request locale.

The name attribute is a convenience field resolved on the server side from the Accept-Language header. Applications that already maintain their own localization layer can ignore it and read name_en / name_ar directly.

🔎

Filtering Cities By Country

The cities listing endpoint accepts a country_id filter. Pass it when you want to scope the result set to a single country — for example, when populating a city dropdown after the user has already selected their country.

Note that the country itself is not returned in the city payload; resolve it through the countries endpoint using the same country_id if you need its full attributes (dial_code, short_code, etc.).

🔤

Unique City Names

City names are unique across the entire T-Gate platform — both name_en and name_ar are enforced as globally unique. Two cities in different countries cannot share the same English or Arabic name.

Relationship With Countries

Each city belongs to exactly one country, and a country can host many cities. The relationship is mandatory: a city cannot exist without a parent country.

Note that the partner portal city payload does not include the parent country's id or any embedded country object. To list a country's cities, call the cities endpoint with ?country_id=<id> rather than navigating from a city back to its country.