curl --request GET \
--url https://spaportal.cz/api/v2/room-types \
--header 'X-SpaPortal-Public-Key: <api-key>'import requests
url = "https://spaportal.cz/api/v2/room-types"
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', 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",
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"
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")
.header("X-SpaPortal-Public-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spaportal.cz/api/v2/room-types")
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{
"data": [
{
"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": "Просторный номер с собственной ванной комнатой."
}
}
],
"pagination": {
"limit": 25,
"nextCursor": "<string>",
"hasMore": true,
"total": 123
}
}{
"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": [
{}
]
}
}List room types
Returns room types of active hotels across the companies your public
key is scoped to. Localized fields (category, description) return
the locale keys selected by Accept-Language.
See the Room type object for the full field reference.
curl --request GET \
--url https://spaportal.cz/api/v2/room-types \
--header 'X-SpaPortal-Public-Key: <api-key>'import requests
url = "https://spaportal.cz/api/v2/room-types"
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', 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",
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"
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")
.header("X-SpaPortal-Public-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spaportal.cz/api/v2/room-types")
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{
"data": [
{
"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": "Просторный номер с собственной ванной комнатой."
}
}
],
"pagination": {
"limit": 25,
"nextCursor": "<string>",
"hasMore": true,
"total": 123
}
}{
"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.
Query Parameters
Number of records to return. See Pagination.
1 <= x <= 100Cursor from the previous page's pagination.nextCursor. See Pagination.
2000Filter by hotel id.
^[0-9a-fA-F]{24}$Filter by number of beds.
1 <= x <= 10Filter by exact room type code.
200Full-text search of the localized category name across all supported languages (case- and diacritics-insensitive). To match a code, use code.
200Set to hotel to embed the hotel in each room type.
hotel Sort order by creation time: createdAt:desc returns the newest records first, createdAt:asc the oldest. Records are ordered by their id, which increases with creation time, giving a stable total order that keeps cursor pagination exact.
createdAt:desc, createdAt:asc