攜程酒店信息查詢,訂酒店接口,在線預訂和支付下單。
接口名稱:訂酒店接口
接口平臺:api開放平臺
接口地址:http://api2.juheapi.com/xiecheng/hotel/avail
支持格式:json
請求方式:http post
請求參數說明:
名稱 |
類型 |
必填 |
說明 |
HotelCode |
string |
是 |
酒店代碼 |
Start |
string |
是 |
開始時間(格式:2013-06-27T13:00:00.000+08:00) |
End |
string |
是 |
結束時間(格式:2013-06-27T13:00:00.000+08:00) |
RatePlanCode |
string |
是 |
價格計劃代碼 |
Quantity |
string |
是 |
將要預訂的房間數量 |
Count |
string |
是 |
客人數量 |
LateArrivalTime |
string |
是 |
入住人最晚到店時間 |
key |
string |
是 |
應用APPKEY(應用詳細頁查詢) |
參數示例: |
|
|
|
{"Key":"您申請的appkey","HotelCode":"1024365","Start":"2015-03-23T18:00:00.000+08:00","End":"2015-03-24T13:00:00.000+08:00","RatePlanCode":"5694600","Quantity":"2","Count":"2","LateArrivalTime":"2015-03-23T23:00:00.000+08:00"} |
|
|
|
返回參數說明:
名稱 |
類型 |
說明 |
AvailabilityStatus |
string |
是否可定(AvailableForSale:可定) |
Text |
string |
該酒店訂單說明(需要特別注意!!) |
Total.AmountBeforeTax |
string |
總費用 |
訂酒店接口調用JSON返回示例:
{
"error_code": "200",
"reason": "請求成功",
"result": {
"Response": {
"HotelResponse": {
"OTA_HotelAvailRS": {
"PrimaryLangID": "zh",
"TimeStamp": "2015-03-16T11:30:45.6045434+08:00",
"Version": "2.0",
"xmlns": "http://www.opentravel.org/OTA/2003/05",
"RoomStays": {
"RoomStay": {
"AvailabilityStatus": "AvailableForSale",
"CancelPenalties": {
"CancelPenalty": {
"End": "2015-03-24T13:00:00",
"Start": "2015-03-23T18:00:00",
"AmountPercent": {
"Amount": "150.00",
"CurrencyCode": "CNY"
}
}
},
"DepositPayments": {
"GuaranteePayment": {
"End": "2015-03-23 00:00:00",
"GuaranteeCode": "4",
"Start": "2015-03-23 00:00:00",
"AmountPercent": {
"Amount": "150.00",
"CurrencyCode": "CNY"
},
"Description": {
"Text": "訂單提交後我們會立即操作扣款,如訂單不確認將全額退款至您的付款賬戶。如需修改取消訂單,請在2015-03-23 18:00以前通知攜程。若未入住或過此時間取消修改,我們將收取您首日房費{Money}。"
}
}
},
"RatePlans": {
"RatePlan": {
"AvailableQuantity": "8",
"PrepaidIndicator": "true",
"RatePlanCode": "5694600",
"RatePlanName": "單人間",
"MealsIncluded": {
"Breakfast": "false"
},
"RatePlanDescription": {
"Text": ""
}
}
},
"RoomRates": {
"RoomRate": {
"RatePlanCode": "5694600",
"RoomTypeCode": "2481396",
"Rates": {
"Rate": {
"EffectiveDate": "2015-03-23",
"ExpireDate": "2015-03-23",
"MaxGuestApplicable": "1",
"Base": {
"AmountBeforeTax": "75.00",
"CurrencyCode": "CNY",
"TPA_Extensions": {
"OtherCurrency": {
"AmountPercentType": {
"Amount": "75.00",
"CurrencyCode": "CNY"
}
}
}
},
"Fees": ""
}
}
}
},
"RoomTypes": {
"RoomType": {
"RoomType": "單人間",
"RoomTypeCode": "2481396",
"RoomDescription": {
"Text": ""
}
}
},
"Total": {
"AmountBeforeTax": "150.00",
"CurrencyCode": "CNY"
}
}
},
"Success": ""
}
}
}
}
}