Method: accounts.propertyPerformanceReportViews.query

Provides the ability to query (get, filter, and segment) a property performance links report for a specific account.

HTTP request

GET https://travelpartner.googleapis.com/v3/{name=accounts/*}/propertyPerformanceReportViews:query

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

The resource name of the account being queried. Format: accounts/{account_id}

Query parameters

Parameters
filter

string

The conditions (fields and expressions) used to filter the property performance metrics for the account being queried. The syntax requires spaces surrounding the in operator. Otherwise, spaces can be omitted. Conditions can be joined using the and operator.

The date field is required. All other fields are optional.

The date field values are inclusive and must be in YYYY-MM-DD format. The earliest acceptable date is 2021-03-09; earlier date values will be coerced to 2021-03-09.

Values for partnerPropertyDisplayName and brand are matched case-insensitively.

Examples of valid conditions are as follows:

  • advanceBookingWindow = 'ADVANCE_BOOKING_WINDOW_SAME_DAY'
  • advanceBookingWindow in ('ADVANCE_BOOKING_WINDOW_SAME_DAY', 'ADVANCE_BOOKING_WINDOW_DAYS_61_TO_90')
  • brand = 'Brand A'
  • brand in ('Brand A', 'brand B')
  • date = '2021-12-03'
  • date between '2021-12-03' and '2021-12-08'
  • deviceType = 'TABLET'
  • deviceType in ('MOBILE', 'TABLET')
  • highIntentUsers = 'TRUE'
  • highIntentUsers = 'FALSE'
  • lengthOfStay = 'LENGTH_OF_STAY_NIGHTS_2'
  • lengthOfStay in ('LENGTH_OF_STAY_NIGHTS_2', 'LENGTH_OF_STAY_NIGHTS_4_TO_7')
  • propertyRegionCode = 'US'
  • propertyRegionCode in ('US', 'CA')
  • occupancy = 'OCCUPANCY_2'
  • occupancy in ('OCCUPANCY_2', 'OCCUPANCY_OVER_4')
  • partnerPropertyId = 'AAA'
  • partnerPropertyId in ('AAA', 'BBB')
  • partnerPropertyDisplayName = 'hotel A'
  • partnerPropertyDisplayName in ('Hotel A', 'HOTEL b')
  • userRegionCode = 'US'
  • userRegionCode in ('US', 'CA')
aggregateBy

string

Specifies how to segment the metrics returned by the query. For example, if userRegionCode is specified, the PropertyPerformanceResult will provide metrics aggregated by user region.

The string value is a comma-separated list of fields. Valid fields are: advanceBookingWindow, brand, date, deviceType, highIntentUsers, lengthOfStay, propertyRegionCode, occupancy partnerPropertyId, partnerPropertyDisplayName, and userRegionCode, . Only fields specified here are included in the PropertyPerformanceResult.

pageSize

integer

The maximum number of participation results to return. The service may return fewer than this value. If unspecified, at most 10,000 results will be returned. The maximum value is 10,000; values above 10,000 will be coerced to 10,000.

pageToken

string

A page token, received from a previous participationReportViews.query request. Provide this to receive the subsequent page.

When paginating, all other parameters provided to participationReportViews.query must match the call that provided the page token.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response message for PropertyPerformanceReportService.QueryPropertyPerformanceReport.

JSON representation
{
  "results": [
    {
      object (PropertyPerformanceResult)
    }
  ],
  "nextPageToken": string
}
Fields
results[]

object (PropertyPerformanceResult)

The list of results that match the query.

nextPageToken

string

Pagination token used to retrieve the next page of results. If this field is omitted, there are no subsequent pages.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/travelpartner

For more information, see the OAuth 2.0 Overview.

PropertyPerformanceResult

Represents a result from querying for the property performance report for an account.

JSON representation
{
  "date": {
    object (Date)
  },
  "advanceBookingWindow": enum (AdvanceBookingWindow),
  "brand": string,
  "deviceType": enum (Device),
  "highIntentUsers": boolean,
  "lengthOfStay": enum (LengthOfStay),
  "propertyRegionCode": string,
  "occupancy": enum (Occupancy),
  "partnerPropertyId": string,
  "partnerPropertyDisplayName": string,
  "userRegionCode": string,
  "clickCount": string,
  "impressionCount": string,
  "clickthroughRate": number
}
Fields
date

object (Date)

A date within the requested date range.

Only present if date is specified in aggregateBy in the request.

advanceBookingWindow

enum (AdvanceBookingWindow)

Difference in days between query date and check-in date in property's local timezone.

Only present if advanceBookingWindow is specified in aggregateBy in the request.

brand

string

Partner-specified brand for the property.

Only present if brand is specified in aggregateBy in the request.

deviceType

enum (Device)

The user’s device type.

Only present if deviceType is specified in aggregateBy in the request.

highIntentUsers

boolean

Whether the user’s query indicated a strong interest in booking.

Only present if highIntentUsers is specified in aggregateBy in the request.

lengthOfStay

enum (LengthOfStay)

Number of nights between check-in and check-out dates specified by user.

Only present if lengthOfStay is specified in aggregateBy in the request.

propertyRegionCode

string

ISO 3116 region code of the country/region of the property.

Only present if propertyRegionCode is specified in aggregateBy in the request

occupancy

enum (Occupancy)

Requested number of people staying at the property.

Only present if partnerPropertyId is specified in aggregateBy in the request.

partnerPropertyId

string

Partner's property ID.

Only present if partnerPropertyId is specified in aggregateBy in the request.

partnerPropertyDisplayName

string

Partner's property name.

Only present if partnerPropertyDisplayName is specified in aggregateBy in the request.

userRegionCode

string

ISO 3116 region code of the country/region of the user.

Only present if userRegionCode is specified in aggregateBy in the request

clickCount

string (int64 format)

The total number of clicks that were recorded for this result.

impressionCount

string (int64 format)

The total number of impressions that were recorded for this result. This value is rounded to preserve user privacy.

clickthroughRate

number

Equal to clickCount divided by impressionCount.

AdvanceBookingWindow

Enumerates supported advance booking windows (ABW). All date comparisons are in property's timezone.

Enums
ADVANCE_BOOKING_WINDOW_UNSPECIFIED Not specified.
ADVANCE_BOOKING_WINDOW_SAME_DAY Check-in date was same as query date.
ADVANCE_BOOKING_WINDOW_NEXT_DAY Check-in date was next day after query date.
ADVANCE_BOOKING_WINDOW_DAYS_2_TO_7 Check-in date was 2-7 days after query date.
ADVANCE_BOOKING_WINDOW_DAYS_8_TO_14 Check-in date was 8-14 days after query date.
ADVANCE_BOOKING_WINDOW_DAYS_15_TO_30 Check-in date was 15-30 days after query date.
ADVANCE_BOOKING_WINDOW_DAYS_31_TO_60 Check-in date was 31-60 days after query date.
ADVANCE_BOOKING_WINDOW_DAYS_61_TO_90 Check-in date was 61-90 days after query date.
ADVANCE_BOOKING_WINDOW_DAYS_91_TO_120 Check-in date was 91-120 days after query date.
ADVANCE_BOOKING_WINDOW_DAYS_121_TO_150 Check-in date was 121-150 days after query date.
ADVANCE_BOOKING_WINDOW_DAYS_151_TO_180 Check-in date was 151-180 days after query date.
ADVANCE_BOOKING_WINDOW_DAYS_OVER_180 Check-in date was over 180 days after query date.

LengthOfStay

Enumerates supported length of stay (LOS).

Enums
LENGTH_OF_STAY_UNSPECIFIED Not specified.
LENGTH_OF_STAY_NIGHTS_1 Single night stay.
LENGTH_OF_STAY_NIGHTS_2 Stay of 2 nights.
LENGTH_OF_STAY_NIGHTS_3 Stay of 3 nights.
LENGTH_OF_STAY_NIGHTS_4_TO_7 Stay of 4-7 nights.
LENGTH_OF_STAY_NIGHTS_8_TO_14 Stay of 8-14 nights.
LENGTH_OF_STAY_NIGHTS_15_TO_21 Stay of 15-21 nights.
LENGTH_OF_STAY_NIGHTS_22_TO_30 Stay of 22-30 nights.
LENGTH_OF_STAY_NIGHTS_OVER_30 Stay of over 30 nights.

Occupancy

Enumerates supported total room occupancy.

Enums
OCCUPANCY_UNSPECIFIED Not specified.
OCCUPANCY_1 Single person.
OCCUPANCY_2 Two people.
OCCUPANCY_3 Three people.
OCCUPANCY_4 Four people.
OCCUPANCY_OVER_4 Over 4 people.