---
title: "Initializes and changes the rates for the rate plan."
method: PUT
path: "/rateplan/v0-nsfw/rate-plans/{id}/rates"
tags: ["Rate"]
---

# Initializes and changes the rates for the rate plan.

`PUT /rateplan/v0-nsfw/rate-plans/{id}/rates`

## Request

- Base URL: `https://api.apaleo.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.apaleo.com/rateplan/v0-nsfw/rate-plans/{id}/rates`
- Auth: OAuth 2
  - Implicit: `https://identity.apaleo.com/connect/authorize`
  - Scopes: `rates.manage`, `admin`

All rates specified in the request will be initialized, or overwritten if they already exist.



Make sure that the from and to date and time in the rates match the time slice definition of the rate plan.
The easiest way to achieve this is calling the GET /rate-plans/{id}/rates for the time range you want to update
and then resend the payload with the set prices and restrictions.<br>You must have this scope: 'rates.manage'.<br>For fine-grained clients, you must have this permission: 'core.rates.modify'.

## Path parameters

- `id` string, required

## Request body

- ReplaceRateListModel
  - `rates` ReplaceRateModel[], required: List of rates
    - `from` string, date-time, required: Date and time the rate begins<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: Date and time the rate ends<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>
    - `price` MonetaryValueModel
      - `amount` number, double, required
      - `currency` string, required
    - `restrictions` RateRestrictionsModel
      - `minLengthOfStay` integer, nullable: The minimum length of stay in order to book the rate. If at least this number of time slices are covered by the stay duration the rate will be offered.
      - `maxLengthOfStay` integer, nullable: The maximum length of stay in order to book the rate. If not more than this number of time slices are covered by the stay duration the rate will be offered.
      - `closed` boolean, required: Whether the rate can be booked for a stay-through reservation
      - `closedOnArrival` boolean, required: Whether the rate can be booked on the reservation's arrival date
      - `closedOnDeparture` boolean, required: Whether the rate can be booked on the reservation's departure date

## Response `204`

Replace the rates 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-not-safe-for-work.md) - [All operations](https://skmtc.dev/apaleo/apis/apaleo-rate-plan-api-not-safe-for-work/llms.txt) - [OpenAPI document](https://skmtc.dev/apaleo/apis/apaleo-rate-plan-api-not-safe-for-work/revisions/97dec9512a17?raw)
