Reports API v2.0

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

Path

base_path/api_version/account_id/reports[/report_type][/report_date]

Where:

Path Parameter Description
base_path https://www.googleapis.com/travelpartner
api_version v2.0
account_id A parent account or sub account ID. If you specify a parent account, 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
include_subaccounts Determines whether to include data about sub accounts in the report.
end_date The end date for a date range, in the format YYYYMMDD.

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 which path parameters you specify.

Examples

Gets a list of reports for the specified account:

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

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

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

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

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

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

GET https://www.googleapis.com/travelpartner/v2.0/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:

GET https://www.googleapis.com/travelpartner/v2.0/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.0/account_id/reports

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

GET https://www.googleapis.com/travelpartner/v2.0/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": [
    "bid_simulation",
    "bid_simulation_cpc_fixed",
    "bid_simulation_cpc_percentage",
    "bid_simulation_target_roas",
    "bid_simulation_commission_guest_stay",
    "book_on_google",
    "booking",
    "budget",
    "click_to_call",
    "commissions_guest_stay",
    "fenced_rates",
    "performance",
    "performance_with_date_type",
    "price_accuracy",
    "price_competitiveness",
    "top_opportunity_7_day"
  ]
}

The following table describes the possible values for report_type:

Report Type Description More Information
bid_simulation Gives you a quick view of the overall bidding landscape and helps you determine what bids to make. This is the same report as the Bid Simulation CPC Percentage Report. Bid Simulation 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. 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. 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. Bid Simulation Target ROAS 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. Bid Simulation Commission Guest Stay Report
book_on_google Gives you performance data about your direct booking flow. Book on Google Mini Report
booking Lists the bookings received through conversion tracking. Bookings Report
budget Lists budget performance metrics and estimated missed opportunities. Budget Report
click_to_call Shows conversion data and other metrics related to Click to Call campaigns. Click to Call Mini Report
commissions_guest_stay Provides commissions net of guest stay and other details about billing. Commissions Mini 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). Fenced Rates Performance Report
performance Includes the performance report, plus additional conversion tracking-specific fields. If no report_type value is provided, the Reports API returns the dates that are available for this report type. Performance Report with Conversion Metrics
performance_with_date_type The same as the performance report, but includes the date type (either "default" or "selected"). 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. Price Accuracy Report
price_competitiveness Provides insights into how your prices compare to competitors' prices on the same hotel itineraries. 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. Opportunity Report

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.0/account_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.0/420042/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": [
    "20160601",
    "20160531",
    "20160530",
    "20160529",
    "20160528",
    "20160527",
    "20160526",
  ]
}

After executing a request for dates, you typically follow up with a second request to get a report for a certain date, 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.0/account_id/reports/report_type/report_date

report_type and report_date (YYYYMMDD format) are required.

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

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

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.0/4200042/reports/price_accuracy/20160531?
  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".

Reports API Changes

Changes to v2.0 of the Reports API include the following:

  • The Reports API uses the new RESTful syntax.
  • Lets you include sub-account data in the report.
  • Removed the Room Types report.
  • Replaced the Top Opportunity 7 Day report with the breakdown version of the report. The original Top Opportunity Report has been deprecated.