--- title: "Cities" slug: "base-city" updated: 2026-05-28T09:14:27Z published: 2026-05-28T09:14:27Z canonical: "docs.lobstersoftware.com/base-city" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Cities *See also*: [Addresses](/v1/docs/en/base-address) The "City" (`City`) entity type is used to manage master data for location details that are automatically used to look up information when editing [Addresses](/v1/docs/en/base-address) in the context of the **Lobster Data Platform** (for details, see "Look up locations in addresses" below). The [Cities](/v1/docs/en/base-city) menu item can be found in the [Main menu](/v1/docs/en/gui-main-menu) in the "Administration/Master data" menu node, provided sufficient permissions are available. It opens a combined view for the "City" (`City`) entity type. - **View name:** `de.lobster.scm.base.address::City|listDetailsWindow` - **Menu node name:** `admin/masterData/cities` Access to [Cities](/v1/docs/en/base-city) is controlled by the permissions for the "Administration/MasterData/Cities" node (`administration/masterData/cities`). --- > [!WARNING] > **IMPORTANT:** > > - Although an "owner" (`ownerId`) is formally identified for each entity of the type "City" (`City `) , there are effectively no owner restrictions for this entity type. > - The look-up function and access to city entities via the [Search API](/v1/docs/en/common-search-api) is completely unrestricted and not tied to an explicit permission to "read" (`read`) the [Role of session](/v1/docs/en/base-session-role-value) . > - The "Display" permission controls whether the menu item for [Cities](/v1/docs/en/base-city) appears in the [Main menu](/v1/docs/en/gui-main-menu) , via which the overview can be opened. > - Other permissions (create, change, delete, etc.) control access to corresponding generic functionalities for [Cities](/v1/docs/en/base-city), regardless of whether they are displayed in a view or how it was opened. --- ## Overview for "Cities" **NOTE:** [Custom overviews](/v1/docs/en/administration-designer-client-preferences-overview) and [Input forms](/v1/docs/en/base-entity-form) are not supported for [Cities](/v1/docs/en/base-city). The following screenshot shows the default overview with sample data: ![images/download/attachments/201680883/image-2025-6-2_9-18-39-version-1-modificationdate-1748848719244-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-6-2_9-18-39-version-1-modificationdate-1748848719244-api-v2.png) ## Data model of the "City" entity | Localization | Data field | Type | Transfer to [Addresses](/v1/docs/en/base-address) | Contents | Example | | --- | --- | --- | --- | --- | --- | | **ID** | `id` | `Long` | *n/a* | Primary key for the `City` entity | `54321` | | **Created** | `created` | `Timestamp` | Time when the entity was first saved | `2025-05-27T09:57:08.639+02:00` | | **Creator** | `creatorId` | `Long` | Reference to the creator (user/guest user) | `4711 / -4711` | | **Last modified** | `lastModified` | `Timestamp` | Time at which the entity was last updated | `2025-05-27T12:34:56.790+02:00` | | **Last modifier** | `lastModifierId` | `Long` | Reference to the creator of the last update (user/guest user) | `4711 / -4711` | | **Owner** | `ownerId` | `Long` | Reference to the owner of the entity (company account) | `123` | | **Country*** | `country` | [Country](/v1/docs/en/core-country) | "country" (`countryCode`) | Reference to an enumeration value (see [Enumerations](/v1/docs/en/core-dynamic-enum-definition)) of the [Country](/v1/docs/en/core-country) type | "Switzerland" (`CH`) | | **Place name*** | `placeName` | `String` | "City" (`city`) | Plain text for the name of a city | `Vessy` | | **Postal code*** | `postalCode` | `String` | "Zip code" (`zipcode`) | Plain text for the postcode of a city | `1234` | | **State** | `state` | `String` | "State province" (`stateProvince`) | Plain text for the name of a sub-area directly below the **Country** level | `Genéve` | | **State code** | `stateCode` | `String` | "State code" (`stateCode`) | Identification of a sub-area directly below the **Country** level | `GE` | | **County*** | `county` | `String` | *n/a* | Plain text for the name of a sub-area directly below the **State** level | `Geneva` | | **County code*** | `countyCode` | `String` | Identification of a sub-area directly below the **State** level | `2500` | | **Community** | `community` | `String` | Plain text for the name of a sub-area directly below the **County** level | `Veyrier` | | **Community code** | `communityCode` | `String` | Identification of a sub-area directly below the **County** level | `6645` | | **Latitude** | `lattitude` | `Double` | Geographical latitude as a decimal number in degrees (±90°) with north (>0) and south (<0) | `46.1831` | | **Longitude** | `longitude` | `Double` | Geographical longitude as a decimal number in degrees (±180°) with east (>0) and west (<0) | `6.1668` | | **Accuracy** | `accuracy` | `Integer` | Number of decimal places for the geocoordinates (**Latitude**, **Longitude**) | `4` | **)* The asterisk (*) in the localization indicates fields that are indexed in the database and should therefore preferably be used for [Restrictions](/v1/docs/en/core-i-search-restriction) (see [Search API](/v1/docs/en/common-search-api)). ## Look up cities in addresses --- **NOTE:** The **Lobster Data Platform** does not provide any data for [Cities](/v1/docs/en/base-city) by default. The example for the [Batch import](/v1/docs/en/core-batch-import) demonstrates the import of such data from a public data source ([www.geonames.org](http://www.geonames.org)). --- As soon as one of the **City** (`city`) or **Zip code** (`zipcode`) address fields is changed when editing details for [Addresses](/v1/docs/en/base-address) in a data input form (e.g. for [Users](/v1/docs/en/base-user), [Companies/Clients](/v1/docs/en/base-company-account) or [Address book entries](/v1/docs/en/base-address-book-entry)), a [Search](/v1/docs/en/core-search) for [Cities](/v1/docs/en/base-city) starts automatically, which takes into account the entry in the changed field and any selection made for the **Country code** (`countryCode`) address field. | ![images/download/attachments/201680883/image-2025-6-2_9-13-35-version-1-modificationdate-1748848414753-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-6-2_9-13-35-version-1-modificationdate-1748848414753-api-v2.png) | | --- | | ![images/download/attachments/201680883/image-2025-6-2_9-14-12-version-1-modificationdate-1748848452137-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-6-2_9-14-12-version-1-modificationdate-1748848452137-api-v2.png) ▼ | ![images/download/attachments/201680883/image-2025-6-2_9-14-51-version-1-modificationdate-1748848491366-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-6-2_9-14-51-version-1-modificationdate-1748848491366-api-v2.png) ▼ | | ![images/download/attachments/201680883/image-2025-6-2_9-15-16-version-1-modificationdate-1748848515678-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-6-2_9-15-16-version-1-modificationdate-1748848515678-api-v2.png) | - For the **City** (`city`) or **Zip code** (`zipcode`) address fields, a *dropdown* appears that lists [Cities](/v1/docs/en/base-city) whose "Place name" (`placeName`) *or* "Postal code" (`postalCode`) begins with the character string entered. - It does not matter whether the entry is made for the **Zip code** or the **City** address field in the input form. It is therefore also possible to start entering the name of a city in the **Zip code** address field (see example above right). A selection in the **Country code** (`countryCode`) address field acts as a restriction for the *dropdown*. Unchanged content for the **City** (`city`) or **Zip code** (`zipcode`) address fields, on the other hand, has no effect on the results in the *dropdown*: | ![images/download/attachments/201680883/image-2025-6-2_9-15-16-version-1-modificationdate-1748848515678-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-6-2_9-15-16-version-1-modificationdate-1748848515678-api-v2.png) | | --- | | ![images/download/attachments/201680883/image-2025-6-2_9-16-5-version-1-modificationdate-1748848565000-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-6-2_9-16-5-version-1-modificationdate-1748848565000-api-v2.png) | | ![images/download/attachments/201680883/image-2025-6-2_9-16-43-version-1-modificationdate-1748848603036-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-6-2_9-16-43-version-1-modificationdate-1748848603036-api-v2.png) | When selecting a result from the *dropdown*, the values for "Country", "Postal code", "Place name", "State" and "State code" are transferred from the city list to the corresponding address fields (see "Transfer to [Addresses](/v1/docs/en/base-address)" column in the table above). **IMPORTANT:** The transfer of [Cities](/v1/docs/en/base-city) data to address fields affects all address fields mentioned, regardless of whether they are represented by a [Text field](/v1/docs/en/custom-custom-text-field) element in the data input form or not. Existing values for these fields are overwritten or even deleted if there is no value for the selected "City" (`City`).