Region (Semantic Module)
The Region semantic module standardizes text properties that represent regional administrative subdivisions, such as states, provinces, cantons, prefectures, or territories (for example, "California", "Ontario", or "Bavaria").
It verifies that regional identifiers are clean text strings and automatically strips extraneous whitespace, ensuring consistent regional filtering and tax calculations across your data records.
Technical Specifications
Section titled “Technical Specifications”| Attribute | Specification |
|---|---|
| Scope | Property (Applied to a text property) |
| Data Type | String |
| Default Max Length | 255 characters |
| Whitespace Handling | Automatically trimmed on Create and Update operations |
Key Capabilities
Section titled “Key Capabilities”1. Automatic Whitespace Sanitization
Section titled “1. Automatic Whitespace Sanitization”Accidental spaces entered during user input (such as " Washington ") are trimmed automatically to "Washington", preventing duplicate categories or fragmented regional reporting.
2. Broad Administrative Support
Section titled “2. Broad Administrative Support”Accommodates all administrative naming styles—including full state names ("California"), two-letter abbreviations ("CA"), or international prefectures and cantons ("Tokyo", "Zurich").
API Lifecycle Examples
Section titled “API Lifecycle Examples”1. Standard Region Input
Section titled “1. Standard Region Input”POST /addressesContent-Type: application/json
{ "region": " Quebec "}Server Response (201 Created):
{ "data": { "id": "addr_301", "region": "Quebec" }}2. Validation Failure (Invalid Data Type)
Section titled “2. Validation Failure (Invalid Data Type)”If a non-string value is passed in the request:
{ "region": ["CA", "NY"]}Server Response (400 Bad Request):
{ "type": "https://docs.apinow.app/errors/validation", "title": "Validation Error", "status": 400, "code": "E_VALIDATION_ERROR", "detail": "Property 'region' must be a string."}Validation Rules & Modeling Guidelines
Section titled “Validation Rules & Modeling Guidelines”- Applicable Property Types: Apply to a
Stringproperty in the Domain Modeler. - Property Length Constraints: String properties default to a Maximum Length of 255 characters. If you choose to restrict your region field to two-letter state abbreviations, you can adjust the Minimum and Maximum Length constraints to
2in the property panel.