Skip to main content

Rates Rules

Overview

This resource represents Rates Rules which drive the behavior behind the calculation of Booking's initial_price (i.e. the contribution from the Rental.). They are applied on top of the rates defined by either Nightly Rate Map or a combination of Rental's base_rate, Seasons and Periods.

A detailed description of Rates Rules is available here.

Parameters

NameTypeRead/WriteDescriptionConstraints
accountIntegerReadAccount's ID related to the Rates Rule
rates_tableIntegerReadRates Table's ID related to Rates Rule
seasonsArrayReadSeason's IDs related to the Rates Rule
idIntegerReadRates Rule's id.
always_appliedBooleanReadRates Rule's application status.
kindStringReadRates Rule's kind. List of types described in enums section.
percentageDecimalReadRates Rule's percentage discount.
fixed_amountDecimalReadRates Rule's fixed price modifier.
period_nameStringReadRates Rule's period name.
variablesObjectReadRates Rule's variables used depending on kind type. List of variables described in enums section
created_atTimeReadRates Rule's create time.
updated_atTimeReadRates Rule's update time.
start_dateDateReadRates Rule's start date.
end_dateDateReadRates Rule's end date.

List rates rules

List all rates rules for a given account.

GET /rates_rules
response.json
{
"links": {
"rates_rules.rates_table": "https://www.bookingsync.com/api/v3/rates_tables/{rates_rules.rates_table}",
"rates_rules.seasons": "https://www.bookingsync.com/api/v3/seasons/{rates_rules.seasons}"
},
"rates_rules": [
{
"links": {
"rates_table": 12,
"seasons": [
1,
19
]
},
"id": 23,
"always_applied": false,
"percentage": "-20.0",
"fixed_amount": null,
"period_name": "Late Spring",
"kind": "late_booking",
"variables": {
"days": [
1
],
"length": 5,
"unit": "days"
},
"start_date": "2025-04-07",
"end_date": "2025-04-14",
"created_at": "2025-03-17T22:18:30.989Z",
"updated_at": "2025-03-24T22:18:30.989Z"
}
]
}

Get a single rates rule

Returns a single rates rule identified by ID.

GET /rates_rules/:rates_rule_id
response.json
{
"links": {
"rates_rules.rates_table": "https://www.bookingsync.com/api/v3/rates_tables/{rates_rules.rates_table}",
"rates_rules.seasons": "https://www.bookingsync.com/api/v3/seasons/{rates_rules.seasons}"
},
"rates_rules": [
{
"links": {
"rates_table": 12,
"seasons": [
1,
19
]
},
"id": 23,
"always_applied": false,
"percentage": "-20.0",
"fixed_amount": null,
"period_name": "Late Spring",
"kind": "late_booking",
"variables": {
"days": [
1
],
"length": 5,
"unit": "days"
},
"start_date": "2025-04-07",
"end_date": "2025-04-14",
"created_at": "2025-03-17T22:18:30.991Z",
"updated_at": "2025-03-24T22:18:30.991Z"
}
]
}

Create a new rates rule

Creates a rates rule for given rates table.

POST /rates_tables/:rates_table_id/rates_rules

Update a rates rule

Returns an updated rates rule identified by ID.

PUT /rates_rules/:rates_rule_id

Destroy a rates rule

Required OAuth scope: :rates_write

Returns an empty response with 204 No Content status code on success.

DELETE /rates_rules/:rates_rule_id