Load Offers Availability
Mutation Overview
The loadOffersAvailability mutation allows you to load the availability of specific offers in Inventory. The returned fields include:
successoffersrateCodeofferscodestopSalescloseMastercloseOnArrivalcloseOnDeparture
dateRangestartend
adviseMessagescodedescriptionlevelcorrelationIDexternalcodemessage
1. Criteria
When building your mutation, you need to provide the following input fields:
Mandatory Input
clientCodesupplierCodehotelCodeoffersrateCodeofferscodestopSalescloseMastercloseOnArrivalcloseOnDeparture
dateRangestartend
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(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 and nothing is loaded.
The most relevant fields of each advise message are:
level–ERRORblocks the operation;WARN/INFOare informational (e.g. an element skipped in a batch while the rest succeeded).code– machine-readable error code. Common values areINPUT_VALIDATION_FAILED(a field is missing or malformed) andSTATE_CONFLICT(the resulting state is not valid).type– exposed in the schema for compatibility but currently not populated; rely oncodefor 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 owncodeandmessage.correlationID– identifier to share with support when investigating the error.
{
"success": false,
"data": null,
"adviseMessages": [
{
"code": "INPUT_VALIDATION_FAILED",
"description": "OFFER001: offerCode not found for the specified hotel.",
"level": "ERROR",
"correlationID": "3f9c1a5e-0b7d-4e2a-9c1b-8a2f7d6e4c10"
}
]
}
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:
WARNERRORINFOexternal (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.