Usage

This page presents some sample calls using the Travel Partner API v3.

The Travel Partner API endpoints accept REST-ful syntax in HTTPS calls. The base_url for all API requests is:

https://travelpartner.googleapis.com/v3/accounts/account_id

For the complete list of request and response fields, check out the API resources catalog.

Property performance report

The Property Performance Report View Service provides the ability to query (get, filter, and segment) a property performance report for a particular account.

Querying a property performance report

The following example gets the property performance report for all properties in account 12345678, filtered to the date of May 11, 2022, and grouped by partner hotel ID.

GET https://travelpartner.googleapis.com/v3/accounts/12345678/propertyPerformanceReportViews:query?filter=date%20%3D%20%272022-05-11%27&aggregateBy=partnerPropertyId

Hotels

The Hotel View Service provides either a list of all the hotels or a summary of them for a particular account.

Getting a list of hotels

The following example retrieves a list of all the hotels in account 12345678:

GET https://travelpartner.googleapis.com/v3/accounts/12345678/hotelViews

The request accepts query parameters for navigating through multi-page results:

GET base_url/hotelViews?pageSize=10&pageToken=11

Getting a properties summary

This example gets a summary of the properties for account 12345678:

GET https://travelpartner.googleapis.com/v3/accounts/12345678/hotelViews:summarize

Participation report

The Participation Report View Service provides the ability to query (get, filter, and segment) a participation report for a particular account.

Querying a participation report

The following example gets the participation report for all properties in account 12345678 and filters the report using a date of 10/4/20.

GET https://travelpartner.googleapis.com/v3/accounts/12345678/participationReportViews:query?filter=date%20%3D%20%272020-10-04%27

Price accuracy

The Price Accuracy Views Service enables retrieval of price accuracy reports and scorecards for a particular account.

Getting a price accuracy report

The following example retrieves the price accuracy report on 8/26/2019 for account 12345678:

GET https://travelpartner.googleapis.com/v3/accounts/12345678/priceAccuracyViews/20190826

Besides the usual query parameters for paging through the response, there are a couple more for including matched prices or pixel signals in the results.

In this example, the price accuracy report on 8/26/2019 includes matched prices and pixel signals:

GET base_url/priceAccuracyViews/20190826?includeMatchedPrices=true&includePixels=true

Listing available price accuracy reports

To get a list of the available reports, send this request:

GET https://travelpartner.googleapis.com/v3/accounts/12345678/priceAccuracyViews

You can include the usual query parameters for paging through the results.

Getting a price accuracy score

To get the price accuracy scorecard, use the summarize method:

GET https://travelpartner.googleapis.com/v3/accounts/12345678/priceAccuracyViews:summarize

Price coverage

The Price Coverage Views Service provides the latest price coverage report or the entire price coverage history.

Getting the latest price coverage stats

The following example retrieves the latest price coverage stats for account 12345678:

GET https://travelpartner.googleapis.com/v3/accounts/12345678/priceCoverageViews:latest

Getting the price coverage history

This request gets the entire price coverage history for an account:

GET https://travelpartner.googleapis.com/v3/accounts/12345678/priceCoverageViews

Price

The Price Views Service lets you retrieve a price report for a given property.

Getting pricing data for a property

To get the pricing report for a particular hotel (ID=101) belonging to account 12345678, issue this request:

GET https://travelpartner.googleapis.com/v3/accounts/12345678/priceViews/101

Reconciliation reports

The Reconciliation Reports Service lets you get a list of reports, download a particular report, validate it, then upload the report to Google.

Getting a list of reconciliation reports

The following example gets a list of reports for account 12345678:

GET https://travelpartner.googleapis.com/v3/accounts/12345678/reconciliationReports

You can include optional start and end date query parameters to limit the results. For example, this query confines reports to only those between 6/15/2019 to 9/15/2019:

GET base_url/reconciliationReports?startDate=2019-06-15&endDate=2019-09-15

Downloading a reconciliation report

This example retrieves the booking_report.csv report (as a JSON response) that was uploaded at 2019-08-26T12:00:00:

GET base_url/reconciliationReports/2019-08-26T12%3A00%3A00~bookings.csv

Validating a reconciliation report

You can use this method to validate the report before uploading it. Validating a report does not upload it.

The reconciliation report is included in the body of the request, as the value for the contents field. The reconciliation report must follow the syntax described in Reconciliation reports.

The following example validates a report for account 12345678:

POST https://travelpartner.googleapis.com/v3/accounts/12345678/reconciliationReports:validate

Uploading a reconciliation report

After you've confirmed that a reconciliation report is valid, you can upload it to Google like in this example:

POST https://travelpartner.googleapis.com/v3/accounts/12345678/reconciliationReports