Update Rates
Mutation Overview
The updateRatesSetUp mutation allows you to update any property of an already added rate to a hotel in a specific client-seller relation in Inventory. The returned fields include:
codenamehotelCodeactivemealPlanIncludedagePoliciesmaxAgeChildrenmaxAgeInfantsfreeInfantsfreeChildren
paymentPoliciescurrencycommissionpriceIsBindingacceptedPaymentstypecardTypes
bookingRulesbookingWindowstartend
marketsincludedexcluded
rateRuleseniorRule
cancelPoliciesbaseCancelPolicyrefundablecancelPenaltiesdaysBeforeArrivalpenaltyTypevalue
cancelPoliciesByDatestartendcancelPolicyrefundablecancelPenaltiesdaysBeforeArrivalpenaltyTypevalue
surchargeschargeTypetaxTypevalueapplyTypeperNightperPax
1. Criteria
When building your mutation, you need to provide the following input fields:
Mandatory Input
clientCodesupplierCodehotelCoderatescode
Optional Input
contextCoderatesnamehotelCodeactivemealPlanIncludedagePoliciesmaxAgeChildrenmaxAgeInfantsfreeInfantsfreeChildren
paymentPoliciescurrencycommissionpriceIsBindingacceptedPaymentstypecardTypes
bookingRulesbookingWindowstartend
marketsincludedexcluded
rateRuleseniorRule
cancelPoliciesbaseCancelPolicyrefundablecancelPenaltiesdaysBeforeArrivalpenaltyTypevalue
cancelPoliciesByDatestartendcancelPolicyrefundablecancelPenaltiesdaysBeforeArrivalpenaltyTypevalue
surchargeschargeTypetaxTypevalueapplyTypeperNightperPax
2. Settings
To update a rate, ensure that all mandatory fields are properly filled out and associate the rate with the correct hotel and seller.
Response Considerations
The mutation returns the updated rate along with success status and possible advise messages.
RatesSetUpRs (OBJECT)
rates(InventoryRateSetup) - A collection of updated rates.code(String) - The rate code.
Allowed characters: Only letters (a–z, A–Z), numbers (0–9), spaces, and the following symbols: (-, _, %, /, (, ), +, *, and uppercase M). Any other characters will be rejected.name(String) - The name of the rate.active(Boolean) - Indicates if the rate is active.mealPlanIncluded(Int) - Indicates if a meal plan is included.paymentPolicies(InventoryPaymentPolicies) - Payment policies associated with the rate.bookingRules(InventoryBookingRules) - Booking rules associated with the rate.cancelPolicies(InventoryCancelPoliciesRate) - Cancellation policies associated with the rate.surcharges(InventorySurcharge) - Surcharges associated with the rate.rooms(InventoryRoomSetUp) - Rooms associated with the rate.
success(Boolean) - Indicates if the operation was successful.adviseMessages(AdviseMessage) - Messages related to the operation.
Mutation Inputs
InventoryRateSetupUpdateInput (INPUT_OBJECT)
Rates setup delete input data
Rates setup delete input data
clientCode * (String)
Client code.
supplierCode * (String)
Travelgate Supplier/Channel code.
rates * (RateUpdateInput)
Rates input data. See RateUpdate. code * (String) Code associated with the rate. Base rate code of the rate. Name of the rate. Indicates whether the rate is active. Meal plan included in the rate. Age policies associated with the rate. See AgePoliciesUpdate. Maximum age for a baby, not inclusive. If true, babies are free of charge. Maximum age for a child, not inclusive. If true, children are free of charge. Payment policies associated with the rate. See PaymentPoliciesUpdate. Currency of the payment. See Currency. Commission applied for all rooms in this rate, leave value 0 for net price. Only Informative. Informs if the prices are binding price. Only Informative. Rate Accepted Payments, if not informed it is MerchantPay. See AcceptedPayment. type * (PaymentType) Booking rules associated with the rate. See BookingRules. Booking Dates for which the rate will be available. Do not send it if you want the rate available for all dates. start * (DateTime) Start date of the booking window. end * (DateTime) End date of the booking window. Markets included or excluded. Do not send if the rate is available for all markets. Only informative. Included markets. Excluded markets. "NoRatePlanType" indicates absence of a specific rate plan. "LargeFamily" and "PublicServant" denote rates tailored for those groups. "Negotiated" and "Package" signify negotiated rates and package deals, respectively. "CanaryResident" and "BalearicResident" are special rates for residents of the Canary Islands and the Balearic Islands, respectively. Lastly, "HoneyMoon" designates rates intended for honeymooners or couples celebrating their honeymoon.
Possible values: "NoSeniorRate" indicates the absence of a senior rate. "SeniorRate_55", "SeniorRate_60", and "SeniorRate_65" denote rates applicable to individuals aged 55, 60, and 65, respectively. These rates are typically offered to seniors as a special discount or incentive.
Possible values: Cancel policies associated with the rate. See CancelPoliciesUpdate. Defines the base cancel policies. Only Informative. See CancelPolicy. refundable * (Boolean) Indicates if the rate is refundable. List of penalties applicable for the rate. See CancelPenalty. daysBeforeArrival * (Int) Number of days prior to arrival day in which this Cancellation policy applies. penaltyType * (PenaltyType) Penalty type. See PenaltyType.
Possible values: value * (Float) Penalty value. Defines a calendar of cancel policies. Only Informative. See CancelPolicyByDate. start * (DateTime) Start date where the cancel policy must apply. end * (DateTime) End date where the cancel policy must apply. cancelPolicy * (InventoryCancelPolicyInput) Cancel policy. See CancelPolicy. refundable * (Boolean) Indicates if the rate is refundable. List of penalties applicable for the rate. See CancelPenalty. daysBeforeArrival * (Int) Number of days prior to arrival day in which this Cancellation policy applies. penaltyType * (PenaltyType) Penalty type. See PenaltyType.
Possible values: value * (Float) Penalty value. Amend policy associated with the rate. See AmendPolicyUpdate. Indicates whether the policy is amendable. List of amend penalties associated with the policy. See AmendPenalty. daysBeforeArrival * (Int) Number of days before arrival. penaltyType * (PenaltyType) Type of penalty.
PenaltyType
Possible values: value * (Float) Value of the penalty. List of surcharges associated with the rate. See Surcharge. chargeType * (InventoryChargeType) Indicates if the surcharge is included or not in the price.
Possible values: taxType * (InventoryTaxType) The type of tax applied to the surcharge.
Possible values: value * (Float) The value of the surcharge. applyType * (InventoryApplyType) The type of application for the surcharge.
Possible values: perNight * (Boolean) Indicates whether the surcharge is applied per night. perPax * (Boolean) Indicates whether the surcharge is applied per person.baseRateCode(String)
name(String)
active(Boolean)
mealPlanIncluded(Int)
agePolicies(AgePoliciesUpdateInput)
maxAgeInfants(Int)
freeInfants(Boolean)
maxAgeChildren(Int)
freeChildren(Boolean)
paymentPolicies(PaymentPoliciesUpdateInput)
currency(Currency)
commission(Float)
priceIsBinding(Boolean)
acceptedPayments(AcceptedPaymentInput)
MERCHANT: Payment is managed by the supplier.DIRECT: Payment is made directly to the actual payee (e.g., the hotel), without involving an intermediary or third party. The payment will be completed at check-in.CARD_BOOKING: Payment is managed by the supplier. The payment is effectuated at the time of booking.CARD_CHECK_IN: Payment is managed by the supplier and is made at the hotel during check-in.cardTypes(PaymentCardType)
VI: VisaAX: American ExpressBC: BC CardCA: MasterCardCB: Carte BlancheCU: China Union PayDS: DiscoverDC: Diners ClubT: Carta SiR: Carte BleueN: DankortL: DeltaE: ElectronJC: Japan Credit BureauTO: MaestroS: SwitchEC: Electronic CashEU: EuroCardTP: universal air travel cardOP: optimaER: Air Canada/RnRouteXS: accessO: othersbookingRules(InventoryBookingRulesInput)
bookingWindow(InventoryBookingWindowInput)
markets(InventoryMarketsInput)
included(String)
excluded(String)
rateRule(RatePlanType)
NO_RATE_PLAN_TYPELARGE_FAMILYPUBLIC_SERVANTNEGOTIATEDPACKAGECANARY_RESIDENTBALEARIC_RESIDENTHONEY_MOONseniorRule(SeniorRate)
NO_SENIOR_RATESENIOR_RATE_55SENIOR_RATE_60SENIOR_RATE_65cancelPolicies(CancelPoliciesUpdateInput)
baseCancelPolicy(InventoryCancelPolicyInput)
cancelPenalties(InventoryCancelPenaltyInput)
AMOUNTNIGHTSPERCENTAGEcancelPoliciesByDate(InventoryCancelPolicyByDateInput)
cancelPenalties(InventoryCancelPenaltyInput)
AMOUNTNIGHTSPERCENTAGEamendPolicy(AmendPolicyUpdateInput)
isAmendable(Boolean)
amendPenalties(AmendPenaltyInput)
AMOUNTNIGHTSPERCENTAGEsurcharges(InventorySurchargeInput)
INCLUDEDEXCLUDEDCITY: The tax is a city tax.LOCAL: The tax is a local tax.RESORT_FEE: The tax is a resort fee.SUPPLEMENT_TO_BE_PAID_ON_SPOT: The tax is a supplement to be paid on spot.PERCENTAGE: The rate is applied as a percentage.AMOUNT: The rate is applied as an amount.
hotelCode * (String)
Code associated with the hotel.
contextCode(String)
Context code.
Examples
Update properties from a rate
With the following mutation, we are going to update the meal plan included in a rate and its cancel policies.
The possible values for mealPlanIncluded can be retrieved using the query Mealplans.