PostalCode
Represents a postal/zip code entry with geographic coordinates, timezone information, and optional custom values. Postal codes are scoped per organization and linked to Country and State entities.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
id | int | Auto | Primary key |
organizationId | int | Yes | Organization scope |
code | string | Yes | The postal/zip code value |
countryCode | string | Yes | ISO country code (FK to Country) |
placeName | string | Yes | Place/city name for this postal code |
stateCode | string? | No | State/province code (FK to State) |
accuracy | AccuracyTypes? | No | Accuracy level of the coordinates |
timeZone | string? | No | IANA timezone identifier (e.g., America/Chicago) |
customValues | Dictionary<string, object>? | No | Arbitrary key-value pairs (stored as jsonb) |
location | Point? | No | Geographic coordinates (longitude, latitude) using WGS 84 (SRID 4326) |
Navigation Properties
| Property | Type | Description |
|---|---|---|
country | Country? | Related Country entity |
state | State? | Related State entity |
AccuracyTypes Enum
| Value | Name | Description |
|---|---|---|
| 1 | Region | Region-level accuracy |
| 2 | Municipality | Municipality-level accuracy |
| 3 | Neighborhood | Neighborhood-level accuracy |
| 4 | Place | Place-level accuracy |
| 5 | Street | Street-level accuracy |
| 6 | Centroid | Centroid-level accuracy |
GraphQL
Available via the postalCode GraphQL type. Exposes all properties including timeZone and customValues (as AnyType).
Mutations
The entity supports the following mutations via setter methods:
ChangeCode(code)— Update the postal code valueChangePlaceName(placeName)— Update the place nameChangeCoordinates(latitude, longitude, accuracy)— Update lat/lng and accuracyChangeCountry(country)/ChangeCountryCode(countryCode)— Update country referenceChangeState(state)/ChangeStateCode(stateCode)— Update state referenceChangeTimeZone(timeZone)— Update the IANA timezone identifierChangeCustomValues(customValues)— Merge custom key-value pairsChangeLatitude(latitude)/ChangeLongitude(longitude)— Update individual coordinates