Oda ve fiyatlar
Rezervasyon motorunun arama sonucu ekranını besleyen iki uç nokta: verilen tarih ve kişi sayısı için satılabilir oda tiplerini, konaklama tiplerini ve fiyatları döndüren oda listesi; takvim görünümü için gün gün müsaitlik ve fiyat veren müsaitlik.
/external/online/roomTypeOda listesi ve fiyatlarGET/external/room/type/hotel/availabilityTakvim müsaitliğiOda listesi ve fiyatlar#
/external/online/roomTypeKimlik doğrulama: Authorization: Bearer · Gövde: application/x-www-form-urlencoded veya multipart/form-data
Tarih aralığı ve kişi sayısına göre otelin online satışa açık oda tiplerini döner. Her oda tipi için müsait oda adedi (roomCount), kısıtlar (minimum konaklama, girişe/çıkışa kapalı günler), konaklama tipleri ve fiyat seçenekleri hesaplanır. Çocuk varsa childAges[] ile yaşları gönderin; çocuk fiyat politikası yaşa göre uygulanır.
Doğrulama kuralları: giriş tarihi bugün veya sonrası, çıkış tarihi girişten sonra, en fazla 30 gece, 1–40 yetişkin, 0–10 çocuk (0–16 yaş).
Form alanları
hotelIDintegerzorunlustartDatedatezorunluYYYY-MM-DD.endDatedatezorunluYYYY-MM-DD.adultCountintegerzorunluchildCountintegervarsayılan: 0childAges ile uyumsuzsa yaş listesinin uzunluğu esas alınır.childAges[]integer[]childAges[]=7&childAges[]=12.languagestringvarsayılan: trbuildingIDintegerYanıt
200 Oda tipi listesi. Fiyatlar konaklama tipi altında prices nesnesinde, "<kişi>-<1|0>" anahtarlarıyla döner: -1 standart (iade edilebilir), -0 iade edilemez ([NR]) fiyat. Oda bazlı fiyatlamada anahtarlar 1-1 / 1-0 olur.
items[].id / nameinteger / stringroomTypeID olarak kullanılır.items[].capacityAdult / capacityChildren / capacityTotalintegeritems[].roomCountintegerroomRestrictionMessage alanında.items[].roomRestrictionMessagestring | nullclosed_to_checkinclosed_to_checkoutpassive_salesminimum_staymaximum_stayclosed_to_arrivalprice_not_founditems[].nonRefundable / refundablebooleanitems[].images[]string[]items[].accommodationTypes[]object[]id rezervasyonda ratePlanID olur. priceType: 0 kişi bazlı, 1 oda bazlı fiyat.…accommodationTypes[].prices{}objecttotal gece sayısı, price toplam tutar, currency, nonRefundable ("[NR]" ise iade edilemez), id seçim kimliği, prices[] günlük fiyat (price, tarih gün.ay.yıl).items[].roomFeatures[]object[]title, icon.countintegererrorMessage / errorCodestring | integer | nullHata yanıtları
- 200
errorCode10001 otel bulunamadı · 10002 eksik parametre · 10003 otel online satışa kapalı · 10004 satışa açık oda tipi yok · 10022 tarih/kişi parametreleri geçersiz · 20001–20004 yeterli müsaitlik yok.
curl "https://test.hms.gen.tr/external/online/roomType" \
-H "Authorization: Bearer $HMS_TOKEN" \
-d "hotelID=1000" \
-d "startDate=2026-08-18" \
-d "endDate=2026-08-20" \
-d "adultCount=2" \
-d "childCount=1" \
-d "childAges[]=7" \
-d "language=tr"const res = await fetch("https://test.hms.gen.tr/external/online/roomType", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.HMS_TOKEN}`
},
body: new URLSearchParams([
["hotelID", "1000"],
["startDate", "2026-08-18"],
["endDate", "2026-08-20"],
["adultCount", "2"],
["childCount", "1"],
["childAges[]", "7"],
["language", "tr"]
])
});
const data = await res.json();$ch = curl_init('https://test.hms.gen.tr/external/online/roomType');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('HMS_TOKEN'),
],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query([
'hotelID' => '1000',
'startDate' => '2026-08-18',
'endDate' => '2026-08-20',
'adultCount' => '2',
'childCount' => '1',
'childAges' => [
'7',
],
'language' => 'tr',
]),
]);
$data = json_decode(curl_exec($ch), true);{
"success": true,
"items": [
{
"id": 2,
"name": "Standart Oda",
"capacityAdult": 2,
"capacityTotal": 3,
"totalBed": 1,
"totalBathroom": 1,
"roomSize": 24,
"currency": "TRY",
"detail": "<p>Bahçe manzaralı, 24 m² standart oda.</p>",
"roomCount": 5,
"roomRestrictionMessage": null,
"nonRefundable": false,
"refundable": true,
"images": [
"images/1000/odatipi/standart-1.jpg",
"images/1000/odatipi/standart-2.jpg"
],
"accommodationTypes": [
{
"id": 2,
"title": "Kahvaltı Dahil",
"priceType": 0,
"roomRestriction": 1,
"roomRestrictionMessage": null,
"roomRestrictionValue": null,
"prices": {
"2-1": {
"total": 2,
"title": 2,
"nonRefundable": "",
"price": "1930.00",
"currency": "TRY",
"id": "2/2",
"prices": [
{
"price": "965.00",
"tarih": "18.08.2026"
},
{
"price": "965.00",
"tarih": "19.08.2026"
}
]
},
"2-0": {
"total": 2,
"title": 2,
"nonRefundable": "[NR]",
"price": "1737.00",
"currency": "TRY",
"id": "2-0/2",
"prices": [
{
"price": "868.50",
"tarih": "18.08.2026"
},
{
"price": "868.50",
"tarih": "19.08.2026"
}
]
}
}
}
],
"roomFeatures": [
{
"title": "Klima",
"icon": "fa-snowflake"
},
{
"title": "Ücretsiz Wi-Fi",
"icon": "fa-wifi"
}
],
"capacityChildren": 1
}
],
"count": 1,
"errorMessage": null,
"errorCode": null
}{
"success": false,
"errorMessage": "Yeterli yetişkin müsaitliği bulunamadı.",
"errorCode": 20001
}Takvim müsaitliği#
/external/room/type/hotel/availabilityKimlik doğrulama: Authorization: Bearer
Her oda tipi için gün gün müsait oda adedi ve ana fiyatı döner. Takvim ve fiyat ısı haritası görünümleri için tasarlanmıştır; kesin fiyat ve kısıt kontrolü için oda listesini kullanın.
Sorgu parametreleri
hotelIDintegerzorunlustartDatedatetimezorunluYYYY-MM-DD veya YYYY-MM-DDTHH:MM:SS.endDatedatetimezorunluYanıt
200 Oda tiplerine göre günlük liste. availability -1 ise o gün için müsaitlik verisi yok; price "-" ise fiyat tanımlı değil.
Hata yanıtları
- 200
hotel_id_is_not_found,start_date_is_not_found,end_date_is_not_found— parametre eksik.
curl "https://test.hms.gen.tr/external/room/type/hotel/availability?hotelID=1000&startDate=2026-08-18&endDate=2026-08-21" \
-H "Authorization: Bearer $HMS_TOKEN"const res = await fetch("https://test.hms.gen.tr/external/room/type/hotel/availability?hotelID=1000&startDate=2026-08-18&endDate=2026-08-21", {
headers: {
"Authorization": `Bearer ${process.env.HMS_TOKEN}`
}
});
const data = await res.json();$ch = curl_init('https://test.hms.gen.tr/external/room/type/hotel/availability?hotelID=1000&startDate=2026-08-18&endDate=2026-08-21');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('HMS_TOKEN'),
],
]);
$data = json_decode(curl_exec($ch), true);{
"success": true,
"roomTypes": [
{
"name": "Standart Oda",
"id": 2,
"rate": 2,
"availability": [
{
"id": 20260818,
"start": "2026-08-18 12:00:00",
"end": "2026-08-19 12:00:00",
"availability": 5,
"price": "965.00"
},
{
"id": 20260819,
"start": "2026-08-19 12:00:00",
"end": "2026-08-20 12:00:00",
"availability": 3,
"price": "965.00"
},
{
"id": 20260820,
"start": "2026-08-20 12:00:00",
"end": "2026-08-21 12:00:00",
"availability": 0,
"price": "1,100.00"
},
{
"id": 20260821,
"start": "2026-08-21 12:00:00",
"end": "2026-08-22 12:00:00",
"availability": -1,
"price": "-"
}
]
}
],
"currency": "TRY"
}