Load Offers Availability
Mutation Overview
The loadOffersAvailability
mutation allows you to load 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 mutation, you need to provide the following input fields:
Mandatory Input
clientCode
supplierCode
hotelCode
offers
rateCode
offers
code
stopSales
closeMaster
closeOnArrival
closeOnDeparture
dateRange
start
end
2. Settings
This mutation allows you to load 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",
"offers": [
{
"code": "OFFER123",
"stopSales": {
"closeMaster": true,
"closeOnArrival": false,
"closeOnDeparture": true
}
}
],
"dateRange": {
"start": "2024-03-01",
"end": "2024-03-10"
}
}
]
}
}
Response Considerations
The mutation returns the processed offers along with success status and possible advise messages.
AvailOffersRs
(OBJECT)
offers
(OffersAvailLoad) - List of offers with availability information.rateCode
(String) - The rate code for the offers.offers
(OfferAvailLoad) - List of loaded 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.
Mutation Inputs
InventoryLoadAvailOffersInput (INPUT_OBJECT)
Load availability offers mutation input
Load availability offers mutation input
clientCode * (String)
Client code.
Client code.
supplierCode * (String)
Travelgate Supplier/Channel code.
Travelgate Supplier/Channel code.
offers * (OffersAvailLoadInput)
Hotel offers input data.
Hotel offers input data.
rateCode (String)
List of rate codes associated with the offers.
List of rate codes associated with the offers.
offers (OfferAvailLoadInput)
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.
stopSales (StopSalesInput)
Stop sales associated with the offer. See StopSales.
Stop sales associated with the offer. 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.
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
AvailOffersRs (OBJECT)
Represents the response data for offers availability operations.
Represents the response data for offers availability operations.
offers (OffersAvailLoad)
List of offers availabilities. See OffersAvailLoad.
List of offers availabilities. 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.
stopSales (StopSales)
Stop sales associated with the offer. See StopSales.
Stop sales associated with the offer. 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.
dateRange (DateRangeProduct)
Date range to apply
Date range to apply
start * (DateTime)
Start date.
Start date.
end * (DateTime)
End date.
End date.
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.
success * (Boolean)
Indicates whether the operation was successful.
Indicates whether the operation was successful.
Examples
Load availability for a specific offer
With this example, we are going to load the availability for a specific offer within a specific date range.