---
title: "Replace a rate plan"
method: PUT
path: "/rateplan/v1/rate-plans/{id}"
tags: ["RatePlan"]
---

# Replace a rate plan

`PUT /rateplan/v1/rate-plans/{id}`

Use this call to modify a rate plan.<br>You must have this scope: 'setup.manage'.

## Path parameters

- `id` string, required

## Request body

- ReplaceRatePlanModel
  - `name` object, required — The name for the rate plan
  - `description` object, required — The description for the rate plan
  - `minGuaranteeType` 'PM6Hold' | 'CreditCard' | 'Prepayment' | 'Company', required — The minimum guarantee to be provided when this rate plan is booked so the reservation will be guaranteed to the guest
  - `priceCalculationMode` 'Truncate' | 'Round', nullable — The calculation mode is used when calculating the adults' surcharges and derived rates. Defaults to Truncate. Example: for a rate of 125.99 and a surcharge of +10%, when Truncate is selected, the result would be 125.99 + 12 = 137.99 When Round is selected, the result would be 125.99 + 12.60 = 138.59
  - `channelCodes` string[], required — The channel codes the rate plan is sold through
  - `promoCodes` string[], nullable — The rate codes for promotional and hidden rates. If at least one code is set the rate will be not publicly visible anymore and only be offered when one of the promo codes is given in the offer request. For backward compatibility it is still not possible to set multiple promo codes.
  - `isSubjectToCityTax` boolean, nullable — Whether the rate plan is subject to city tax or not. Default value is `true`
  - `cancellationPolicyId` string, required — The id of the cancellation policy valid for this rate plan
  - `noShowPolicyId` string, nullable — The id of the no-show policy valid for this rate plan
  - `bookingPeriods` BookingPeriodModel[], nullable — Time periods when the rate plan is bookable
    - `from` string, date-time, required — Start of booking period<br />A date and time (without fractional second part) in UTC or with UTC offset as defined in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO8601:2004</a>
    - `to` string, date-time, required — End of booking period<br />A date and time (without fractional second part) in UTC or with UTC offset as defined in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO8601:2004</a>
  - `restrictions` BookingRestrictionsModel
    - `minAdvance` PeriodModel
      - `hours` integer, nullable — The number of hours within the period
      - `days` integer, nullable — The number of days within the period
      - `months` integer, nullable — The number of months within the period
    - `maxAdvance` PeriodModel
      - `hours` integer, nullable — The number of hours within the period
      - `days` integer, nullable — The number of days within the period
      - `months` integer, nullable — The number of months within the period
    - `lateBookingUntil` string, nullable — Time of day until the late booking can be made for this rate plan Restrictions: - the time has to be between the check-in (excl.) and check-out time (excl.) - can only be set, if MinAdvance is not set<br />A time (without fractional second part) as defined in the <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO8601:2004</a>
  - `includedServices` RatePlanServiceModel[], nullable — Services that are included in the rate plan
    - `serviceId` string, required — Service id to be included in the rate plan
    - `grossPrice` MonetaryValueModel, required
      - `amount` number, double, required
      - `currency` string, required
    - `pricingMode` 'Included' | 'Additional', nullable — Whether the service price is included in or added to the base rate. The property defaults to `Included`.
  - `companies` ReplaceCompanyRatePlanModel[], nullable — Companies that can use this rate plan
    - `id` string, required — Company ID that can use this rate plan
    - `corporateCode` string, nullable — Optional rate plan code that is used by the company. Default is companyCode-ratePlanCode. Same code can be specified for several rate plans in one company. No two companies can have a rate plan with the same code.
  - `pricingRule` CreatePricingRuleModel
    - `baseRatePlanId` string, required — The id of the rate plan that will be used as base when calculating the rates. The derivation level of the rate plan used as base rate plan cannot be greater than 2
    - `type` 'Absolute' | 'Percent', required — The type used to control the calculation of the difference to the rates of the defined base rate plan
    - `value` number, double, required — The value used to control the calculation of the difference to the rates of the defined base rate plan. It can be a positive and a negative value. The system will prevent you to define a value that would lead to negative rates
  - `surcharges` SurchargeModel[], nullable — Additional charges for more than single occupancy. The percent or absolute value will be added to the manually defined or calculated derived rates. The values for 'adults' must be unique within the list and starting from occupancy of 2 adults. Values higher than the maximum unit group occupancy will be silently ignored. The surcharges are required for all possible occupancies defined by the 'MaxPersons' of the unit group.
    - `adults` integer, required — The total numbers of adults
    - `type` 'Absolute' | 'Percent', required — Specifies how to interpret 'Value'
    - `value` number, double, required — The percent or absolute value (in the rate plan's currency) of the surcharge
  - `ageCategories` RatePlanAgeCategoryModel[], nullable — Additional charges per age category.
    - `id` string, required — The id of the age category
    - `surcharges` AgeCategorySurchargeModel[], required — Additional charges for the current age category. The absolute value will be added to the manually defined or calculated derived rates. The values for 'adults' must be unique within the list, and starting from 1. Values equal or higher than the maximum unit group occupancy will be silently ignored.
      - `adults` integer, required — The number of adults
      - `value` number, double, required — The absolute value in the currency of the rate plan as surcharge for each child accompanied by the given number of 'adults'. The minimum value is 0.
  - `accountingConfigs` AccountingConfigModel[], nullable — The collection of accounting configs with validity periods.
    - `vatType` 'Null' | 'VeryReduced' | 'Reduced' | 'Normal' | 'Without' | 'Special' | 'Special1' | 'Special2' | 'ReducedCovid19' | 'NormalCovid19' | 'Mixed', required — The VAT type
    - `serviceType` 'Other' | 'Accommodation' | 'FoodAndBeverages', required — The service type
    - `subAccountId` string, nullable — The sub-accounts id
    - `validFrom` string, date, required — Which date this configuration is valid from
  - `marketSegmentId` string, nullable — The id of the market segment for this rate plan

## Response `204`

Replace of the rate plan was successful.

## Other responses

- `400` — Bad request.
- `401` — You are unauthorized.
- `403` — Forbidden.
- `404` — The Request-URI could not be found.
- `415` — Unsupported media type.
- `422` — Validation errors in the request body or query params.
- `499` — Client closed request.
- `500` — An unexpected error occurred.
- `503` — The server is currently unavailable. Please try later.

---

[API](https://skmtc.dev/apaleo/apis/apaleo-rate-plan-api.md) · [All operations](https://skmtc.dev/apaleo/apis/apaleo-rate-plan-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apaleo/apaleo-rate-plan-api/revisions/8674f5ed9dc7/schema)
