Reports API v2.1

The Reports API lets you get various reports for your account or campaign.

Paths

GET base_path/api_version/account_or_campaign_id/reports
GET base_path/api_version/account_or_campaign_id/reports/report_type
GET base_path/api_version/account_or_campaign_id/reports/report_type/report_date

Where:

Path Parameter Description
base_path https://www.googleapis.com/travelpartner
api_version v2.1
account_or_campaign_id A campaign, parent account, or sub account ID. Which of these you can specify depends on the report type, as shown in Reporting levels.

For example, for the Commissions Guest Stay report, you can specify only the master account ID. For the Performance or Budget reports, you can specify either an account ID or a campaign ID.

If you specify a parent account ID, then data for all sub accounts in addition to the parent account is included.

report_type The type of report that you want. This query string parameter is optional. If you do not specify a value, then the Reports API returns a list of available reports.
report_date The date of the report, in YYYYMMDD format, where YYYY is the year, MM is the month, and DD is the day. If you do not specify the date, then the Reports API returns a list of dates for which the report is available.

Query String Parameters

Parameter Description
end_date The end date for a date range, in the format YYYYMMDD. You specify the start date for a date range in the path.
include_subaccounts Determines whether to include data about sub accounts in the report when you specify a parent account. For more information, refer to Including sub account data.

Supported Methods

HTTP Method Description
GET Gets either a list of reports, a list of dates for which the specified report is available, or the report, depending on the path parameters that you specify.

Examples

Gets a list of reports for account 4200042:

GET https://www.googleapis.com/travelpartner/v2.1/4200042/reports

Gets a list of valid dates for the price accuracy reports for account 4200042:

GET https://www.googleapis.com/travelpartner/v2.1/4200042/reports/price_accuracy

Gets the price accuracy report for 5/31/2016 for account 4200042:

GET https://www.googleapis.com/travelpartner/v2.1/4200042/reports/price_accuracy/20160531

Gets a price accuracy report starting on 5/31/2016 and ending 6/2/2016 for account 4200042:

GET https://www.googleapis.com/travelpartner/v2.1/4200042/reports/price_accuracy/20160531?end_date=20160602

Gets a price accuracy report that includes sub account data, starting on 5/31/2016 and ending 6/2/2016 for account 4200042:

GET https://www.googleapis.com/travelpartner/v2.1/4200042/reports/price_accuracy/20160531?end_date=20160602&include_subaccounts=true

Listing available report types

You can use the Reports API to get a list of valid report types.

To get a list of report types, use the following syntax:

GET https://www.googleapis.com/travelpartner/v2.1/account_or_campaign_id/reports

The following example gets a list of available report types for account 4200042:

GET https://www.googleapis.com/travelpartner/v2.1/4200042/reports

The response includes a list of reports in a report_types object.

The following example response shows a list of reports types that can be retrieved:

{
  "kind": "travelpartner#reportsListTypes",
  "report_types": [
    "audience",
    "bid_simulation_cpc_fixed",
    "bid_simulation_cpc_percentage",
    "bid_simulation_target_roas",
    "bid_simulation_commission_guest_stay",
    "bid_simulation_cpa",
    "book_on_google",
    "booking",
    "budget",
    "click_to_call",
    "campaign_opportunity",
    "commissions_guest_stay",
    "cross_device_conversions",
    "fenced_rates",
    "performance",
    "performance_with_click_type",
    "price_accuracy",
    "price_competitiveness",
    "top_opportunity_7_day"
  ]
}

The following table describes the possible values for report_type:

Report Type Description
audience Shows performance of bid multipliers on AdWords audience lists.

For more information, refer to Audience report.

bid_simulation_commission_guest_stay Gives you a quick view of the overall commission guest stay bidding landscape and helps you determine what bids to make.

For more information, refer to Bid Simulation Commission Guest Stay Report.

bid_simulation_cpa Gives you a quick view of the overall CPA bidding landscape and helps you determine what bids to make.

For more information, refer to Bid Simulation CPA Report.

bid_simulation_cpc_fixed Gives you a quick view of the overall CPC fixed bidding landscape and helps you determine what bids to make.

For more information, refer to Bid Simulation CPC Fixed Report.

bid_simulation_cpc_percentage Gives you a quick view of the overall CPC percentage bidding landscape and helps you determine what bids to make.

For more information, refer to Bid Simulation CPC Percentage Report.

bid_simulation_target_roas Gives you a quick view of the overall target ROAS bidding landscape and helps you determine what bids to make.

For more information, refer to Bid Simulation Target ROAS Report.

book_on_google Gives you performance data about your direct booking flow.

For more information, refer to Book on Google Mini Report.

booking Lists the bookings received through conversion tracking.

For more information, refer to Bookings Report.

budget Lists budget performance metrics and estimated missed opportunities.

For more information, refer to Budget Report.

campaign_opportunity Shows estimated missed opportunities for campaigns.

For more information, refer to Campaign Opportunity Report.

click_to_call Shows conversion data and other metrics related to Click to Call campaigns.

For more information, refer to Click to Call Mini Report.

commissions_guest_stay Provides commissions net of guest stay and other details about billing.

For more information, refer to Commissions Mini Report.

cross_device_conversions Shows conversions that happened when a customer clicked on an ad using one device and booked the hotel using another device.

For more information, refer to Cross Device Conversions report.

fenced_rates Provides details on the traffic received from each offer which is based on the end-user's device and domain (if you implement fenced rates).

For more information, refer to Fenced Rates Performance Report

performance Provides performance and conversion tracking details. Also includes the data type (either "default" or "selected"). This is the default report. If you do not specify a value for report_type, the Reports API returns the dates that are available for this report type.

This report is different from earlier versions: it now includes a subaccount_id field as the first column.

For more information, refer to Performance Report with Conversion Metrics.

performance_with_click_type Includes the same information as the performance report, but also includes the click type, which is either "standard" (for the standard booking module) or "room booking module."

For more information, refer to Performance Report with Conversion Metrics.

price_accuracy Lists a sample set of itineraries and the date/times when prices for those itineraries were fetched and cached.

For more information, refer to Price Accuracy Report.

price_competitiveness Provides insights into how your prices compare to competitors' prices on the same hotel itineraries.

For more information, refer to Price Competitiveness Report.

top_opportunity_7_day Lists opportunities you might have missed per hotel over a 7-day period. Includes breakdowns of missed opportunities by type.

For more information, refer to Opportunity Report.

Reporting levels

Some reports group data at the master account level, sub account level, and/or campaign level.

For reports that group data at the campaign level, specify the campaign ID in the path (the value of account_or_campaign_id). For the account level, specify the account ID in the path. If a report supports both, then use the ID of the type that you want to group by.

The following table shows the levels at which you can request reports:

Report Name Level (at which the request can be made)
Master Account Sub Account Campaign
Audience
Bid Simulation Commission Guest Stay
Bid Simulation CPA
Bid Simulation CPC Percentage
Bid Simulation Target ROAS
Book on Google
Booking
Budget
Campaign Opportunity
Click to Call
Commissions Guest Stay
Cross Device Conversions
Hotel Level Coverage
Limited Offers Volume
Performance
Performance With Click Type
Price Accuracy Validation Output
Price Accuracy Counts
Price Accuracy Score History
Price Competitiveness
Revenue
Top Opportunity 7 Day

Listing available dates for a report

To get a list of available dates for a particular report, submit a GET request with the following syntax:

GET https://www.googleapis.com/travelpartner/v2.1/account_or_campaign_id/reports/report_type

You must include report_type, and it must be one of the values listed in Listing report types.

The following example gets a list of dates for which the account's price accuracy report is available:

GET https://www.googleapis.com/travelpartner/v2.1/4200042/reports/price_accuracy

The response includes a list of dates in a date object. The dates are in an array in YYYYMMDD format, where YYYY is the year, MM is the month, and DD is the day. Each date in the array represents a different report that contains data for that day.

The following example response shows a list of dates for which the report is available:

{
  "kind": "travelpartner#reportsList",
  "date": [
    "20170601",
    "20170531",
    "20170530",
    "20170529",
    "20170528",
    "20170527",
    "20170526"
  ]
}

After executing a request for dates, you typically follow up with a second request to get a report for a one of those dates, as shown in Getting a report.

Getting a report

To get a report, submit a GET request with the following syntax:

GET https://www.googleapis.com/travelpartner/v2.1/account_or_campaign_id/reports/report_type/report_date

report_type and report_date (in YYYYMMDD format) are required.

The following example gets the price accuracy report for 5/31/2017 for account 4200042:

GET https://www.googleapis.com/travelpartner/v2.1/4200042/reports/price_accuracy/20170531

The Reports API returns a CSV file for the report attached to the response. CSV files returned by the Reports API include the column names as the first row in the response.

Including sub account data

You can include data for sub accounts in your reports.

To include data about sub accounts in the report, set the include_subaccounts query string parameter to "true".

The following example gets the price accuracy report for the parent account (4200042) and all its sub accounts:

GET https://www.googleapis.com/travelpartner/v2.1/4200042/reports/price_accuracy/20170531?
  include_subaccounts=true

When you set include_subaccounts to "true", the report aggregates the data of the specified parent account in addition to the data for all its sub accounts. If you set include_subaccounts to "false", then the report includes only data about the specified account.

The default value of include_subaccounts is "false".

If you specify a campaign ID rather than an account ID in the path, then this parameter is ignored.

Reports API changes

Changes to version 2.1 of the Reports API include the following:

  • You can now request a bid_simulation_cpa report to see how CPA bids might perform.
  • You can now request an audience report to see how your bid multipliers performed for audience lists.
  • For some reports, you can specify an account, sub account, or campaign ID in the API endpoint's URL. Previously, you could only specify an account or sub account ID.
  • There is a new report type, campaign_opportunity.
  • There is a new report type, cross_device_conversions, that you can request.
  • You can now request a performance_with_click_type report.
  • The following reports can include data rolled up by campaign:

    • bid_simulation_cpa
    • bid_simulation_cpc_percentage
    • bid_simulation_commission_guest_stay
    • bid_simulation_target_roas
    • book_on_google
    • booking
    • budget
    • click_to_call
    • cross_device_conversions
    • limited_offers_volume
    • performance
    • performance_with_click_type
  • The bid_simulation report has been removed. It was the same as the bid_simulation_cpc_percentage report.
  • The performance_with_date_type report has been removed. The performance report contains the information that was previously in that report.
  • The API endpoint has changed from base_path/2.1/... to base_path/v2.1/...