Create Rate Sets

Create a new Rate Set for a Unit

Overview

This endpoint allows the <<glossary:Agent>> to create a new rate set for a unit. A rate set defines the pricing and availability settings for specific periods within a unit's calendar. With the Create Rate Set endpoint, API Users can easily define customized rate sets as agreed upon with the supplier.

Endpoints Available

MethodEndpointDescription
POSTv2024.07.31/ratesetsCreate new rate sets for specified units within the inventory.

Body Parameters

ParameterRequired / OptionalDescriptionData Type
"rate_set_id"The unique identifier for the rate set.int
"management_company_user_id"The unique identifier for the supplier that will be associated with the rate set.int
"set_name"The unique rate set name.string
"weekly_daily_monthly"Is the rate set Weekly, Daily, or Monthly?int
"includes_tax"Does the rate include taxes?boolean
"days_in_month"How many Days in a month? (e.g, 30).int
"based_on_arrival_date_band_only"Should quotes be based on the arrival date band only (else, pro-rate based on split of bands)?boolean
"currency"The currency for the rate set.string
"minimum_nightly_rate"The minimum nightly rate for the rate set.int
"imported"A timestamp of when the rate set was imported.date-time
"last_modified_by_staff_user_id"The unique identifier of the staff user who last modified the rate set.int
"last_modified_by_user_id"The unique identifier of the user who last modified the rate set.int
"ip_address"The IP address of the user or system that last modified the rate set.int
"imported_from_calendar_sync_master"A flag indicating if the rate set was imported from the calendar sync master (true) or not (false).boolean
"is_flat_rate_model"A flag indicating if the rate set follows a flat rate model (true) or not (false).boolean
"rate_bands"An array of objects representing rate set rate band data.array
📘

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"RequiredThe unique identifier for the rate set rate band.int
"property_id"RequiredThe unique identifier for the unit in the inventory associated with the rate band.int
"date_from"RequiredThe start date for the rate band.date-time
"date_to"RequiredThe end date for the rate band.date-time
"us_rate"Requirednumber
"rate_set_id"RequiredThe unique identifier for the rate set.int
"minimum_nights_stay"RequiredThe minimum nights a guest can stay during this period.int
"arrival_days"RequiredThe arrival day restrictions - This value uses bitwise representation (See below).int
"floor_rate"RequiredThe wholesale or discounted rate configured by the supplier.number
"minimum_nightly_rate"RequiredThe minimum nightly rate for the rate set.int
"daily_rate"RequiredThe price charged to guests for each day of their stay at the rental property.int
"monthly_rate"RequiredThe price charged to guests for a month-long stay at the rental property, if applicable.int
"departure_days"RequiredThe departure day Restrictions - This value uses bitwise representation (See below).int
"season_name"RequiredThe name given to the unique rate band in the rate set. (e.g. High Season, Low Season).string
"imported"RequiredThe timestamp representing when the rate set was imported.date-time
"maximum_nights_stay"RequiredThe maximum nights a guest can stay during this period.int
"last_modified_by_staff_user_id"RequiredThe unique identifier of the staff user who last modified the rate set.int
"last_modified_by_user_id"RequiredThe unique identifier of the user who last modified the rate set.int
"last_modified_by_ip_address"RequiredThe IP address of the user or system that last modified the rate set.string
"ip_address"RequiredThe IP address of the user or system that last modified the rate set.string
📘

Arrival/Departure Day Restrictions - Bitwise Representation

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

Sample Request

curl --request POST \
     --url 'https://api.ciiruspartners.com/v2024.07.31/ratesets' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Basic {APIUsername:APIPassword}' \
     --data '{
  "rate_set_id": 72024,
  "management_company_user_id": 42330,
  "set_name": "3-bedroom standard",
  "weekly_daily_monthly": 1,
  "includes_tax": false,
  "days_in_month": 30,
  "based_on_arrival_date_band_only": false,
  "currency": "USD",
  "minimum_nightly_rate": 0,
  "rate_bands": [
    {
      "rate_band_id": 348421989,
      "property_id": 219264,
      "date_from": "2018-01-01T00:00:00",
      "date_to": "2029-12-31T00:00:00",
      "us_rate": 0,
      "rate_set_id": 72024,
      "minimum_nights_stay": 3,
      "arrival_days": 127,
      "floor_rate": 120,
      "daily_rate": 100,
      "monthly_rate": 0,
      "departure_days": 127,
      "season_name": "Standard Season",
      "maximum_nights_stay": 0
    }
  ]
}'

Sample Response

{
  "id": 72024,
  "set_name": "3-bedroom standard",
  "management_company_user_id": 42330,
  "created_at": "2024-07-31T12:00:00Z",
  "status": "created"
}