Release Notes

借助 Travel Partner API 第 3 版,您可以通过编程方式访问以下内容:

  • 管理 Hotel Center 与 Google Ads 之间的账号关联
  • 管理所选酒店设置
  • 品牌和图标管理(封闭式 Beta 版)
  • 通过“房源效果报告视图”服务获取房源效果数据
  • 通过酒店视图服务获取酒店数据
  • 通过 Participation Report Views Service 获取的参与度报告数据
  • 通过价格准确性视图服务获取价格准确性数据
  • 通过 Price Coverage Views Service 获取价格覆盖率数据
  • 通过 Price Views Service 获取的行程和价格数据
  • 通过对账报告服务管理佣金对账报告(仅限按入住付费的合作伙伴)

端点

可通过 HTTPS 调用中的 RESTful 语法访问 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

品牌方

修改品牌配置。(封闭式 Beta 版)


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

Google 酒店

修改所选酒店设置。


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

酒店视图

返回酒店视图列表或摘要。


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

图标

管理图标。(封闭式 Beta 版)


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 v2.1 中的许多服务已迁移到 Google Ads API。因此,Travel Partner API v3 仅保留了酒店专用服务。

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(以前称为 price_accuracy 报告 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 月 2016 年 5 月 31 日
v2.0(出价 API) 2018 年 2 月 2018 年 5 月
v2.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 身份验证