hotels  -  旅館、房型基本資料


描述
取得旅館基本資料與其房型基本資料。

API接口
https://sdm_api_qazwsxedc.com/api/index.php

使用方式
  • 每日2:00am(GMT+8)全面更新旅館與房型資料。
  • 請每日同步更新旅館、房型資料, 每日讀取時間可由您自由決定。
  • 每日讀取此API方法不得超過5次。

輸入參數 (POST參數)

參數 名稱 型態 描述
dataType 資料格式 string 指定SDM API 請求與回應的資料格式。
  • JSON  -  請求與回應皆使用JSON資料型態。
request 請求 string 請求內容,產生步驟如下:
  1. 產生符合dataType結構的字串,其內容請參考 hotels: request
  2. 進行urlencode
signature 簽章 string 用來檢驗API使用者身份與request資料之完整性。 signature計算方式請參考 signature  -  身份與資料完整性驗證

回傳值
回傳response=responseValue&signature=signatureValue

request


JSON
{
    "request":{
        "header":{
            "partner":"channel-0004ac09be84ebb292b14178b36581f2",
            "method":"hotels",
            "time":"2014-05-15 18:03:15",
            "token":"token-fffd89d7f9bbd7b0937d411327d30885":
        },
        "body":{
        }
    }
}
								


response


JSON
{
    "response":{
        "header":{
            "partner":"channel-0004ac09be84ebb292b14178b36581f2",
            "method":"hotels",
            "time":"2014-05-15 18:04:15",
            "token":"token-fffd89d7f9bbd7b0937d411327d30885",
            "returnCode":1,
            "returnMessage":"成功"
        },
        "body":{
            "hotels":[
                {
                    "id":"place-6749aa1d476eca9d75d957d3280869f1",
                    "name":"風起旅店",
                    "checkIn":"15:00:00",
                    "checkOut":"11:00:00",
                    "address":"台北市羅斯福路四段35551號",
                    "longitude":132.763836,
                    "latitude":22.960738,
                    "introduction":"風起旅店介紹",
                    "status":"OPEN",
                    "roomTypes":[
                        {
                            "id":"place-0a5fa523792909065d0b52e7e513468a",
                            "name":"3F海景蜜月301",
                            "numberOfPeople":2,
                            "introduction":"3F海景蜜月301介紹",
                            "breakfast":"1"
                        },
                        {}
                    ]
                },
                {}
            ]
        }
    }
}