Skip to main content

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:

  • 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

Optional Input

  • contextCode
  • rates
    • 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

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

clientCode  *  (String)
Client code.

supplierCode  *  (String)
Travelgate Supplier/Channel code.

rates  *  (RateUpdateInput)
Rates input data. See RateUpdate.

code  *  (String)
Code associated with the rate.

baseRateCode (String)
Base rate code of the rate.

name (String)
Name of the rate.

active (Boolean)
Indicates whether the rate is active.

mealPlanIncluded (Int)
Meal plan included in the rate.

agePolicies (AgePoliciesUpdateInput)
Age policies associated with the rate. See AgePoliciesUpdate.

maxAgeInfants (Int)
Maximum age for a baby, not inclusive.

freeInfants (Boolean)
If true, babies are free of charge.

maxAgeChildren (Int)
Maximum age for a child, not inclusive.

freeChildren (Boolean)
If true, children are free of charge.

paymentPolicies (PaymentPoliciesUpdateInput)
Payment policies associated with the rate. See PaymentPoliciesUpdate.

currency (Currency)
Currency of the payment. See 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. See AcceptedPayment.

type  *  (Enum of PaymentType)

Possible values:
MERCHANT
DIRECT
CARD_BOOKING
CARD_CHECK_IN

cardTypes (Enum of PaymentCardType)

Possible values:
VI
AX
BC
CA
CB
CU
DS
DC
T
R
N
L
E
JC
TO
S
EC
EU
TP
OP
ER
XS
O

bookingRules (InventoryBookingRulesInput)
Booking rules associated with the rate. See BookingRules.

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 (Enum of 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 (Enum of 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 (CancelPoliciesUpdateInput)
Cancel policies associated with the rate. See CancelPoliciesUpdate.

baseCancelPolicy (InventoryCancelPolicyInput)
Defines the base cancel policies. Only Informative. 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  *  (Enum of PenaltyType)
Penalty type. See PenaltyType.
Possible values:
AMOUNT
NIGHTS
PERCENTAGE

value  *  (Float)
Penalty value.

cancelPoliciesByDate (InventoryCancelPolicyByDateInput)
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  *  (undefined)
Cancel policy. See CancelPolicy.

amendPolicy (AmendPolicyUpdateInput)
Amend policy associated with the rate. See AmendPolicyUpdate.

isAmendable (Boolean)
Indicates whether the policy is amendable.

amendPenalties (AmendPenaltyInput)
List of amend penalties associated with the policy. See AmendPenalty.

daysBeforeArrival  *  (Int)
Number of days before arrival.

penaltyType  *  (undefined)
Type of penalty. PenaltyType

value  *  (Float)
Value of the penalty.

surcharges (InventorySurchargeInput)
List of surcharges associated with the rate. See Surcharge.

chargeType  *  (Enum of InventoryChargeType)
Indicates if the surcharge is included or not in the price.
Possible values:
INCLUDED
EXCLUDED

taxType  *  (Enum of InventoryTaxType)
The type of tax applied to the surcharge.
Possible values:
CITY
LOCAL
RESORT_FEE
SUPPLEMENT_TO_BE_PAID_ON_SPOT

value  *  (Float)
The value of the surcharge.

applyType  *  (Enum of InventoryApplyType)
The type of application for the surcharge.
Possible values:
PERCENTAGE
AMOUNT

perNight  *  (Boolean)
Indicates whether the surcharge is applied per night.

perPax  *  (Boolean)
Indicates whether the surcharge is applied per person.

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.

note

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