Retrieve Offers Availability
Query Overview
The availOffers
query allows you to retrieve the availability of specific offers in Inventory. The returned fields include:
success
offers
rateCode
offers
code
stopSales
closeMaster
closeOnArrival
closeOnDeparture
dateRange
start
end
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
offers
rateCode
dateRange
start
end
2. Settings
This query allows retrieving availability for specific offers by defining relevant details such as clientCode
, supplierCode
, hotelCode
, and dateRange
.
{
"input": {
"clientCode": "ABC123",
"supplierCode": "SUP001",
"hotelCode": "HTL567",
"offers": [
{
"rateCode": "RATE001",
"dateRange": {
"start": "2024-03-01",
"end": "2024-03-10"
}
}
]
}
}
Response Considerations
The query returns the retrieved offers along with success status and possible advise messages.
AvailRetrieveRs
(OBJECT)
offers
(OffersAvailLoad) - List of retrieved offers with availability information.rateCode
(String) - The rate code for the offers.offers
(OfferAvailLoad) - List of retrieved offers.code
(String) - Offer code.stopSales
(StopSales) - Stop sales conditions.closeMaster
(Boolean) - Close master flag.closeOnArrival
(Boolean) - Close on arrival flag.closeOnDeparture
(Boolean) - Close on departure flag.
dateRange
(DateRangeProduct) - Date range applied.start
(DateTime) - Start date.end
(DateTime) - End date.
success
(Boolean) - Indicates whether the operation was successful.adviseMessages
(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.
Query Inputs
InventoryAvailOffersInput (INPUT_OBJECT)
Retrieve availability offers query input
Retrieve availability offers query input
clientCode * (String)
Client code.
Client code.
supplierCode * (String)
Travelgate Supplier/Channel code.
Travelgate Supplier/Channel code.
offers * (OffersAvailRetrieveInput)
Hotel offers input data.
Hotel offers input data.
rateCode (String)
Rate code associated with the offers to retrieve.
Rate code associated with the offers to retrieve.
offers (String)
List of offers to retrieve.
List of offers to retrieve.
dateRange (DateRangeProductInput)
Date range to apply
Date range to apply
start * (DateTime)
Start date.
Start date.
end * (DateTime)
End date.
End date.
hotelCode * (String)
Code associated with the hotel.
Code associated with the hotel.
contextCode (String)
Context code.
Context code.
Returned Fields
AvailRetrieveRs (OBJECT)
Represents the response of an availability retrieve operation.
Represents the response of an availability retrieve operation.
rates (RateAvailLoad)
List of rates retrieved. See RateAvailLoad.
List of rates retrieved. See RateAvailLoad.
rateCode (String)
Code associated with the rate.
Code associated with the rate.
rooms (String)
List of rooms associated with the rate.
List of rooms associated with the rate.
restrictions (RestrictionsLoad)
Restrictions for the rate. See RestrictionsLoad.
Restrictions for the rate. See RestrictionsLoad.
bookingLimit (Int)
Booking limit associated with the product.
Booking limit associated with the product.
lengthOfStay (LengthOfStay)
Length of stay associated with the product. See LengthOfStay.
Length of stay associated with the product. See LengthOfStay.
fullStay (FullStay)
Full stay associated with the product. See FullStay.
Full stay associated with the product. See FullStay.
minimum (Int)
Minimum length of the full stay.
Minimum length of the full stay.
maximum (Int)
Maximum length of the full stay.
Maximum length of the full stay.
arrival (InventoryArrivalType)
Arrival associated with the product. See Arrival.
Arrival associated with the product. See Arrival.
minimum (Int)
Minimum length of the arrival period.
Minimum length of the arrival period.
maximum (Int)
Maximum length of the arrival period.
Maximum length of the arrival period.
minRelease (Int)
Minimum release period associated with the product.
Minimum release period associated with the product.
maxRelease (Int)
Maximum release period associated with the product.
Maximum release period associated with the product.
stopSales (StopSales)
Stop sales associated with the product. See StopSales.
Stop sales associated with the product. See StopSales.
closeMaster (Boolean)
Indicates whether to close the master.
Indicates whether to close the master.
closeOnArrival (Boolean)
Indicates whether to close on arrival. Null if not applicable.
Indicates whether to close on arrival. Null if not applicable.
closeOnDeparture (Boolean)
Indicates whether to close on departure. Null if not applicable.
Indicates whether to close on departure. Null if not applicable.
freeSales (Boolean)
Indicates whether the product is available for free sales.
Indicates whether the product is available for free sales.
applicableWeekdays (ApplicableWeekdays)
Weekdays when the rate is applicable. See ApplicableWeekdays.
Weekdays when the rate is applicable. See ApplicableWeekdays.
all (Boolean)
Indicates whether the price or rate is applicable on all days.
Indicates whether the price or rate is applicable on all days.
monday (Boolean)
Indicates whether the price or rate is applicable on Mondays.
Indicates whether the price or rate is applicable on Mondays.
tuesday (Boolean)
Indicates whether the price or rate is applicable on Tuesdays.
Indicates whether the price or rate is applicable on Tuesdays.
wednesday (Boolean)
Indicates whether the price or rate is applicable on Wednesdays.
Indicates whether the price or rate is applicable on Wednesdays.
thursday (Boolean)
Indicates whether the price or rate is applicable on Thursdays.
Indicates whether the price or rate is applicable on Thursdays.
friday (Boolean)
Indicates whether the price or rate is applicable on Fridays.
Indicates whether the price or rate is applicable on Fridays.
saturday (Boolean)
Indicates whether the price or rate is applicable on Saturdays.
Indicates whether the price or rate is applicable on Saturdays.
sunday (Boolean)
Indicates whether the price or rate is applicable on Sundays.
Indicates whether the price or rate is applicable on Sundays.
dateRange (DateRangeProduct)
Date range to apply
Date range to apply
start * (DateTime)
Start date.
Start date.
end * (DateTime)
End date.
End date.
derivedRates (DerivedRatesAvailLoad)
List of derived rates retrieved. See DerivedRatesAvailLoad.
List of derived rates retrieved. See DerivedRatesAvailLoad.
baseRateCode (String)
Base rate code associated with the derived rates.
Base rate code associated with the derived rates.
rates (DerivedRateAvailLoad)
List of derived rates to load. See DerivedRateAvailLoad.
List of derived rates to load. See DerivedRateAvailLoad.
rateCode (String)
Code associated with the rate.
Code associated with the rate.
isActive * (Boolean)
Indicates whether the rate is active.
Indicates whether the rate is active.
restrictions (RestrictionsDerivedRateLoad)
Restrictions to load for the derived rate. See RestrictionsLoad.
Restrictions to load for the derived rate. See RestrictionsLoad.
minRelease (Int)
Minimum release period associated with the product.
Minimum release period associated with the product.
maxRelease (Int)
Maximum release period associated with the product.
Maximum release period associated with the product.
offers (OffersAvailLoad)
List of offers retrieved. See OffersAvailLoad.
List of offers retrieved. See OffersAvailLoad.
rateCode (String)
List of rate codes associated with the offers.
List of rate codes associated with the offers.
offers (OfferAvailLoad)
List of offers to load. See OfferAvailLoad.
List of offers to load. See OfferAvailLoad.
code (String)
Code associated with the offer.
Code associated with the offer.
success * (Boolean)
Indicates whether the operation was successful.
Indicates whether the operation was successful.
adviseMessages (AdviseMessage)
List of advise messages associated with the operation. See AdviseMessage.
List of advise messages associated with the operation. See AdviseMessage.
code * (ID)
AM code: The following codes can be returned:
AM code: The following codes can be returned:
description * (String)
Error description
Error description
level * (Enum of AdviseMessageLevel)
Indicates the level of importance of the message.
Possible values: ERROR, WARN, INFO.
Possible values:
WARN
ERROR
INFO
Indicates the level of importance of the message. Possible values: ERROR, WARN, INFO.
Possible values:
WARN
ERROR
INFO
external (ExternalMessage)
Specify the external message.
Specify the external message.
code (String)
External code.
External code.
message * (String)
External message.
External message.
correlationID * (ID)
Identifier to investigate the cause of the error.
Identifier to investigate the cause of the error.
Examples
Retrieve availability for a specific offer
With this example, we are going to retrieve the availability for a specific offer within a specific date range.
Retrieve availability for multiple offers
With this example, we are going to retrieve the availability for multiple offers within a specific date range.