Update Offers
Mutation Overview
The updateOffersSetUp mutation allows you to update existing offers' properties (except the offer code). The returned fields include:
codedescriptionisActiverateCoderoomCodesmontuewedthufrisatsunapplyFromapplyTonumberOfNightsminLosmaxLosnightsType
1. Criteria
When building your mutation, you need to provide the following input fields:
Mandatory Input
clientCodesupplierCodehotelCoderateCodeofferscode
Optional Input
contextCodeoffersdescriptionisActiverateCoderoomCodesmontuewedthufrisatsunapplyFromapplyTonumberOfNightsminLosmaxLosnightsType
2. Settings
Ensure that the provided fields match the structure of existing hotel offers and that updates are relevant to your inventory setup.
Response Considerations
The mutation returns the updated offer details along with success status and possible advise messages.
OffersRs (OBJECT)
offers(OfferDto) - A collection of updated offers.code(String) - The offer code.description(String) - Description of the offer.isActive(Boolean) - Indicates if the offer is active.rateCode(String) - The rate code associated with the offer.nightsType(Enum of NightsType) - The type of nights the offer applies to.numberOfNights(Int) - Number of nights the offer applies to.applyFrom(DateTime) - Start date when the offer applies.applyTo(DateTime) - End date when the offer applies.minLos(Int) - Minimum length of stay required.maxLos(Int) - Maximum length of stay allowed.roomCodes(String) - The room codes associated with the offer.mon(Boolean) - Applies on Monday.tue(Boolean) - Applies on Tuesday.wed(Boolean) - Applies on Wednesday.thu(Boolean) - Applies on Thursday.fri(Boolean) - Applies on Friday.sat(Boolean) - Applies on Saturday.sun(Boolean) - Applies on Sunday.
success(Boolean) - Indicates if the operation was successful.adviseMessages(AdviseMessage) - Messages related to the operation.
Mutation Inputs
InventoryOffersSetupUpdateInput (INPUT_OBJECT)
Offers setup update input.
Offers setup update input.
clientCode * (String)
Client code.
supplierCode * (String)
Travelgate Supplier/Channel code.
offers * (InventoryOfferSetupUpdateInput)
Offers input data. The type of the offer.
Possible values: The offer code. The description of the offer. Indicates whether the offer applies on Monday. Indicates whether the offer applies on Tuesday. Indicates whether the offer applies on Wednesday. Indicates whether the offer applies on Thursday. Indicates whether the offer applies on Friday. Indicates whether the offer applies on Saturday. Indicates whether the offer applies on Sunday. Indicates whether the offer is active. The start date when the offer applies. The end date when the offer applies. The number of nights for the offer. The minimum length of stay for the offer. The maximum length of stay for the offer. The room codes associated with the offer.nightsType(NightsType)
FIRST: Apply to the first nights.LAST: Apply to the last nights.CHEAPEST: Apply to the cheapest nights.code(String)
description(String)
mon(Boolean)
tue(Boolean)
wed(Boolean)
thu(Boolean)
fri(Boolean)
sat(Boolean)
sun(Boolean)
isActive(Boolean)
applyFrom(DateTime)
applyTo(DateTime)
numberOfNights(Int)
minLos(Int)
maxLos(Int)
roomCodes(String)
hotelCode * (String)
Code associated with the hotel.
contextCode(String)
Context code.
rateCode * (String)
Rate Code .
Returned Fields
OffersRs (OBJECT)
Represents a response object for offers.
Represents a response object for offers.
adviseMessages(AdviseMessage)
Gets or sets the list of advise messages associated with the offers.
See AdviseMessage. code * (ID) AM code: The following codes can be returned: description * (String) Error description level * (AdviseMessageLevel) Indicates the level of importance of the message.
Possible values: ERROR, WARN, INFO.
Possible values: Specify the external message. External code. message * (String) External message. correlationID * (ID) Identifier to investigate the cause of the error.WARN: Warning message.ERROR: Error message.INFO: Info message.external(ExternalMessage)
code(String)
offers(OfferDto)
Gets or sets the list of offers.
See OfferDto. The rate code of the offer. The offer code. isActive * (Boolean) Indicates whether the offer is active. The description of the offer. nightsType * (NightsType) The type of the offer.
Possible values: The maximum length of stay for the offer. The minimum length of stay for the offer. The start date when the offer applies. The end date when the offer applies. The number of free nights for the offer. The room codes associated with the offer. Indicates whether the offer applies on Monday. Indicates whether the offer applies on Tuesday. Indicates whether the offer applies on Wednesday. Indicates whether the offer applies on Thursday. Indicates whether the offer applies on Friday. Indicates whether the offer applies on Saturday. Indicates whether the offer applies on Sunday.rateCode(String)
code(String)
description(String)
FIRST: Apply to the first nights.LAST: Apply to the last nights.CHEAPEST: Apply to the cheapest nights.maxLos(Int)
minLos(Int)
applyFrom(DateTime)
applyTo(DateTime)
numberOfNights(Int)
roomCodes(String)
mon(Boolean)
tue(Boolean)
wed(Boolean)
thu(Boolean)
fri(Boolean)
sat(Boolean)
sun(Boolean)
success * (Boolean)
Gets a value indicating whether the operation was successful.
Examples
Update a offer
With the following mutation, we are going set that the offer "TEST_OFFER" only applies for room "STD3".