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
- OAuth Scopes:
- rates_read
- rates_write
| Name | Type | Read/Write | Description | Constraints |
|---|---|---|---|---|
| account | Integer | Read | Account's ID related to the Rates Rule | |
| rates_table | Integer | Read | Rates Table's ID related to Rates Rule | |
| seasons | Array | Read | Season's IDs related to the Rates Rule | |
| id | Integer | Read | Rates Rule's id. | |
| always_applied | Boolean | Read | Rates Rule's application status. | |
| kind | String | Read | Rates Rule's kind. List of types described in enums section. | |
| percentage | Decimal | Read | Rates Rule's percentage discount. | |
| fixed_amount | Decimal | Read | Rates Rule's fixed price modifier. | |
| period_name | String | Read | Rates Rule's period name. | |
| variables | Object | Read | Rates Rule's variables used depending on kind type. List of variables described in enums section | |
| created_at | Time | Read | Rates Rule's create time. | |
| updated_at | Time | Read | Rates Rule's update time. | |
| start_date | Date | Read | Rates Rule's start date. | |
| end_date | Date | Read | Rates Rule's end date. |
| Name | Type | Read/Write | Description | Constraints |
|---|---|---|---|---|
| account | Integer | Read | Account's ID related to the Rates Rule | |
| rates_table | Integer | Read | Rates Table's ID related to Rates Rule | |
| seasons | Array | Read | Season's IDs related to the Rates Rule | |
| id | Integer | Read | Rates Rule's id. | |
| season_ids | Array | Write | Season ids related to the rates rule. | Use only one of these: season_ids, always_applied (if the value is true) or start_date/end_date |
| always_applied | Boolean | Read/Write | Rates Rule's application status. | Use only one of these: season_ids, always_applied (if the value is true) or start_date/end_date |
| kind | String | Read/Write | Rates Rule's kind. List of types described in enums section. | Required, must be a valid rates rule kind |
| percentage | Decimal | Read/Write | Rates Rule's percentage discount. | must be greater than or equal to -100, conditionally required depending on kind |
| fixed_amount | Decimal | Read/Write | Rates Rule's fixed price modifier. | conditionally required depending on kind |
| period_name | String | Read/Write | Rates Rule's period name. | Maximum length: 50 |
| variables | Object | Read/Write | Rates Rule's variables used depending on kind type. List of variables described in enums section | Conditionally required, depending on kind |
| created_at | Time | Read | Rates Rule's create time. | |
| updated_at | Time | Read | Rates Rule's update time. | |
| start_date | Date | Read/Write | Rates Rule's start date. | Use only one of these: season_ids, always_applied (if the value is true) or start_date/end_date, required for some kinds |
| end_date | Date | Read/Write | Rates Rule's end date. | Use only one of these: season_ids, always_applied (if the value is true) or start_date/end_date, required for some kinds |
List rates rules
List all rates rules for a given account.
GET /rates_rules
- OAuth Scopes:
- rates_read / rates_write
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-11-19",
"end_date": "2025-11-26",
"created_at": "2025-10-29T10:49:40.145Z",
"updated_at": "2025-11-05T10:49:40.145Z"
}
]
}
Get a single rates rule
Returns a single rates rule identified by ID.
GET /rates_rules/:rates_rule_id
- OAuth Scopes:
- rates_read / rates_write
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-11-19",
"end_date": "2025-11-26",
"created_at": "2025-10-29T10:49:40.148Z",
"updated_at": "2025-11-05T10:49:40.148Z"
}
]
}
Create a new rates rule
Creates a rates rule for given rates table.
POST /rates_tables/:rates_table_id/rates_rules
- OAuth Scopes:
- rates_write
request.json
{
"rates_rules": [
{
"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-11-19",
"end_date": "2025-11-26",
"season_ids": [
1,
19
]
}
]
}
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-11-19",
"end_date": "2025-11-26",
"created_at": "2025-10-29T10:49:40.153Z",
"updated_at": "2025-11-05T10:49:40.153Z"
}
]
}
Update a rates rule
Returns an updated rates rule identified by ID.
PUT /rates_rules/:rates_rule_id
- OAuth Scopes:
- rates_write
request.json
{
"rates_rules": [
{
"always_applied": false,
"percentage": "-20.0",
"period_name": "Late Spring",
"kind": "late_booking",
"variables": {
"days": [
1
],
"length": 5,
"unit": "days"
},
"start_date": "2025-11-19",
"end_date": "2025-11-26",
"season_ids": [
1,
19
]
}
]
}
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-11-19",
"end_date": "2025-11-26",
"created_at": "2025-10-29T10:49:40.157Z",
"updated_at": "2025-11-05T10:49:40.157Z"
}
]
}
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