Prices API v1.2

The Prices API retrieves itinerary/pricing data and bid data for a given property.

Prices API requests

Path: /prices

Parameters:

Element Required? Description
hotel_id Required Specifies the property ID of the hotel for which you want to retrieve pricing information. This ID matches the ID that you give the property in your Hotel List Feed.
partner Optional Identifies the technical name of the account for which you are requesting data. The value of this parameter is not the same as the partner name in the Hotel Ads Center or the partner ID (which is a number). If you do not know the technical name, contact us to request it.

The following example request gets pricing data for hotel 42:

https://www.googleapis.com/travelpartner/v1.2/prices?partner=Capybara&hotel_id=42

Prices API Results

The table below describes the return values for Prices API fields:

Element Description
kind The API that returned the result. Takes the form: travelpartner#API_type.
Prices The Prices array includes the following information about each itinerary for the property:
  • Checkin: The check-in date for the itinerary, in the format MM/DD/YYYY.
  • Nights: The number of nights for the itinerary, as an integer.
  • Baserate: The base price of the room or Room Bundle.
  • TaxAndOtherFees: The value of taxes and fees, if they were itemized in the Hotel Price Feed.
  • Currency: The three-letter currency code for the price.
  • LastUpdateTime: Specifies the the last time the pricing data for this property was updated, as a timestamp.
  • IsVisible: Indicates whether or not this price is visible to end-users. A value of "false" typically indicates that there was an error with the bid. In this case, the Prices API includes the ErrorReasons field that describes the error.
  • IsComplete: Indicates whether the pricing data for the property is complete. Data can be considered incomplete if the taxes and fees are not available, but the property's price is tagged as all-inclusive.
  • ErrorReasons: Indicates the reason for a problem with the property's pricing. For more information, see Pricing Errors.
Bids (Hotel Ads only) The Bids array describes the bids for the specified property. For more information, see Bids API. The objects in this array can include the following fields:

  • BidRate: The calculated bid rate for the bid.
  • Currency: The three-letter currency code for the currency in which the bid was placed.
  • Type: The type of bid. Possible values are "BID_PERCENTAGE" and "BID_FIXED".
  • LastUpdateTime: The last time that a bid was submitted for this property, as a timestamp.
  • BidMultipliers: Specifies an array of bid multipliers, if any. Each object in the array includes the value of the multiplier, plus an array of values for that dimension. Child elements are:
    MultiplierThe value of the bid multiplier for the current dimension, as a floating point value.
    SitesSpecifies an array of values for the bid's site dimension; valid values are "mapsresults", "localuniversal", and "placepage".
    UserCountrySpecifies an array of two-letter country codes for the bid's country dimension.
    DeviceTypesSpecifies an array of device types for the bid's device type dimension.
    LengthOfStayMinNightsSpecifies an array of integers for the bid's length of stay dimension. Values are an integer from 1 through 14.
    CheckinDaysOfWeekSpecifies an array of days for the bid's day of week dimension. Possible values are "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
    AdvanceBookingWindowMinDaysSpecifies a multiplier based on the number of days in advance an end-user books.
  • BaseBidSource: Possible values are "FROM_PARTNER", "FROM_GROUP", and "FROM_HOTEL".
  • MultiplierSource: Possible values are "FROM_PARTNER", "FROM_GROUP", and "FROM_HOTEL".

The bidding information above only applies to Hotel Ads.

Example Response

The following example shows a sample response for the Prices API:

{
  "kind": "travelpartner#prices",
  "googleClusterId": "13493672096533882764",
  "Prices": [
    {
      "Checkin": "10/30/2013",
      "Nights": 2,
      "Baserate": 164.98,
      "TaxAndOtherFees": 21.61,
      "Currency": "USD",
      "LastUpdateTime": "2013-10-30 11:44:01",
      "IsVisible": true,
      "IsComplete": true
    },
    {
      "Checkin": "10/29/2013",
      "Nights": 1,
      "LastUpdateTime": "2011-05-27 13:09:31",
      "IsVisible": false,
      "IsComplete": true,
      "ErrorReasons": [
        "Room unavailable."
      ]
    }
  ],

  "Bids": [
    {
      "BidRate": 4.75,
      "Type": "BID_PERCENTAGE",
      "BidMultipliers": [
        {
          "Multiplier": 0.8,
          "DeviceTypes": [
            "mobile"
          ]
        },
        {
          "Multiplier": 1.1,
          "CheckinDaysOfWeek": [
            "Monday",
            "Wednesday",
            "Friday",
            "Sunday"
          ]
        },
        {
          "Multiplier": 1.1,
          "AdvanceBookingWindowMinDays": 7
        },
        {
          "Multiplier": 1.2,
          "AdvanceBookingWindowMinDays": 14
        },
        {
          "Multiplier": 1.0,
          "AdvanceBookingWindowMinDays": 30
        },
        {
          "Multiplier": 0.8,
          "AdvanceBookingWindowMinDays": 60
        }
      ]
      "BaseBidSource": "FROM_PARTNER",
      "MultiplierSource": "FROM_PARTNER"
    }
  ]
  
}

Pricing errors

In some cases, pricing data for a property returns an error. The Prices API provides an ErrorReasons field that describes the reason for the error. Possible values include:

  • Price missing: The price for this itinerary is missing.
  • Partner inactive: This partner is not currently active.
  • Property disabled: This property has been disabled for this partner by Google.
  • Incomplete taxes and fees: This itinerary does not have appropriate information for taxes and fees.
  • Missing taxes and fees: The taxes and fees for this itinerary are missing.
  • Currency missing: The currency information is not available.
  • Room unavailable: A room is not available for this itinerary.
  • All inclusive rate set: The all-inclusive rate was set. (This property might not appear for US/CA locations.)

Prices API changes

The Prices API version 1.2 has changed from version 1.1 (sunsetted).

The JSON results have changed to add support for the Advance Booking Window and Days of Week bid multipliers. The JSON response has the following new objects:

  • AdvanceBookingWindowMinDays
  • CheckinDaysOfWeek

Enviar comentarios sobre…

¿Necesitas ayuda? Visita nuestra página de asistencia.