概覽
飯店庫存龐大且價格變動快。此住宿 API 提供公開地點搜尋、城市與飯店兩種模式的庫存、附保留時窗的報價驗證,以及先預訂後確認的清晰流程。
一套住宿 API 立於數百萬家旅宿之前,從全球連鎖到獨立精品。可用性、餐食類型、取消政策與稅費以統一的結構與幣別回傳,讓你的飯店預訂網站或 App 無需協調十幾種供應商格式。
你將獲得
1
公開地點搜尋可直接接上自動完成輸入框。
2
一個庫存介面即可列出整座城市,或展開單家飯店及其房型。
3
驗證報價、鎖定房間,隨後確認並扣款,全部以美元計。
4
一個端點同時支援依城市與依飯店搜尋,從整座目的地到單一飯店。
5
票價驗證會開啟短暫的鎖定視窗,讓你展示的價格就是下單的價格。
流程如何運作
01
Resolve
Turn a destination string into a place id with public place search.
02
Search
List availability for a whole city, or open a single property with its rooms.
03
Validate
Confirm the live rate and open a short hold window.
04
Book
Place the order and confirm; your balance is charged on confirmation.
主要端點
GET
/Hotel/PlaceSearchResolve a destination into a place id.POST
/v2/Hotel/HotelAvailabilityList availability in city or hotel mode.POST
/Hotel/RateValidateValidate the selected rate and hold it.POST
/Hotel/HotelBookCreate and confirm the booking.GET
/Hotel/BookingDetailsRetrieve a booking and its status.請求與回應
Request · POST /v2/Hotel/HotelAvailability
{
"CheckIn": "2026-11-14",
"CheckOut": "2026-11-16",
"CityId": 11111111456928,
"Occupancies": [ { "AdultCount": 2 } ],
"Sort": "price"
}Response · 200 OK
{
"hotels": [
{
"hotelId": "HTL-9931",
"name": "Marina Suites",
"stars": 4,
"lowestRate": {
"amount": 180.00, "currency": "USD", "board": "BB"
},
"rooms": [ { "code": "DLX-K", "refundable": true } ]
}
]
}回應包含什麼
hotelId- Stable id for the property.
lowestRate- Cheapest bookable rate, in USD, with board type.
rooms- Room options with codes and refundability.
cancellationPolicy- Deadlines and penalties that apply to the rate.
hold- Minutes the validated rate stays bookable.
500萬+
全球飯店
常見問題
如何把目的地變成一次搜尋?
呼叫公開地點搜尋,把文字解析為 id,再將該 id 傳給庫存介面。
驗證後的報價有效多久?
十五分鐘。請在該時窗內使用回傳的票價代碼完成預訂。
何時扣除我的餘額?
僅在你下單確認時扣款。預訂只會鎖定房間而不扣款。
票價包含稅費嗎?
包含。每個票價都帶有幣別、餐食類型與稅費明細,全部正規化為美元。
可以直接開啟單一飯店嗎?
可以。飯店模式開啟一家飯店及其房型,城市模式列出整座目的地。

