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
| Attribute | Description | Type |
|---|---|---|
| id | The unique identifier of that table entity. | Integer |
| name_en | City name in English. | String |
| name_ar | City name in Arabic. | String |
| name | Localized 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_arEndpoints that return a city object always include the raw
name_enandname_arattributes so that consumers can render either translation regardless of the current request locale.The
nameattribute is a convenience field resolved on the server side from theAccept-Languageheader. Applications that already maintain their own localization layer can ignore it and readname_en/name_ardirectly.
Filtering Cities By CountryThe cities listing endpoint accepts a
country_idfilter. 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_idif you need its full attributes (dial_code,short_code, etc.).
Unique City NamesCity names are unique across the entire T-Gate platform — both
name_enandname_arare 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.
