curl --request GET \
--url https://spaportal.cz/api/v2/room-types/{roomTypeId} \
--header 'X-SpaPortal-Public-Key: <api-key>'import requests
url = "https://spaportal.cz/api/v2/room-types/{roomTypeId}"
headers = {"X-SpaPortal-Public-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-SpaPortal-Public-Key': '<api-key>'}};
fetch('https://spaportal.cz/api/v2/room-types/{roomTypeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spaportal.cz/api/v2/room-types/{roomTypeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-SpaPortal-Public-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://spaportal.cz/api/v2/room-types/{roomTypeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-SpaPortal-Public-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://spaportal.cz/api/v2/room-types/{roomTypeId}")
.header("X-SpaPortal-Public-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spaportal.cz/api/v2/room-types/{roomTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-SpaPortal-Public-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "66f16191f739705faa020003",
"hotelId": "66f16191f739705faa020001",
"code": "SUPERIOR-DBL",
"category": {
"cs-CZ": "Superior dvoulůžkový pokoj",
"de": "Superior Doppelzimmer",
"en": "Superior double room",
"ru": "Улучшенный двухместный номер"
},
"beds": 2,
"facilities": [
"shower",
"toilet"
],
"images": [
{
"url": "https://cdn.example.com/rooms/superior.jpg",
"thumbnailUrl": "https://cdn.example.com/rooms/superior-thumbnail.jpg"
}
],
"description": {
"cs-CZ": "Prostorný pokoj s vlastní koupelnou.",
"de": "Geräumiges Zimmer mit eigenem Bad.",
"en": "Spacious room with a private bathroom.",
"ru": "Просторный номер с собственной ванной комнатой."
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"details": [
{}
]
}
}Get a room type
Returns a single room type by id.
curl --request GET \
--url https://spaportal.cz/api/v2/room-types/{roomTypeId} \
--header 'X-SpaPortal-Public-Key: <api-key>'import requests
url = "https://spaportal.cz/api/v2/room-types/{roomTypeId}"
headers = {"X-SpaPortal-Public-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-SpaPortal-Public-Key': '<api-key>'}};
fetch('https://spaportal.cz/api/v2/room-types/{roomTypeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spaportal.cz/api/v2/room-types/{roomTypeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-SpaPortal-Public-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://spaportal.cz/api/v2/room-types/{roomTypeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-SpaPortal-Public-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://spaportal.cz/api/v2/room-types/{roomTypeId}")
.header("X-SpaPortal-Public-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spaportal.cz/api/v2/room-types/{roomTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-SpaPortal-Public-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "66f16191f739705faa020003",
"hotelId": "66f16191f739705faa020001",
"code": "SUPERIOR-DBL",
"category": {
"cs-CZ": "Superior dvoulůžkový pokoj",
"de": "Superior Doppelzimmer",
"en": "Superior double room",
"ru": "Улучшенный двухместный номер"
},
"beds": 2,
"facilities": [
"shower",
"toilet"
],
"images": [
{
"url": "https://cdn.example.com/rooms/superior.jpg",
"thumbnailUrl": "https://cdn.example.com/rooms/superior-thumbnail.jpg"
}
],
"description": {
"cs-CZ": "Prostorný pokoj s vlastní koupelnou.",
"de": "Geräumiges Zimmer mit eigenem Bad.",
"en": "Spacious room with a private bathroom.",
"ru": "Просторный номер с собственной ванной комнатой."
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"details": [
{}
]
}
}Authorizations
See Authentication for how to obtain and send your public key.
Headers
Comma-separated BCP 47 language tags selecting which locale keys localized fields return. When omitted, all locale keys are returned. See Localization for details.
"cs-CZ,de"
Optional client-provided request identifier echoed in error responses.
Path Parameters
Room type id.
^[0-9a-fA-F]{24}$Query Parameters
Set to hotel to embed the hotel.
hotel Response
The room type.
Draft: The room-type resource is still in progress. Its response shape may change before it is finalized.
^[0-9a-fA-F]{24}$"66f16191f739705faa020003"
^[0-9a-fA-F]{24}$"66f16191f739705faa020001"
"SUPERIOR-DBL"
Localized category name (plain text).
Show child attributes
Show child attributes
{ "cs-CZ": "Český text", "de": "Deutscher Text" }
2
["shower", "toilet"]
Show child attributes
Show child attributes
Localized description (Markdown).
Show child attributes
Show child attributes
{ "cs-CZ": "Český text", "de": "Deutscher Text" }
Embedded only when expand=hotel.
Show child attributes
Show child attributes