Create Rates
Mutation Overview
The createRateSetUp mutation allows you to create new rates for 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
clientCodesupplierCodehotelCoderatescodenameactivemealPlanIncludedagePoliciesmaxAgeChildrenmaxAgeInfantsfreeInfantsfreeChildren
paymentPoliciescurrencycommissionpriceIsBindingacceptedPaymentstypecardTypes
cancelPolicies
Optional Input
contextCoderatesbookingRulesbookingWindowstartend
marketsincludedexcluded
rateRuleseniorRule
surchargeschargeTypetaxTypevalueapplyTypeperNightperPax
2. Settings
Ensure that the provided fields match the structure of existing hotel rates and that updates are relevant to your inventory setup.
Response Considerations
The mutation returns the created rate details along with success status and possible advise messages.
RatesRs (OBJECT)
rates(InventoryRateSetup) - A collection of created rates.code(String) - The rate code.name(String) - Name of the rate.active(Boolean) - Indicates if the rate is active.hotelCode(String) - The hotel code associated with the rate.mealPlanIncluded(Int) - Indicates if the meal plan is included.agePolicies(AgePoliciesCreateInput) - Age policies for the rate.paymentPolicies(PaymentPoliciesCreateInput) - Payment policies for the rate.bookingRules(InventoryBookingRulesInput) - Booking rules associated with the rate.cancelPolicies(CancelPoliciesCreateInput) - Cancel policies associated with the rate.surcharges(InventorySurchargeInput) - Surcharges associated with the rate.
success(Boolean) - Indicates if the operation was successful.adviseMessages(AdviseMessage) - Messages related to the operation.
Mutation Inputs
InventoryRatesSetupCreateInput (INPUT_OBJECT)
Rates Setup update mutation input
Rates Setup update mutation input
clientCode * (String)
Client code.
supplierCode * (String)
Travelgate Supplier/Channel code.
rates * (InventoryRateSetupCreateInput)
Hotel input data. code * (String) Code associated with the rate. name * (String) Name of the rate. active * (Boolean) Indicates whether the rate is active. mealPlanIncluded * (Int) Indicates if the meal plan is included in the rate. agePolicies * (AgePoliciesCreateInput) Age policies associated with the rate. maxAgeInfants * (Int) Maximum age for a baby, not inclusive. freeInfants * (Boolean) Indicates whether babies are free of charge. maxAgeChildren * (Int) Maximum age for a child, not inclusive. freeChildren * (Boolean) Indicates whether children are free of charge. paymentPolicies * (PaymentPoliciesCreateInput) Payment policies associated with the rate. currency * (Currency) Currency associated with the payment policies.
Currency commission * (Float) Commission applied for all rooms in this rate, leave value 0 for net price. Only Informative. priceIsBinding * (Boolean) Informs if the prices are binding price. Only Informative. Rate Accepted Payments, if not informed it is MerchantPay.
AcceptedPayment type * (PaymentType) Booking rules associated with the rate. 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: cancelPolicies * (CancelPoliciesCreateInput) Cancel policies associated with the rate. Defines the base cancel policies. Only Informative.
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.
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. Surcharges associated with the rate. 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.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_65baseCancelPolicy(InventoryCancelPolicyInput)
cancelPenalties(InventoryCancelPenaltyInput)
AMOUNTNIGHTSPERCENTAGEcancelPoliciesByDate(InventoryCancelPolicyByDateInput)
cancelPenalties(InventoryCancelPenaltyInput)
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)
Hotel codes of the rooms to retrieve.
contextCode(String)
Travelgate Supplier/Channel context code.
Returned Fields
RatesRs (OBJECT)
Represents the response object for rates setup operations.
Represents the response object for rates setup operations.
adviseMessages(AdviseMessage)
Collection of advise messages. 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)
rates(InventoryRateSetup)
Collection of rate output objects. Code associated with the rate. Name of the rate. active * (Boolean) Indicates whether the rate is active. mealPlanIncluded * (Int) Indicates if the meal plan included in the rate. Base rate code associated with the rate. Age policies associated with the rate. maxAgeInfants * (Int) Max age baby not inclusive freeInfants * (Boolean) If true the babies are free of charge maxAgeChildren * (Int) Max age child not inclusive freeChildren * (Boolean) If true children are free of charge Payment policies associated with the rate. currency * (Currency) Currency of the rate commission * (Float) Commission applied for all rooms in this rate, leave value 0 for net price. Only Informative. priceIsBinding * (Boolean) Indicates whether the prices are binding prices, meaning they cannot be sold for a lower price. This information is for informative purposes only. Accepted payment methods for the rate. If not informed, it defaults to MerchantPay. type * (PaymentType) Booking rules associated with the rate. 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. Defines the base cancel policies. Only Informative. 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. This defines a calendar of cancel policies, serving as informational data. If base cancel policies exist for a particular day, the CancelPoliciesByDate take precedence. start * (DateTime) Start date where the cancel policy must apply. end * (DateTime) End date where the cancel policy must apply. cancelPolicy * (InventoryCancelPolicy) 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. Surcharges associated with the rate. 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. Rooms associated with the rate. Code associated with the room. Master of the room. id * (Int) Id associated with the room master. Code associated with the room. Name associated with the room. active * (Boolean) Indicates whether the room is active. External code associated with the room. standard * (Int) Standard of the room. Typically the number of guests. uses * (InventoryRoomUse) List of uses associated with the room. numberOfGuests * (Int) Gets or sets the number of guests allowed in the room. minAge * (Int) Gets or sets the minimum age allowed for guests in the room. maxAge * (Int) Gets or sets the maximum age allowed for guests in the room. paxType * (InventoryPaxType) Gets or sets the type of guests allowed in the room.
PaxType
Possible values: Hotel code associated with the rate.code(String)
name(String)
baseCode(String)
agePolicies(InventoryAgePolicies)
paymentPolicies(InventoryPaymentPolicies)
acceptedPayments(AcceptedPayment)
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(InventoryBookingRules)
bookingWindow(InventoryBookingWindow)
markets(InventoryMarkets)
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(InventoryCancelPoliciesRate)
baseCancelPolicy(InventoryCancelPolicy)
cancelPenalties(InventoryCancelPenalty)
AMOUNTNIGHTSPERCENTAGEcancelPoliciesByDate(InventoryCancelPolicyByDate)
cancelPenalties(InventoryCancelPenalty)
AMOUNTNIGHTSPERCENTAGEsurcharges(InventorySurcharge)
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.rooms(InventoryRoomSetUp)
code(String)
master(InventoryMasterRoom)
code(String)
name(String)
externalCode(String)
INFANT: Represents an infant guest.CHILD: Represents a child guest.ADULT: Represents an adult guest.hotelCode(String)
success * (Boolean)
Indicates whether the operation was successful based on the absence of advise messages.
Examples
Create a new rate
With the following mutation, we are going to create a new rate for the hotel 2 filling its basic properties.
The possible values for mealPlanIncluded can be retrieved using the query Mealplans.