Release Notes

透過第 3 版的 Travel Partner API,您可以透過程式存取下列項目:

  • 管理 Hotel Center 與 Google Ads 之間的帳戶連結
  • 管理所選飯店設定
  • 管理品牌和圖示 (封閉測試版)
  • 透過「房源成效報表檢視服務」取得房源成效資料
  • 透過飯店檢視服務取得飯店資料
  • 透過參與機會報表檢視服務取得參與機會報表資料
  • 透過價格準確度檢視服務取得價格準確度資料
  • 透過價格涵蓋範圍檢視服務取得價格涵蓋範圍資料
  • 透過價格檢視服務取得行程和價格資料
  • 透過對帳報告服務管理佣金對帳報告 (僅限按入住付費的合作夥伴)

端點

您可以透過 HTTPS 呼叫,以 REST 語法存取 Travel Partner API 端點。所有要求的基準網址為:

https://travelpartner.googleapis.com

Service 端點
帳戶連結

管理 Google Ads 帳戶和 Hotel Center 帳戶之間的連結。


POST /v3/accounts/account id/accountLinks
DELETE /v3/accounts/account id/accountLinks/account link id
GET /v3/accounts/account id/accountLinks/account link id
GET /v3/accounts/account id/accountLinks
PATCH /v3/accounts/account id/accountLinks/account link id

品牌

修改品牌設定。(封測階段)


POST /v3/accounts/account id/brands
GET /v3/accounts/account id/brands
PATCH /v3/accounts/account id/brands/brand id

飯店

修改所選飯店設定。


POST /v3/accounts/account id/hotels:setLiveOnGoogle

飯店瀏覽次數

傳回飯店瀏覽次數清單或摘要。


GET /v3/accounts/account id/hotelViews
GET /v3/accounts/account id/hotelViews:summarize

圖示

管理圖示。(封測階段)


POST /v3/accounts/account id/icons
GET /v3/accounts/account id/icons/icon id

參與度報表檢視畫面

傳回參與度報表檢視畫面,或使用查詢傳回檢視畫面資料的篩選子集。


GET /v3/accounts/account id/participationReportViews
GET /v3/accounts/account id/participationReportViews:query

價格準確度檢視畫面

傳回特定價格準確度檢視畫面、可用的準確度檢視畫面或摘要。


GET /v3/accounts/account id/priceAccuracyViews/report date
GET /v3/accounts/account id/priceAccuracyViews
GET /v3/accounts/account id/priceAccuracyViews:summarize

價格涵蓋範圍檢視畫面

傳回最新的價格涵蓋範圍檢視畫面或整個涵蓋範圍記錄。


GET /v3/accounts/account id/priceCoverageViews:latest
GET /v3/accounts/account id/priceCoverageViews

價格瀏覽次數

傳回所要求價格檢視畫面的完整詳細資料。


GET /v3/accounts/account id/priceViews/partner hotel id

房源成效報表檢視畫面

使用查詢傳回房源成效報表檢視畫面。


GET /v3/accounts/account id/participationReportViews:query

對帳報告

建立、驗證及擷取佣金對帳報告 (僅限飯店廣告)。


POST /v3/accounts/account id/reconciliationReports
POST /v3/accounts/account id/reconciliationReports:validate
GET /v3/accounts/account id/reconciliationReports/datetime~filename
GET /v3/accounts/account id/reconciliationReports

Hotel Ads Center 的「帳戶」分頁中,查看「帳戶資訊」檢視畫面,即可找到帳戶 ID。

變更記錄

Travel Partner API 2.1 版中的許多服務已遷移至 Google Ads API。因此,Travel Partner API 第 3 版只保留飯店專屬服務。

HotelViewService

  • HotelViewService.ListHotelViews (前身為 Hotels API)
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/hotels 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/hotelViews
    • 已移除 type 要求參數。
    • 已從回應中移除「manifestOnly」欄位。
    • 部分欄位已重新命名。
  • HotelViewService.SummarizeHotelViews (前身為 Scorecard API 中的 hotel_list_stats)
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/scorecard/hotel_list_stats 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/hotelViews:summarize
    • 部分欄位已重新命名。

ParticipationReportViewService (前身為 Scorecard API 中的 opportunity_stats)

  • ParticipationReportService.QueryParticipationReport
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/scorecard/opportunity_stats 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/participationReportViews:query
    • 已新增查詢參數。
    • 欄位已重新命名和重組。

PriceAccuracyViewService (原為價格準確度報表 API)

  • PriceAccuracyViewService.ListPriceAccuracyViews
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/reports/price_accuracy 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/priceAccuracyViews
    • 新版 API 會傳回飯店檢視畫面資源名稱清單,舊版則會傳回報表日期清單。
  • PriceAccuracyViewService.ListPriceAccuracyViews
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/reports/price_accuracy/20190909 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/priceAccuracyViews/20190909
    • 系統不再支援 CSV 輸出。
    • 部分欄位已重新命名。

PriceCoverageViewService

  • PriceAccuracyViewService.ListPriceCoverageViews (前身為 Scorecard API 中的 price_coverage_stats_history)
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/scorecard/price_coverage_stats_history 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/priceCoverageViews
    • 部分欄位已重新命名。
  • PriceAccuracyViewService.GetLatestPriceCoverageViews (前身為 Scorecard API 中的 price_coverage_stats)
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/scorecard/price_coverage_stats 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/priceCoverageViews:latest
    • 部分欄位已重新命名。

PriceViewService (原為 Prices API)

  • PriceViewService.GetPriceView
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/prices/hotel_id 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/priceViews/hotel_id
    • 部分欄位已重新命名。
    • 從回應中移除出價資訊。

ReconciliationReportService 方法 (舊稱「對帳報告 API」)

  • ReconciliationReportService.ListReconciliationReports
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/reconciliation_reports 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/reconciliationReports
  • ReconciliationReportService.GetReconciliationReport
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/reconciliation_reports/datetime/filename 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/reconciliationReports/datetime~filename
  • ReconciliationReportService.CreateReconciliationReport
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/reconciliation_reports 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/reconciliationReports
  • ReconciliationReportService.ValidateReconciliationReport
    • API 端點已從 https://www.googleapis.com/travelpartner/v2.1/4200042/reconciliation_reports/validate 變更為 https://travelpartner.googleapis.com/v3/accounts/4200042/reconciliationReports:validate

淘汰

已淘汰
表示該 API 版本仍可正常運作,但可能不會再更新新功能或修正錯誤。此外,如果版本已淘汰,系統會決定淘汰日期。
已淘汰
表示該 API 版本已移除,無法再使用。從淘汰到終止支援,至少會間隔 3 個月。

下表列出目前 API 版本的時間表,以及預計淘汰和終止日期:

版本 淘汰日期 停用日期
v3.0
v2.1 2019 年 9 月 2020 年 5 月 31 日
v2.0 (Bids API) 2018 年 2 月 2018 年 5 月
2.0 版 (所有其他 API) 2019 年 9 月 2020 年 2 月 15 日
v1.2 2018 年 2 月 2018 年 5 月
v1.1 2016 年 6 月 2016 年 10 月
v1.0 2015 年 4 月 2015 年 10 月

驗證

如要存取 Travel Partner API,用戶端必須使用 OAuth2 驗證進行驗證。

如需範例應用程式,以及如何使用 OAuth 連線至 Travel Partner API 的其他資訊,請參閱「API 驗證」。