任何理由皆可取消
讓旅客能靈活取消 non-refundable 的預訂,並獲得飯店全額退款
「行程保障 API」是一項針對已整合「Rapid Lodging API」的使用者所提供的新增、可選功能。此服務允許符合資格的住宿預訂提供「任何原因皆可取消」(CFAR)升級選項,讓旅客能靈活地取消 non-refundable 上的預訂,並就飯店所支付的金額獲得全額退款。
什麼是 CFAR?
透過 CFAR 服務,旅客可在入住前取消 non-refundable 的住宿預訂,並獲得全額飯店退款。CFAR 是一項旅遊服務——並非傳統的旅遊保險——無需提供任何合理理由,也無需經過理賠程序;旅客可基於任何理由取消行程,無需額外辦理任何手續。
CFAR 可協助您:
- 提升 lower-priced non-refundable 庫存的轉換率
- 讓旅客在預訂 non-refundable 的房價時倍感安心
- 減少取消過程中的摩擦
- 在無需引入人工理賠處理的情況下,提供靈活性
CFAR 顯示範例

請注意:此範例僅供說明之用。
驗證
在整合「行程保障 API」之前,您必須已啟用「Rapid Lodging API」(含房況/搜尋、價格查詢及預訂端點) 。驗證機制將採用簽名驗證,與 Rapid Lodging API 相同。
請聯絡您的客戶經理,將此權限範圍新增至您的憑證中。
運作方式
CFAR 的整合對業務造成的干擾極小。針對「房源查詢/預訂」、「預訂」及「取消」功能 (步驟 1、4 及 6),您現有的 Rapid Lodging 請求資料包無需進行任何變更。這項新行為具有累積性,因此若您未接受 CFAR 的提議,您的整合結果將不會有任何變化。
CFAR 搭配快速住宿服務
在使用 CFAR 功能時,旅客主要有兩種互動方式:第一種是瀏覽商品或預訂,第二種則是管理現有預訂。

步驟 1:查詢住宿價格
無需進行任何變更。
這是標準的「快速住宿空房查詢/預訂」電話。無需對請求或回應的處理進行任何修改。
步驟 2:呼叫「價格查詢」API
這是「Rapid Lodging」的標準價格查詢電話。無需對該請求進行任何變更。
當某個房價符合 CFAR 資格且在預訂時可用時,「價格查詢」的回應中,add_trip_protection 物件內的book 連結旁,將會包含一個links 連結。您應使用此連結,向旅客提供 CFAR 選項。
範例「價格查詢」回應中的連結物件 (CFAR-eligible 費率)
"links": {
"book": {
"method": "POST",
"href": "/v3/itineraries?token=MY5S3j36cOcL",
"expires": "2025-10-13T16:10:00.000+01:00"
},
"add_trip_protection": {
"method": "GET",
"href": "/v1/trip-protection/quote?token=MY5S3j36cOcLfLBZjPYQ1abhfc8CqmjmFVzkk7euvWaunE57LLeDgaxm516m",
"expires": "2025-10-13T16:10:00.000+01:00"
}
}註: 僅當該費率既可提供且符合 CFAR 資格時,才會顯示add_trip_protection 這個連結。
步驟 3:取得旅遊保障報價
終點: GET /v1/trip-protection/quote?token={token}
這是可選步驟,用於擷取所選匯率的完整 CFAR 報價。請將步驟 2 中回傳的href 連結中的add_trip_protection 作為請求 URL。
該 回應包含:
- 產品詳情: 產品名稱、類型、供應商及登記商家
- 保單詳情: 承保日期、承保比例與保額上限、行銷文案 (標題、概述、保障內容)、免責聲明,以及保單條款文件的連結
- 定價: CFAR 價格 (
trip_protection_price) 以及住宿與保障費用的總額 (totals),各項均以可計費貨幣及請求貨幣兩種形式列示 (含稅/含費與不含稅/不含費) - 取消罰款: 若取消保障產品本身,將適用之罰款
- 預訂連結: 在第 4 步驟中,需使用參數「
links.book_with_trip_protection」透過 CFAR 進行預訂
需要的標頭
| 標頭 | 必填 | 備註 |
|---|---|---|
Accept | 是 | 必須是 application/json |
Accept-Encoding | 是 | 必須是 gzip 格式 |
Customer-Ip | 是 | End-traveler's IPv4 位址 (非您的伺服器位址) |
User-Agent | 是 | 客戶的 user-agent 或 {app-name}/{app-version} |
Customer-Session-Id | 否 | 每個使用者會話皆為 唯一;同一會話中不同呼叫間的 re-use |
Test | 否 | 沙盒測試請參閱:standard、service_unavailable、unknown_internal_error |
範例: 報價回覆
{
"policy": {
"start_date": "2026-08-28T10:40:49Z",
"end_date": "2026-08-30T08:00:00+01:00",
"coverage": {
"limit": {
"value": "709.72",
"currency": "USD",
"percent": "100%"
}
}
},
"content": {
"product_name": "CFAR upgrade",
"headline": "Make your stay refundable",
"overview": "Get a refund on your accommodation with the Cancel For Any Reason (CFAR) upgrade.",
"benefits": [
{
"title": "Get a 100% refund of your accommodation cost",
"description": null
},
{
"title": "Cancel before 8:00am property time on the day of check-in",
"description": null
},
{
"title": "No questions asked, no paperwork",
"description": null
}
],
"disclaimer_html": "<p>By purchasing, I agree to all Cancel For Any Reason <a href=\"https://policy.example.com/pds/example\">Terms and Conditions</a>.</p>",
"links": {
"terms_and_conditions": {
"method": "GET",
"href": "https://policy.example.com/pds/example?policy_type=cfar_v1",
"expires": null
}
}
},
"pricing": {
"trip_protection": {
"inclusive": {
"billable_currency": {
"value": "149.04",
"currency": "USD"
},
"request_currency": {
"value": "149.04",
"currency": "USD"
}
},
"exclusive": {
"billable_currency": {
"value": "149.04",
"currency": "USD"
},
"request_currency": {
"value": "149.04",
"currency": "USD"
}
}
},
"totals": {
"inclusive": {
"billable_currency": {
"value": "858.76",
"currency": "USD"
},
"request_currency": {
"value": "858.76",
"currency": "USD"
}
},
"exclusive": {
"billable_currency": {
"value": "858.76",
"currency": "USD"
},
"request_currency": {
"value": "858.76",
"currency": "USD"
}
}
}
},
"refundable": false,
"expires_at": "2026-08-29T22:59:59Z",
"cancel_penalties": [
{
"start": "2026-08-28T10:40:49Z",
"end": "2026-08-30T07:00:00Z",
"currency": "USD",
"amount": "709.72",
"percent": "100%"
}
],
"links": {
"book_with_trip_protection": {
"method": "POST",
"href": "/v3/itineraries?token=QldfCGlcUA4",
"expires": null
}
}
}步驟 4:呼叫預訂 API
若旅客接受 CFAR 針對符合資格的預訂所提供的報價,該預訂將透過book_with_trip_protection 連結完成,該連結會在存取憑證中嵌入報價的相關資訊。無需對書籍申請架構進行任何變更。
新連結將作為標準「Rapid Lodging Booking」呼叫 (POST /v3/itineraries) 的一部分傳遞。應使用的預訂連結取決於旅客是否已選擇加入 CFAR。
| 旅客之選 | 請使用此預訂連結 |
|---|---|
| 透過 CFAR | links.book_with_trip_protection 摘自第 3 步驟的引文回應 |
| 未採用 CFAR 時 | links.book 摘自「步驟 2 價格查詢」的回覆 |
預訂請求或回覆中並未新增任何欄位。CFAR 僅會根據預訂連結中使用的代幣而觸發。
註: 報價回應中的「links.book_with_trip_protection」代碼 已過期 (請參閱expires 欄位)。請確保在代幣過期前提交預訂。
步驟 5:檢索預訂資訊
此請求內容並無變更。
這是 Rapid Lodging 的標準電話服務,號碼為GET /v3/itineraries/{itinerary_id}。
當購買 CFAR 時,「行程」回應中將包含一個額外的trip_protection 物件,其中載有所購產品的保單及定價詳情。如果您未購買 CFAR,則行程表的回覆內容將不會有任何變更。
此外,當 CFAR 生效時,行程中的cancel_penalties 物件上的「refundable」和「rate」欄位將反映 CFAR 政策,而非基礎費率的取消政策。
範例: 顯示trip_protection 物件的行程回覆
{
"trip_protection": {
"product_name": "Cancel For Any Reason (100% Refund)",
"product_type": "hotel_cancel_for_any_reason",
"vendor": "[vendor]",
"merchant_of_record": "expedia",
"eligibility_status": "eligible",
"policy": {
"start_date": "2025-10-13T15:59:00.000Z",
"end_date": "2025-10-18T08:00:00.000-08:00",
"coverage": {
"percentage": "100%",
"limit": {
"inclusive": {
"billable_currency": {
"value": "702.00",
"currency": "USD"
}
},
"exclusive": {
"billable_currency": {
"value": "702.00",
"currency": "USD"
}
}
}
},
"links": {
"policy_wording": {
"method": "GET",
"href": "https://policy.example.com/pds/example?policy_type=cfar_v1",
"expires": null
}
}
},
"pricing": {
"inclusive": {
"billable_currency": {
"value": "702.00",
"currency": "USD"
}
},
"exclusive": {
"billable_currency": {
"value": "702.00",
"currency": "USD"
}
}
}
},
}註:「trip_protection」在「Retrieve」回應中的價格僅反映可計費貨幣。如需包含請求貨幣在內的完整明細,請參閱原始報價回覆。
步驟 6:取消預訂
此請求內容並無變更。
這是 Rapid Lodging 的標準取消預訂電話。若某筆預訂已購買 CFAR 服務,一旦取消,系統將自動代表旅客提出退款申請,惟須符合相關資格條款。若在符合資格的時限外嘗試取消 (例如,在 check-in), 當天上午 8:00 之前),將不予辦理退款。針對您的實作,無需採取任何額外行動。
退款事宜完全由 Expedia Group. 旅客將透過標準的理賠程序獲得相應的退款。
API 詳細資料
請瀏覽本頁面的「TripProtection-related」端點定義,然後使用 API Explorer 或其他測試軟體,了解範例與架構定義與實際輸出結果之間的差異。
註: 此模式檔案僅供評估之用。在正式發布之前,可能會進行各項變更與優化,其中可能包含會導致相容性問題的變更。