Set Calendar Rule

Changes a listing's calendar rule. Send only the fields to change; the others keep their values and the whole rule is checked again. Changing event or scale drops the fields that only belonged to the old one. To move or pause a rule, use Move Calendar Rule and Pause Calendar Rule. A rule from a calendar rule group can't be changed here, since that would change every listing in the group. Requires the pricing:write scope.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

_id of the calendar rule (from Get Calendar Rules)

Body Params

The fields of a calendar rule. Each scale and event uses only the fields named in its description.

string

Rule name, shown in Host Tools

string
enum

What the rule does. fixedPrice, minPrice and maxPrice set the price, or a floor or ceiling on it. increaseByPrice, decreaseByPrice, increaseByPercentage and decreaseByPercentage change it by an amount or a percentage. grossUpByPercentage raises it so it is the same after a channel takes that percentage. The gradually scales step the change across the rule's dates (Reverse runs the steps backwards). minNights sets the minimum stay. availability blocks or opens dates (it applies to every channel). blockCheckin and blockCheckout stop check-ins or check-outs.

number

Required for every scale except availability, blockCheckin and blockCheckout, and greater than 0: the price, the amount to change it by, the percentage, or the minimum nights (a whole number).

boolean

For availability, required: true blocks the dates, false opens them. For blockCheckin and blockCheckout: true blocks (default), false allows.

string
enum

When the rule applies. all: every date. floatingPeriod: a window that moves with today. orphanPeriod: short gaps between bookings. specificDates: a date range. afterReservation and beforeReservation: days around each booking. months: whole months. yearlyDates: the same dates every year. nthWeekday: a weekday that moves each year, such as the 4th Thursday of November.

string
enum

Which channel's prices the rule changes. Defaults to all. availability rules always apply to all.

Allowed:
limitDays
array of strings

The weekdays the rule applies on. Leave it out for every day.

limitDays
Allowed:
string

For specificDates, required. The first night, YYYY-MM-DD.

string

For specificDates, required. The day after the last night, not included (like a check-out day), YYYY-MM-DD.

integer

For floatingPeriod, required. Days from today the window starts, 0 to 730 (0 is today).

integer

For floatingPeriod, required. How many days the window lasts, 1 to 730.

integer

For orphanPeriod, required. The longest gap between bookings, in nights, the rule applies to.

integer

For afterReservation. Days after each check-out, 1 to 5. Defaults to 1.

integer

For beforeReservation. Days before each check-in, 0 to 5, where 0 is the check-in day. Defaults to 1.

months
array of strings

For months, required. The months the rule applies in.

months
yearlyDates
object

For yearlyDates, required. The same calendar dates every year, both ends included. An end earlier than the start wraps into the next year.

nthWeekday
object

For nthWeekday, required. A weekday that moves each year, plus the days around it. US Thanksgiving is {"month": 11, "week": 4, "weekday": "thursday"}.

Headers
string

Partner API key (deprecated — use OAuth 2.0 for new integrations)

string

User's authentication token (legacy). Use Authorization Bearer header for new integrations.

Responses

429

Too many requests

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json