ホテル情報
予約エンジンのページの枠組みを構成するデータです。連絡先と所在地、ソーシャルメディアのリンク、フッターのテキスト(法的表記、ホテル紹介、アナリティクス/広告用スニペット)、予約確認メール用の SMTP 設定が含まれます。
GET
/external/hotel/{hotelID}/contact/info連絡先GET/external/online/social/mediaソーシャルメディアのリンクGET/external/online/footerフッターのテキストGET/external/online/mail/hostメールサーバー設定連絡先#
GET
/external/hotel/{hotelID}/contact/info認証: Authorization: Bearer
パスパラメーター
hotelIDinteger必須ホテル ID。
レスポンス
200 成功。
エラーレスポンス
- 404 ホテルが見つかりません。
curl "https://test.hms.gen.tr/external/hotel/1000/contact/info" \
-H "Authorization: Bearer $HMS_TOKEN"const res = await fetch("https://test.hms.gen.tr/external/hotel/1000/contact/info", {
headers: {
"Authorization": `Bearer ${process.env.HMS_TOKEN}`
}
});
const data = await res.json();$ch = curl_init('https://test.hms.gen.tr/external/hotel/1000/contact/info');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('HMS_TOKEN'),
],
]);
$data = json_decode(curl_exec($ch), true);{
"title": "Demo Otel",
"phone": "+90 258 000 00 00",
"cellPhone": "+90 555 000 00 00",
"email": "[email protected]",
"www": "https://www.demootel.com",
"address": "Kumsal Cad. No: 12",
"country": "Türkiye",
"countryIng": "Turkey",
"city": "Antalya",
"district": "Muratpaşa",
"latitude": "36.8841",
"longitude": "30.7056"
}メールサーバー設定#
GET
/external/online/mail/host認証: Authorization: Bearer
ホテルがオンライン予約の確認メール用に設定した SMTP 情報を返します。パスワードが含まれるため、サーバー側でのみ使用してください。
クエリパラメーター
hotelIDinteger必須ホテル ID。
レスポンス
200 成功。
エラーレスポンス
- 200
mail_host_is_not_found— SMTP が未設定。hotel_id_is_not_found。
curl "https://test.hms.gen.tr/external/online/mail/host?hotelID=1000" \
-H "Authorization: Bearer $HMS_TOKEN"const res = await fetch("https://test.hms.gen.tr/external/online/mail/host?hotelID=1000", {
headers: {
"Authorization": `Bearer ${process.env.HMS_TOKEN}`
}
});
const data = await res.json();$ch = curl_init('https://test.hms.gen.tr/external/online/mail/host?hotelID=1000');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('HMS_TOKEN'),
],
]);
$data = json_decode(curl_exec($ch), true);{
"success": true,
"data": {
"transport": "smtp",
"encryption": "tls",
"port": 587,
"host": "smtp.demootel.com",
"user": "[email protected]",
"password": "********"
}
}
ソーシャルメディアのリンク#
/external/online/social/media認証:
Authorization: Bearerクエリパラメーター
hotelIDinteger必須limitintegerデフォルト:20pageintegerデフォルト:1orderstringidまたは-id。レスポンス
200 成功。