Skip to main content

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:

  • code
  • name
  • hotelCode
  • active
  • mealPlanIncluded
  • agePolicies
    • maxAgeChildren
    • maxAgeInfants
    • freeInfants
    • freeChildren
  • paymentPolicies
    • currency
    • commission
    • priceIsBinding
    • acceptedPayments
      • type
      • cardTypes
  • bookingRules
    • bookingWindow
      • start
      • end
    • markets
      • included
      • excluded
    • rateRule
    • seniorRule
  • cancelPolicies
    • baseCancelPolicy
      • refundable
      • cancelPenalties
        • daysBeforeArrival
        • penaltyType
        • value
    • cancelPoliciesByDate
      • start
      • end
      • cancelPolicy
        • refundable
        • cancelPenalties
          • daysBeforeArrival
          • penaltyType
          • value
  • surcharges
    • chargeType
    • taxType
    • value
    • applyType
    • perNight
    • perPax

1. Criteria

When building your mutation, you need to provide the following input fields:

Mandatory Input

  • clientCode
  • supplierCode
  • hotelCode
  • rates
    • code
    • name
    • active
    • mealPlanIncluded
    • agePolicies
      • maxAgeChildren
      • maxAgeInfants
      • freeInfants
      • freeChildren
    • paymentPolicies
      • currency
      • commission
      • priceIsBinding
      • acceptedPayments
        • type
        • cardTypes
    • cancelPolicies

Optional Input

  • contextCode
  • rates
    • bookingRules
      • bookingWindow
        • start
        • end
      • markets
        • included
        • excluded
      • rateRule
      • seniorRule
    • surcharges
      • chargeType
      • taxType
      • value
      • applyType
      • perNight
      • perPax

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

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.

acceptedPayments(AcceptedPaymentInput)

Rate Accepted Payments, if not informed it is MerchantPay. AcceptedPayment

type  *  (PaymentType)

Possible values:
  • 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)
Possible values:
  • VI: Visa
  • AX: American Express
  • BC: BC Card
  • CA: MasterCard
  • CB: Carte Blanche
  • CU: China Union Pay
  • DS: Discover
  • DC: Diners Club
  • T: Carta Si
  • R: Carte Bleue
  • N: Dankort
  • L: Delta
  • E: Electron
  • JC: Japan Credit Bureau
  • TO: Maestro
  • S: Switch
  • EC: Electronic Cash
  • EU: EuroCard
  • TP: universal air travel card
  • OP: optima
  • ER: Air Canada/RnRoute
  • XS: access
  • O: others
bookingRules(InventoryBookingRulesInput)

Booking rules associated with the rate.

bookingWindow(InventoryBookingWindowInput)

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(InventoryMarketsInput)

Markets included or excluded. Do not send if the rate is available for all markets. Only informative.

included(String)

Included markets.

excluded(String)

Excluded markets.

rateRule(RatePlanType)

"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:

  • NO_RATE_PLAN_TYPE
  • LARGE_FAMILY
  • PUBLIC_SERVANT
  • NEGOTIATED
  • PACKAGE
  • CANARY_RESIDENT
  • BALEARIC_RESIDENT
  • HONEY_MOON
seniorRule(SeniorRate)

"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:

  • NO_SENIOR_RATE
  • SENIOR_RATE_55
  • SENIOR_RATE_60
  • SENIOR_RATE_65

cancelPolicies  *  (CancelPoliciesCreateInput)

Cancel policies associated with the rate.

baseCancelPolicy(InventoryCancelPolicyInput)

Defines the base cancel policies. Only Informative. CancelPolicy

refundable  *  (Boolean)

Indicates if the rate is refundable.

cancelPenalties(InventoryCancelPenaltyInput)

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:

  • AMOUNT
  • NIGHTS
  • PERCENTAGE

value  *  (Float)

Penalty value.

cancelPoliciesByDate(InventoryCancelPolicyByDateInput)

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.

cancelPenalties(InventoryCancelPenaltyInput)

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:

  • AMOUNT
  • NIGHTS
  • PERCENTAGE

value  *  (Float)

Penalty value.

surcharges(InventorySurchargeInput)

Surcharges associated with the rate.

chargeType  *  (InventoryChargeType)

Indicates if the surcharge is included or not in the price. Possible values:

  • INCLUDED
  • EXCLUDED

taxType  *  (InventoryTaxType)

The type of tax applied to the surcharge. Possible values:

  • CITY: 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.

value  *  (Float)

The value of the surcharge.

applyType  *  (InventoryApplyType)

The type of application for the surcharge. Possible values:

  • PERCENTAGE: The rate is applied as a percentage.
  • AMOUNT: The rate is applied as an amount.

perNight  *  (Boolean)

Indicates whether the surcharge is applied per night.

perPax  *  (Boolean)

Indicates whether the surcharge is applied per person.

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.

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:

  • WARN: Warning message.
  • ERROR: Error message.
  • INFO: Info message.
external(ExternalMessage)

Specify the external message.

code(String)

External code.

message  *  (String)

External message.

correlationID  *  (ID)

Identifier to investigate the cause of the error.

rates(InventoryRateSetup)

Collection of rate output objects.

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 included in the rate.

baseCode(String)

Base rate code associated with the rate.

agePolicies(InventoryAgePolicies)

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

paymentPolicies(InventoryPaymentPolicies)

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.

acceptedPayments(AcceptedPayment)

Accepted payment methods for the rate. If not informed, it defaults to MerchantPay.

type  *  (PaymentType)

Possible values:
  • 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)
Possible values:
  • VI: Visa
  • AX: American Express
  • BC: BC Card
  • CA: MasterCard
  • CB: Carte Blanche
  • CU: China Union Pay
  • DS: Discover
  • DC: Diners Club
  • T: Carta Si
  • R: Carte Bleue
  • N: Dankort
  • L: Delta
  • E: Electron
  • JC: Japan Credit Bureau
  • TO: Maestro
  • S: Switch
  • EC: Electronic Cash
  • EU: EuroCard
  • TP: universal air travel card
  • OP: optima
  • ER: Air Canada/RnRoute
  • XS: access
  • O: others
bookingRules(InventoryBookingRules)

Booking rules associated with the rate.

bookingWindow(InventoryBookingWindow)

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(InventoryMarkets)

Markets included or excluded. Do not send if the rate is available for all markets. Only informative.

included(String)

Included markets.

excluded(String)

Excluded markets.

rateRule(RatePlanType)

"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:

  • NO_RATE_PLAN_TYPE
  • LARGE_FAMILY
  • PUBLIC_SERVANT
  • NEGOTIATED
  • PACKAGE
  • CANARY_RESIDENT
  • BALEARIC_RESIDENT
  • HONEY_MOON
seniorRule(SeniorRate)

"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:

  • NO_SENIOR_RATE
  • SENIOR_RATE_55
  • SENIOR_RATE_60
  • SENIOR_RATE_65
cancelPolicies(InventoryCancelPoliciesRate)

Cancel policies associated with the rate.

baseCancelPolicy(InventoryCancelPolicy)

Defines the base cancel policies. Only Informative.

refundable  *  (Boolean)

Indicates if the rate is refundable.

cancelPenalties(InventoryCancelPenalty)

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:

  • AMOUNT
  • NIGHTS
  • PERCENTAGE

value  *  (Float)

Penalty value.

cancelPoliciesByDate(InventoryCancelPolicyByDate)

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.

cancelPenalties(InventoryCancelPenalty)

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:

  • AMOUNT
  • NIGHTS
  • PERCENTAGE

value  *  (Float)

Penalty value.

surcharges(InventorySurcharge)

Surcharges associated with the rate.

chargeType  *  (InventoryChargeType)

Indicates if the surcharge is included or not in the price. Possible values:

  • INCLUDED
  • EXCLUDED

taxType  *  (InventoryTaxType)

The type of tax applied to the surcharge. Possible values:

  • CITY: 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.

value  *  (Float)

The value of the surcharge.

applyType  *  (InventoryApplyType)

The type of application for the surcharge. Possible values:

  • PERCENTAGE: The rate is applied as a percentage.
  • AMOUNT: The rate is applied as an amount.

perNight  *  (Boolean)

Indicates whether the surcharge is applied per night.

perPax  *  (Boolean)

Indicates whether the surcharge is applied per person.

rooms(InventoryRoomSetUp)

Rooms associated with the rate.

code(String)

Code associated with the room.

master(InventoryMasterRoom)

Master of the room.

id  *  (Int)

Id associated with the room master.

code(String)

Code associated with the room.

name(String)

Name associated with the room.

active  *  (Boolean)

Indicates whether the room is active.

externalCode(String)

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:

  • INFANT: Represents an infant guest.
  • CHILD: Represents a child guest.
  • ADULT: Represents an adult guest.
hotelCode(String)

Hotel code associated with the rate.

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.

note

The possible values for mealPlanIncluded can be retrieved using the query Mealplans.