The /get/resort_type/{id} endpoint retrieves detailed information about a specific resort type category by its ID.
GET /get/resort_type/{id}
id (string, required)The resort type's WordPress ID. Can be provided with or without the "1_" prefix.
Formats:
{wp_id} - WordPress ID only (e.g., "456")1_{wp_id} - Legacy format with site prefix (e.g., "1_456")Examples:
id=456 - Resort type with WordPress ID 456id=1_456 - Same resort type using legacy format (prefix is stripped)Validation: Must be numeric or in format "1{number}". The "1" prefix is automatically removed if present.
sourceFields (string, optional)Return only specific fields from the _source object using dot notation (comma-separated).
Purpose: Optimize response payload size by requesting only needed fields
Examples:
sourceFields=title,resortssourceFields=title,images,automaticsourceFields=title,type{
"_index": "fnugg_blog",
"_type": "resort_type",
"_id": "1_456",
"_version": 1,
"found": true,
"_source": {
"id": 456,
"title": "Alpint",
"type": "resort_type",
"resorts": [14, 12, 89, 102, 73],
"images": [
{
"url": "https://example.com/alpine-skiing.jpg",
"caption": "Alpint skiløping",
"width": 1920,
"height": 1080
}
],
"automatic": "alpine"
}
}
{
"error": "Resort type with ID '999' was not found.",
"error_key": "resort_type_not_found",
"id": "999"
}
_index (string): Index name, always "fnugg_blog"_type (string): Type name, always "resort_type"_id (string): Resort type's ID in format "1_{wp_id}"_version (integer): Document version, always 1found (boolean): Whether resort type was found, always true on success_source (object): The resort type data objectid (integer): Resort type's WordPress ID (without "1_" prefix)title (string): Resort type name/category (e.g., "Alpint", "Langrenn", "Familie")type (string): Content type, always "resort_type"resorts (array |
string): Array of resort site_ids belonging to this type, or empty string "" if no resorts |
|---|
"" (not empty array)images (array): Resort type representative images
url (string), caption (string), width (integer), height (integer)automatic (string): Automatic categorization identifier/slug (e.g., "alpine", "cross_country", "family")
GET /get/resort_type/456
Returns all fields for resort type with WordPress ID 456.
GET /get/resort_type/1_456
Returns same result as above (the "1_" prefix is automatically stripped).
GET /get/resort_type/456?sourceFields=title,resorts
Returns only title and list of resort IDs.
GET /get/resort_type/456?sourceFields=title,automatic,images
Returns basic information with categorization and images.
Common resort type categories in the Norwegian ski resort context:
resorts array to get all resorts of a specific typesourceFields=title,automatic for filtering UIresorts arrayautomatic field value for search filteringid parameter accepts both formats: 456 or 1_456 (legacy format)resorts field contains site_ids that can be used with /get/resort/{id} or /search?include=...resorts is an empty string "" rather than an empty array []images array may be empty if the resort type has no representative imagesautomatic field provides a programmatic identifier for filtering (e.g., used in faceted search)sourceFields parameter uses dot notation to access nested fields/search?facet=resort_type:Alpint