Conditions¶
Overview¶
Conditions represent dynamic or situational information that affects tours or other spatial objects, such as closures, detours, notices, or current conditions. They are designed as standalone, reusable resources that can be linked to tours and other spatial entities.
Data Model Reference¶
The complete data model definition for a Condition is available here: Condition.
A Condition is based on schema.org/Condition and extended with domain-specific properties used across the discover.swiss ecosystem.
Condition as a Standalone Resource¶
Conditions are first-class objects and can be retrieved independently via the Condition API endpoint.
A full Condition object may include:
-
Identification
@ididentifier
-
Classification
type(alwaysschema.org/Condition)additionalType(e.g.Closure,Detour)
-
Spatial information
geo(point)geoShape(line or polygon)
-
Context
categorytagcontainedInPlace
-
Description
namedisambiguatingDescription
-
Metadata
lastModifiedavailableDataLanguagelicensedataGovernance(provider and source information)
Example: Condition Response (Partial)¶
The following example shows a partial Condition response. Some properties have been omitted for readability.
{
"@id": "https://api.discover.swiss/info/v2/conditions/con_sx2_t97-cfhdbbg",
"identifier": "con_sx2_t97-cfhdbbg",
"type": "schema.org/Condition",
"additionalType": "Detour",
"name": "Geänderte Streckenführung, Sierre",
"disambiguatingDescription": "Bitte beachten Sie die geänderte Streckenführung und folgen Sie der Signalisation vor Ort.",
"geo": {
"latitude": 46.27994,
"longitude": 7.52335
},
"availableDataLanguage": ["de", "en", "fr", "it"],
"license": "CC BY",
"lastModified": "2025-10-15T21:11:19Z"
}
Linking Conditions to Other Objects¶
Conditions can be linked to tours or other spatial objects using the spatialCoverage property.
Lightweight References (Simplex)¶
When embedded in another object, Conditions are represented as lightweight references (simplex objects) within the spatialCoverage property. The simplex only contains a minimal subset of properties to be able to display the condition on the tour.
Example:
"spatialCoverage": [
{
"@id": "https://api.discover.swiss/info/v2/conditions/con_sx2_t97-cfhdbbg",
"identifier": "con_sx2_t97-cfhdbbg",
"type": "schema.org/Condition",
"additionalType": "Detour",
"name": "Geänderte Streckenführung, Sierre"
},
{
"@id": "https://api.discover.swiss/info/v2/conditions/con_sx2_s1t-cfijecg",
"identifier": "con_sx2_s1t-cfijecg",
"type": "schema.org/Condition",
"additionalType": "Closure",
"name": "Umleitung, Pramont"
}
]
Design Rationale¶
- Keeps tour payloads small
- Avoids duplication of large geometry and metadata
- Enables reuse of Conditions across multiple objects
- Ensures consistent updates of condition data
Retrieving Full Condition Details¶
If an application requires all properties of a Condition (e.g. geometry, affected categories) use the @id or identifier and request the Condition directly via the Condition API endpoint. Clients must not assume that embedded references contain complete data.
Condition Types (additionalType)¶
Conditions are classified using the additionalType property. Currently used types include:
ClosureFull or partial closure of a route or areaDetourChanged route guidance or alternative routingCurrentConditionOngoing situational information (e.g. surface state)NoticeInformational notices without direct restrictions
Integrations should be resilient to new additional types in the future.
Data Sources and Provenance¶
Conditions are aggregated from trusted external providers and clearly attributed using dataGovernance.
Currently supported sources include:
- SchweizMobil: Official ASTRA closures and route changes
- OutdoorActive: OutdoorActive conditions and notices
Each Condition includes:
- Source identifier
- Provider metadata
- License information
- Last modification timestamp
This ensures transparency, traceability, and correct attribution.