Update Rate Sets

Update existing Rate Sets of Inventory available to the API User

Overview

This endpoint allows the Agent to make updates to existing Rate Sets associated with specific Units. It enables adjustments to rates, intervals (weekly, daily, or monthly), Minimum or Maximum Length of Stay, and more as needed.

📘

It is recommended to first use the Retrieve Rate Set function, then use the details from the Retrieve Rate Set Response to populate details for the Update Rate Set Request.

Endpoints Available

MethodEndpointDescription
PUTv2023.07.31/rates/ratesets/{rateSetId}Modify existing Rate Sets

Path Parameters

Path ParameterRequired / OptionalDescription
{rateSetId}RequiredUnique identifier for Rate Set in Inventory

Body Parameters

ParameterRequired / OptionalDescriptionData Type
"rate_set_id"RequiredUnique Identifier for Rate Setint
"mc_user_id"RequiredUnique Identifier for Supplierint
"set_name"RequiredUnique Rate Set Namestring
"weekly_daily_monthly"RequiredIs Rate Set Weekly, Daily, or Monthly?int
"includes_tax"RequiredDoes the Rate Include Taxes?boolean
"days_in_month"RequiredHow many Days in a month when using Monthly Rate Setint
"based_on_arrival_date_band_only"RequiredQuote rates based on arrival date band only (else pro-rate based on split of bands)boolean
"currency"RequiredThe currency for the Rate Setstring
"minimum_nightly_rate"RequiredThe minimum nightly rate for the Rate Setint
"imported"RequiredDate-time of when the rate set was importeddate-time
"last_modified_by_staff_user_id"RequiredUnique identifier of the staff user who last modified the Rate Setint
"last_modified_by_user_id"RequiredUnique identifier of the user who last modified the Rate Setint
"ip_address"RequiredIP address of the user or system that last modified the Rate Setstring
"imported_from_calendar_sync_master"RequiredIndicates if the Rate Set was imported from the calendar_sync_masterboolean
"is_flat_rate_model"RequiredIndicates if the Rate Set follows a flat rate modelboolean
"rate_bands"RequiredAn array of objects representing Rate Set date bandsarroy

📘

weekly_daily_monthly

This parameter determines the interval type to be used within the Rate Set. The values to be used are:

0: Weekly
1: Daily
2: Monthly


"rate_Bands" Object Body Parameters

ParameterRequired / OptionalDescriptionData Type
"rate_band_id"RequiredUnique Identifier for Rate Set Date Bandint
"property_id"RequiredUnique Identifier for Unit in Inventoryint
"date_from"RequiredStart Date for Date Banddate-time
"date_to"RequiredEnd Date for Date Banddate-time
"us_rate"Requirednumber
"rate_set_id"RequiredUnique Identifier for Rate Setint
"minimum_nights_stay"RequiredThe minimum nights a guest can stay during this periodint
"arrival_days"RequiredArrival Day Restrictions - Bitwise representationint
"floor_rate"RequiredThe wholesale or discounted rate set by the Property Managernumber
"minimum_nightly_rate"RequiredThe minimum nightly rate for the Rate Setint
"daily_rate"RequiredThe price charged to guests for each day of their stay at the rental propertyint
"monthly_rate"RequiredThe price charged to guests for a month-long stay at the rental propertyint
"departure_days"RequiredDeparture Day Restrictions - Bitwise representationint
"season_name"RequiredThe name given to the unique Date Band in the Rate set. (e.g. High Season, Low Season)string
"imported"RequiredDate-time of when the rate set was importeddate-time
"maximum_nights_stay"RequiredThe maximum nights a guest can stay during this periodint
"last_modified_by_staff_user_id"RequiredUnique identifier of the staff user who last modified the Rate Setint
"last_modified_by_user_id"RequiredUnique identifier of the user who last modified the Rate Setint
"last_modified_by_ip_address"RequiredIP address of the user or system that last modified the rate setstring
"ip_address"RequiredIP address of the user or system that last modified the rate setstring

📘

Arrival/Departure Day Restrictions - Bitwise Representation

Arrival and departure day restrictions refer to specific rules or limitations set by property owners or managers regarding the days on which guests are allowed to arrive or depart from the property. To efficiently represent and enforce these restrictions, a bitwise representation is utilized, where each day of the week is assigned a corresponding bit value.

Bitwise representation allows for the encoding of multiple restrictions into a single integer value.

In this specific representation, Monday serves as the starting point, and each day of the week is assigned a unique bit position as follows:

DayBit PositionByte
Monday01
Tuesday12
Wednesday24
Thursday38
Friday416
Saturday532
Sunday664

To determine the arrival/departure day restrictions for a property, the relevant bit positions are set to 1 to indicate the allowed days and 0 to indicate the restricted days.

Examples:

  1. If a property allows arrival and departure on Monday, Wednesday, and Sunday, the bitwise representation would be 1 + 4 + 64 = 69
  2. If a property allows arrival and departures on Tuesday, Wednesday, and Sunday, the bitwise representation would be 2 + 4 + 64 = 70
  3. For a property that restricts arrivals and departures on Monday, Friday, and Saturday, the bitwise representation would be 2 + 4 + 8 + 64 = 78
  4. If a property allows check-ins and check-outs on all days, the bitwise representation would be
    1 + 2 + 4 + 8 + 16 + 32 + 64 = 127

Response Definitions

Response ItemDescriptionData Type
"id"Unique Identifier for Rate Setint
"set_name"Unique Rate Set Namestring
"weekly_daily_monthly"Is Rate Set Weekly, Daily, or Monthly?int
"use_default_floor_rate"Is the Rate Set using the floor rate?boolean
"includes_tax"Does the Rate Include Taxes?boolean
"days_in_month"How many Days in a month when using Monthly Rate Setint
"based_on_arrival_date_band_only"Quote rates based on arrival date band only (else pro-rate based on split of bands)boolean
"currency"The currency for the Rate Setstring
"minimum_nightly_rate"The minimum nightly rate for the Rate Setint
"rate_bands"An array of objects representing Rate Set date bandsartray
"mc_user_id"Unique Identifier for Supplierint

"rate_bands" Object

Response ItemDescriptionData Type
"id"Unique Identifier for Rate Set Date Bandint
"unit_id"Unique Identifier for Unit in Inventoryint
"date_from"Start Date for Date Banddate-time
"date_to"End Date for Date Banddate-time
"us_rate"
"rate_set_id"Unique Identifier for Rate Setint
"missing_band"Is there a gap in the Rate Bands?int
"minimum_nights_stay"The minimum nights a guest can stay during this periodint
"arrival_days"Arrival Day Restrictions - Bitwise representationint
"floor_rate"The wholesale or discounted rateint
"daily_rate"The price charged to guests for each day of their stay at the rental propertyint
"monthly_rate"The price charged to guests for a month-long stay at the rental propertyint
"departure_days"Departure Day Restrictions - Bitwise representationint
"season_name"The name given to the unique Date Band in the Rate set. (e.g. High Season, Low Season)string
"imported"Date-time of when the rate set was importeddate-time
"maximum_nights_stay"The maximum nights a guest can stay during this periodint

Sample Request

curl --location --request PUT 'https://api.ciiruspartners.com/v2023.07.31/rates/ratesets/72024' \
--data '{
  "rate_set_id": 72024,
  "mc_user_id": 42330,
  "set_name": "Test Property 1",
  "weekly_daily_monthly": 1,
  "includes_tax": false,
  "days_in_month": 30,
  "based_on_arrival_date_band_only": false,
  "currency": "USD",
  "minimum_nightly_rate": 0,
  "imported": "2023-09-15T00:00:00",
  "rate_bands": [
    {
      "rate_band_id": 1395092385,
      "property_id": 219264,
      "date_from": "2023-09-15T00:00:00",
      "date_to": "2023-11-21T00:00:00",
      "us_rate": 0,
      "rate_set_id": 72024,
      "minimum_nights_stay": 3,
      "arrival_days": 127,
      "floor_rate": 1,
      "minimum_nightly_rate": 0,
      "daily_rate": 1.5,
      "monthly_rate": 0,
      "departure_days": 127,
      "season_name": "Test1",
      "imported": "2023-09-15T00:00:00",
      "maximum_nights_stay": 0,
      "last_modified_by_staff_user_id": 0,
      "last_modified_by_user_id": 77520,
      "last_modified_by_ip_address": "9.8.8.7",
      "ip_address": "9.8.8.7"
    },
	...
  ],
  "last_modified_by_staff_user_id": 0,
  "last_modified_by_user_id": 77520,
  "ip_address": "9.8.8.7",
  "imported_from_calendar_sync_master": false,
  "is_flat_rate_model": false
}'

Sample Response

{
    "id": 72024,
    "set_name": "Test Property 1",
    "weekly_daily_monthly": 1,
    "use_default_floor_rate": false,
    "includes_tax": false,
    "days_in_month": 30,
    "based_on_arrival_date_band_only": false,
    "currency": "USD",
    "minimum_nightly_rate": 0,
    "rate_bands": [
        {
            "id": 1585490830,
            "unit_id": 0,
            "date_from": "2023-09-15T00:00:00",
            "date_to": "2023-11-21T00:00:00",
            "us_rate": 0,
            "rate_set_id": 72024,
            "missing_band": 0,
            "minimum_nights_stay": 3,
            "arrival_days": 127,
            "floor_rate": 1,
            "daily_rate": 1.5,
            "monthly_rate": 0,
            "departure_days": 127,
            "season_name": "Test1",
            "imported": "2023-09-15T00:00:00",
            "maximum_nights_stay": 0
        },
				...
    ],
    "mc_user_id": 42330
}