Infocenter service endpoints¶
- For general information see How to query the infocenter.
- Technical definitions of each API, sample code, test UI and Open API definitions to download you can find in the developer portal.
General headers¶
Header Name | Type | Description |
---|---|---|
Ocp-Apim-Subscription-Key | string | Appropriate subscription key you can get in the developer portal |
Accept-Timezone | string | Supply a TimeZone id property acquired from Infocenter /timezones route or IANA code in order to get data with desired time offset. The default is UTC. |
categoryVersion | string | Use to filter categories by version. Possible values: ch - for old categories (used by default), sui - for new ones. |
General query parameters¶
Parameter Name | Type | Description |
---|---|---|
project | string | REQUIRED FOR MOST OF ENDPOINTS! Name of project to query data. Should be existing project in system with matching partner acronym from request |
updatedSince | DateTime | to get changed data only |
source | string | filter by datasource. Possible values see List of data sources |
continuationToken | string | continuation token for paging read about paging |
top | int | number of next set of entities read about paging |
category | string | identifier of category (members of categories in the tree below are part of the result too) |
containedInPlace | string | identifier of parent place → filter by region (members of regions in the tree below are part of the result too -> Tarasp -> Inn -> Graubünden -> Schweiz) |
additionalType | string | filter by class |
select | string | list of object properties to get in a response |
includeCount | bool | if true - adds count field to response object with total number of entities after applying filters. Warning: usage of this query param will slow down query and is not recommended to use in every query |
identifiers | string | list of identifiers to query joined by ',' |
descriptionMode | string | defines presentation of description. Possible values [full, splitToAdditionalProperty], "full" by default. Read more about descriptionMode |
includeAllPhotos | bool | use to include all photos in response, otherwise images with low confidence will be skipped. false by default. |
scope | string | Value scope. If a backend system/CMS/PIM (for example contentdesk.io) supports different scopes on some properties ("different values for different client application"), the client application calling can add that scope-name in this header. We then deliver the scope-specific values of some multilingual properties (name, description, etc.). If there is no specific value in the current language and scope we fall back to the regular values in the requested language. |
geo location | coming soon |
Places¶
Route | Response entity |
---|---|
/accommodations | AccommodationsResponse |
/accommodations/{id} | Accommodation |
/civicstructures | CivicStructuresResponse |
/civicstructures/{id} | CivicStructure |
/conditions | ConditionsResponse |
/conditions/{id} | Condition |
/foodestablishments | FoodEstablishmentsResponse |
/foodestablishments/{id} | FoodEstablishment |
/localbusinesses | LocalBusinessesResponse |
/localbusinesses/{id} | LocalBusiness |
/lodgingbusinesses | LodgingBusinessesResponse |
/lodgingbusinesses/{id} | LodgingBusiness |
/places | PlacesResponse |
/places/{id} | Place |
/skiresorts | SkiResortsResponse |
/skiresorts/{id} | SkiResort |
/tours | ToursResponse |
/tours/{id} | Tour |
/webcams | WebcamsResponse |
/webcams/{id} | Webcam |
Products¶
Route | Response entity |
---|---|
/products | ProductsResponse |
/products/{id} | Product |
/productVariants/{productVariantId}/products | Product |
Events¶
Route | Response entity |
---|---|
/events | EventsResponse |
/events/{id} | Event |
Creative works¶
Route | Response entity |
---|---|
/creativeWorks | CreativeWorksResponse |
/creativeWorks/{id} | CreativeWork |
/imageObjects | ImageObjectsResponse |
/imageObjects/{id} | ImageObject |
/mediaObjects | MediaObjectsResponse |
/mediaObjects/{id} | MediaObject |
/audioObjects | AudioObjectsResponse |
/audioObjects/{id} | AudioObject |
/videoObjects | VideoObjectsResponse |
/videoObjects/{id} | VideoObject |
/reviews | ReviewResponse |
/reviews/{id} | Review |
Tags¶
Tip
Endpoints DO NOT require project query param
Route | Response entity |
---|---|
/tags | TagsResponse |
Categories¶
Tip
Endpoints DO NOT require project query param
Route | Response entity | Query parameters | Description |
---|---|---|---|
/categories | CategoriesResponse | rootObjectsOnly (bool): to get root categories only parentCategory (string): to get children of defined category |
Delivered as a flat list |
/categories/{id} | Category | ||
/categories/{id}/tree | CategoryTreeItem | Category tree starting from defined category |
Amenity features¶
Tip
Endpoints DO NOT require project query param
Route | Response entity | Query parameters |
---|---|---|
/amenities | LocationFeatureSpecification[] | additionalType (string): filter by additional type (feature group) placeFeatures (bool): filter by place features lodgingBusinessFeatures (bool): filter by logding business features accommodationFeatures (bool): filter by accommodation features |
/amenities/{id} | LocationFeatureSpecification |
Regions / AdministrativeArea¶
Tip
Endpoints DO NOT require project query param
Regions form a tree similar to categories and can be used as a navigation for places as well. Regions are modeled as AdministrativeAreas in schema.org and we do the same.
Route | Request parameter | Response entity |
---|---|---|
/areas | (General query parameters) | AdministrativeAreasResponse |
/areas/{id} | AdministrativeArea | |
/areas/{id}/tree | levels: controls how deep the tree should go. default = 1 adminAreasOnly: if set to false all types of areas are included (see below). default = true |
AdministrativeAreaTreeItem |
additionalType | is admin area The ones marked true are included in the tree request with adminAreasOnly=true (default). They form useful tree structures. The others lay accross over the others. |
---|---|
schema.org/Country | true |
schema.org/State | true |
discover.swiss/CustomArea | true |
discover.swiss/District | true |
schema.org/City | true |
discover.swiss/MountainArea | false |
discover.swiss/ProtectedArea | false |
some regions | ||
---|---|---|
TSVM-OUA_1037953 | Schweiz | Country |
TSVM-OUA_1022106 | Graubünden | State |
TSVM-OUA_1039560 | Graubünden | CustomArea (child of Graubünden State) |
Warning
Downloading the full or big trees is currently very slow
Info
There is one region tree over all data sources.
Termversions¶
Tip
Endpoints DO NOT require project query param
There are endpoints to query Termversion but there are no public endpoints to query the full definition of a term.
Route | Request parameter | Response entity | remark |
---|---|---|---|
/termversions/{code} | code: the version code | TermVersion | delivers the details af a specific version |
/termversions/{termCode}/currentVersion | termCode: the code of the term (not the version) | TermVersion | return the currently active version of the term |
Tip
To understand how terms & conditions are organized read the page terms and conditions. To understand how terms & conditions are organized read the page terms and conditions.
Search¶
Search endpoint to make fast database searches
Route | Response entity |
---|---|
/search | Search Response |
TimeZones¶
Tip
Endpoints DO NOT require project query param
There is a single endpoint to get a list of all supported TimeZones with offsets
Route | Response entity |
---|---|
/timezones | TimeZone |
Types¶
Tip
Endpoints DO NOT require project query param
There is a single endpoint to get the full detailed information of a type tree
Route | Response entity |
---|---|
/types/tree | TypeTree |
OpenAPI document¶
All methods and response models can be viewed in the Developer Portal. To generate an API client you can use the following URLs without user authentication but still with the Subscription Key in the Header (Ocp-Apim-Subscription-Key
) or as Query Parameter (subscription-key=<your-surbscription-key>
):