Skip to main content

Retrieve Rate Price

Query Overview

The priceRates query allows you to retrieve the price of specific rates in the Inventory. The returned fields include:

  • success
  • rates
    • rateCode
    • currency
    • rooms
    • dateRange
      • start
      • end
    • prices
      • pricePerRoom
        • amount
        • additionalGuestsSupplements
          • additionalAdults
            • additionalGuestType
            • guestPosition
            • amount
            • type
          • additionalChildren
            • additionalGuestType
            • guestPosition
            • amount
            • type
          • additionalInfants
            • additionalGuestType
            • guestPosition
            • amount
            • type
      • pricesPerOccupancy
        • prices
          • amount
          • numberOfAdults
          • numberOfChildren
          • numberOfInfants
    • applicableWeekdays
      • all
      • monday
      • tuesday
      • wednesday
      • thursday
      • friday
      • saturday
      • sunday
  • adviseMessages
    • code
    • description
    • level
    • correlationID
    • external
      • code
      • message

1. Criteria

When building your query, you need to provide the following input fields:

Mandatory Input

  • clientCode
  • supplierCode
  • hotelCode
  • rates
    • rateCode
    • dateRange
      • start
      • end

2. Settings

This query allows retrieving rate prices by defining relevant details such as clientCode, supplierCode, hotelCode, rates, and dateRange.

{
"input": {
"clientCode": "ABC123",
"supplierCode": "SUP001",
"hotelCode": "HTL567",
"rates": [
{
"rateCode": "RATE001",
"dateRange": {
"start": "2024-03-01",
"end": "2024-03-10"
}
}
]
}
}

Response Considerations

The query returns the retrieved rate prices along with success status and possible advise messages.

PriceRatesRs (OBJECT)

  • rates (RatePriceLoad) - List of rate prices with details.
    • rateCode (String) - The rate code for the price.
    • currency (String) - The currency used.
    • dateRange (DateRangeProduct) - Date range applied.
      • start (DateTime) - Start date.
      • end (DateTime) - End date.
    • prices (PricesLoad) - Price details.
  • success (Boolean) - Indicates whether the operation was successful.
  • adviseMessages (array of AdviseMessage) - Messages related to the operation.
    • code (ID) - AM code.
    • type (String) - Error type.
    • description (String) - Error description.
    • level (Enum of AdviseMessageLevel) - Importance level (ERROR, WARN, INFO).
    • external (ExternalMessage) - External message details.
    • correlationID (ID) - Identifier for debugging.

Error Handling

When the operation fails, the envelope returns success: false, data is null, and the reason is described in adviseMessages. Any message with level: ERROR marks the operation as unsuccessful.

The most relevant fields of each advise message are:

  • levelERROR blocks the operation; WARN/INFO are informational.
  • code – machine-readable error code. Common values are INPUT_VALIDATION_FAILED (a field is missing or malformed) and STATE_CONFLICT (the resulting state is not valid).
  • type – exposed in the schema for compatibility but currently not populated; rely on code for programmatic handling.
  • description – human-readable reason, prefixed with the affected identifier when applicable.
  • external – present only when the error originates in an external/source system, carrying its own code and message.
  • correlationID – identifier to share with support when investigating the error.
{
"success": false,
"data": null,
"adviseMessages": [
{
"code": "INPUT_VALIDATION_FAILED",
"description": "RATE001: rateCode not found for the specified hotel.",
"level": "ERROR",
"correlationID": "3f9c1a5e-0b7d-4e2a-9c1b-8a2f7d6e4c10"
}
]
}

Query Inputs

InventoryPriceRatesInput (INPUT_OBJECT)
Retrieve rates query input

clientCode  *  (String)
Client code.

supplierCode  *  (String)
Travelgate Supplier/Channel code.

rates  *  (RatePriceRetrieveInput)
Hotel rates input data.

rateCode (String)
Rate code to be retrieved.

rooms (String)
List of rooms to be retrieved.

dateRange (DateRangeProductInput)
Date range to apply

start  *  (DateTime)
Start date.

end  *  (DateTime)
End date.

hotelCode  *  (String)
Code associated with the hotel.

contextCode (String)
Context code.

Returned Fields

PriceRatesRs (OBJECT)
Represents the response data for rates price operations.

rates (RatePriceLoad)
List of rates prices. See RatePriceLoad.

rateCode (String)
Code associated with the rate.

currency  *  (Currency)
Currency of the rate price. See Currency.

applicableWeekdays (ApplicableWeekdays)
Weekdays when the rate price is applicable. See ApplicableWeekdays.

all (Boolean)
Indicates whether the price or rate is applicable on all days.

monday (Boolean)
Indicates whether the price or rate is applicable on Mondays.

tuesday (Boolean)
Indicates whether the price or rate is applicable on Tuesdays.

wednesday (Boolean)
Indicates whether the price or rate is applicable on Wednesdays.

thursday (Boolean)
Indicates whether the price or rate is applicable on Thursdays.

friday (Boolean)
Indicates whether the price or rate is applicable on Fridays.

saturday (Boolean)
Indicates whether the price or rate is applicable on Saturdays.

sunday (Boolean)
Indicates whether the price or rate is applicable on Sundays.

rooms (String)
List of rooms associated with the rate price.

prices (PricesLoad)
Prices to be loaded. See PricesLoad.

pricePerRoom (PricePerRoom)
Price per room. See PricePerRoom.

amount  *  (Float)
Amount associated with the room. This is the price for the room.

additionalGuestsSupplements (AdditionalGuestsSupplements)
Price supplements for additional passengers. See AdditionalGuestsSupplements.

additionalAdults (AdditionalGuest)
List of additional adults. See AdditionalGuest.

additionalGuestType  *  (Enum of AdditionalGuestType)
Type of the additional guest. See AdditionalGuestType.
Possible values:
ADULT
CHILD
INFANT

guestPosition  *  (Int)
Position of the guest.

amount  *  (Float)
Amount associated with the additional guest.

type (Enum of AmountApplyType)
Type of the amount application. See AmountApplyType.
Possible values:
PERCENTAGE
ADDITIVE
ABSOLUTE

additionalChildren (undefined)
List of additional children. See AdditionalGuest.

additionalInfants (undefined)
List of additional infants. See AdditionalGuest.

pricesPerOccupancy (PricesPerOccupancy)
Prices per occupancy. See PricesPerOccupancy.

prices (PricePerOccupancy)
List of prices per occupancy. See PricePerOccupancy.

amount  *  (Float)
Amount associated with the occupancy. This is the price for the occupancy.

numberOfAdults  *  (Int)
Number of adults in the occupancy.

numberOfChildren (Int)
Number of children in the occupancy.

numberOfInfants (Int)
Number of children in the occupancy.

dateRange (DateRangeProduct)
Date range to apply

start  *  (DateTime)
Start date.

end  *  (DateTime)
End date.

adviseMessages (AdviseMessage)
List of advise messages associated with the operation. See AdviseMessage.

code  *  (ID)
AM code: The following codes can be returned:

description  *  (String)
Error description

level  *  (Enum of AdviseMessageLevel)
Indicates the level of importance of the message. Possible values: ERROR, WARN, INFO.
Possible values:
WARN
ERROR
INFO

external (ExternalMessage)
Specify the external message.

code (String)
External code.

message  *  (String)
External message.

correlationID  *  (ID)
Identifier to investigate the cause of the error.

success  *  (Boolean)
Indicates whether the operation was successful.

Examples

Retrieve price for a specific rate

With this example, we are going to retrieve the price for a specific rate within a specific date range.

Retrieve price for multiple rates

With this example, we are going to retrieve the price for multiple rates within a specific date range.