訂酒店接口 攜程酒店在線預訂

攜程酒店信息查詢,訂酒店接口,在線預訂和支付下單。

接口名稱:訂酒店接口

接口平臺: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": ""
        }
      }
    }
  }
}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章