Version 2.1 of the Travel Partner Application Programming Interface (API) is a collection of RESTful services that let you programmatically access bidding, pricing, hotel, and diagnostic reporting data about your accounts.
API v2.1 summary
The Travel Partner API endpoints uses RESTful syntax via HTTPS calls. The base URL for all API 2.1 requests is:
The following table summarizes the API endpoints for the Travel Partner API 2.1:
|Account Assignments API||
||Lists all hotels in the specified accounts or sub accounts and lets you assign hotels to a particular account or sub account.|
||Lists your submitted bids and makes real-time bid updates.|
||Gets your account budget settings and sets new budget values.|
||Gets a list of campaigns, views the details of campaigns, creates new
campaigns, and updates existing campaigns.
You cannot delete a campaign with this API, but at any time you can pause the campaign so that its hotels no longer participate in auctions.
||Creates and deletes Hotel Groups, as well as adds and removes hotels to and from those groups.|
||Lists properties that are in your Hotel List Feed, including those that are over-clustered or have other data quality issues.|
||Returns itineraries and their associated prices for your properties.|
|Reconciliation Reports API||
||Views, validates, and uploads your commissions reconciliation reports, if you are in the Google Hotal Ads Commissions Program (GHACP).|
||Lists available reports or gets a report for the specified date.|
||Gets Scorecard data for the specified account.|
|Sub Account Info API||
||Gets billing details and other info about an account.|
The Feed Status, Hotels, and Prices APIs are available to both Hotel Ads and Hotel Prices. All other APIs are available only to Hotel Ads.
API change summary
The following table summarizes the changes to version 2.1 of the API:
|API||Account/Campaign in URL||Summary|
|Account Assignments API||Account ID only||
Changes to v2.1 of the Account Assignments API include the following:
|Bids API||Campaign ID only||
Changes to v2.1 of the Bids API include the following:
|Budgets API||Account ID||
Changes to version 2.1 of the Budgets API include the following:
|Campaigns API||Account ID only||
Changes to version 2.1 of the Campaigns API include the following:
|Groups API||Account or campaign ID||
Changes to version 2.1 of the Groups API include the following:
|Hotels API||Account ID only||
Changes to version 2.1 of the Hotels API include the following:
|Prices API||Account ID only||
Changes to version 2.1 of the Prices API include the following:
|Reconciliation Reports API||Account ID only||
Changes to version 2.1 of the Reconciliation API include the following:
|Reports API||Account or campaign ID||
Changes to version 2.1 of the Reports API include the following:
|Scorecard API||Account ID only||
Changes to version 2.1 of the Scorecard API include the following:
|Sub Account API||Account ID only||
Changes to version 2.1 of the Sub Account Info API include the following:
Google supports at least the two most recent API versions at any given time. When a new version is released, the version that is now two releases back will be deprecated and scheduled for sunsetting.
- Deprecated indicates that the version of the API will continue to function as expected, but may not be updated with new features or bug fixes. In addition, when a version is deprecated, a sunset date is determined.
- Sunsetted indicates that the version of the API is removed and is no longer available. The minimum amount of time between deprecation and sunsetting is 3 months.
The following table shows the current schedule of API versions, as well as expected deprecation and sunset dates:
|Version||Deprecation Date||Sunset Date|
|v2.0 (Bids API)||February 2018||May 2018|
|v2.0 (all other APIs)||N/A||N/A|
|v1.2||February 2018||May 2018|
|v1.1||June 2016||October 2016|
|v1.0||April 2015||October 2015|
Improving performance with partial responses
The Hotels APIs support a simple syntax that you can use to get partial
responses with your API calls. You do this by specifying the names of the
objects that you want with the
fields query string parameter.
For example, rather than getting the entire response for a Bids API request,
you can get just the
bids objects, as the following example
fields parameter supports the following syntax:
- Use "/" separators to select objects that are nested. The following
base_bid_sourcewhich is nested within
- Get multiple objects using commas. The following example gets
base_bid_sourcewhich is nested within
multiplier_sourcewhich is also nested within
- Use wildcard characters (*) to select all objects. The following example
gets all objects nested in
- Specify sub-selections with "()". The following example gets the
multiplier_source, and the
bid/multipliersobjects for each item in the
When a set of data returned by the Travel Partner API is large enough, you must use an
offset to page through the results. You do this with the
query string parameter, as the following example shows:
nextrow parameter specifies an offset value which is a
unique token that you pass to the API on your second and subsequent requests.
When you include
nextrow in your query, the Travel Partner API
applies it to the request and gives you the next set of results, starting with
the value of
The value of
nextrow is not an integer that simply defines an
index offset. Instead, it is a unique identifier that the Travel Partner API
uses to determine which set of results to use. As a result, your first request
should never include this parameter. Responses that are incomplete
the first line in each response; for example:
To offset your next request, you extract the value of
from the response body and set it as the value of the
string parameter in your next request.
To access the Travel Partner API, clients must authenticate using OAuth2 authentication.
For an example application and additional information about using OAuth to connect to the Travel Partner API, see API Authentication.
Specifying an account
Some endpoints take an account ID in the URL. The account ID can be a parent account or a sub account. If it is a parent account, then all data from that account's children is aggregated and included in the response.