Periods
Overview
This resource represents Periods which define the timeline for applicability of the Seasons.
Parameters
- OAuth Scopes:
- rates_read
- rates_write
Name | Type | Read/Write | Description |
---|---|---|---|
account | Integer | Read | Account's ID related to the Period |
season | Integer | Read | Season's ID related to the Period |
rates_table | Integer | Read | Rates Table's ID related to the Period |
id | Integer | Read | Period's id. |
created_at | Time | Read | Period's create time. |
updated_at | Time | Read | Period's update time. |
start_date | Date | Read | Period's start date. |
end_date | Date | Read | Period's end date. |
archived_at | Time | Read | Period's archived time. |
Name | Type | Read/Write | Description | Constraints |
---|---|---|---|---|
account | Integer | Read | Account's ID related to the Period | |
season | Integer | Read | Season's ID related to the Period | |
rates_table | Integer | Read | Rates Table's ID related to the Period | |
id | Integer | Read | Period's id. | |
created_at | Time | Read | Period's create time. | |
updated_at | Time | Read | Period's update time. | |
start_date | Date | Read/Write | Period's start date. | Required, must be before end_date |
end_date | Date | Read/Write | Period's end date. | Required, must be after start_date , the maximum allowed value is 3 years from the current date |
archived_at | Time | Read | Period's archived time. |
List periods
List all periods for a given account.
GET /periods
- OAuth Scopes:
- rates_read / rates_write
response.json
{
"links": {
"periods.rates_table": "https://www.bookingsync.com/api/v3/rates_tables/{periods.rates_table}",
"periods.season": "https://www.bookingsync.com/api/v3/seasons/{periods.season}"
},
"periods": [
{
"links": {
"rates_table": 5,
"season": 12
},
"id": 232,
"start_date": "2025-05-02",
"end_date": "2025-05-09",
"created_at": "2025-04-11T08:33:06.602Z",
"updated_at": "2025-04-18T08:33:06.602Z"
}
]
}
Get a single period
Returns a single period identified by ID.
GET /periods/:period_id
- OAuth Scopes:
- rates_read / rates_write
response.json
{
"links": {
"periods.rates_table": "https://www.bookingsync.com/api/v3/rates_tables/{periods.rates_table}",
"periods.season": "https://www.bookingsync.com/api/v3/seasons/{periods.season}"
},
"periods": [
{
"links": {
"rates_table": 5,
"season": 12
},
"id": 232,
"start_date": "2025-05-02",
"end_date": "2025-05-09",
"created_at": "2025-04-11T08:33:06.606Z",
"updated_at": "2025-04-18T08:33:06.606Z"
}
]
}
Create a new period
Creates a period for given season.
POST /seasons/:season_id/periods
- OAuth Scopes:
- rates_write
request.json
{
"periods": [
{
"start_date": "2025-05-02",
"end_date": "2025-05-09"
}
]
}
response.json
{
"links": {
"periods.rates_table": "https://www.bookingsync.com/api/v3/rates_tables/{periods.rates_table}",
"periods.season": "https://www.bookingsync.com/api/v3/seasons/{periods.season}"
},
"periods": [
{
"links": {
"rates_table": 5,
"season": 12
},
"id": 232,
"start_date": "2025-05-02",
"end_date": "2025-05-09",
"created_at": "2025-04-11T08:33:06.612Z",
"updated_at": "2025-04-18T08:33:06.612Z"
}
]
}
Update a period
Returns an updated period identified by ID.
PUT /periods/:period_id
- OAuth Scopes:
- rates_write
request.json
{
"periods": [
{
"start_date": "2025-05-02",
"end_date": "2025-05-09"
}
]
}
response.json
{
"links": {
"periods.rates_table": "https://www.bookingsync.com/api/v3/rates_tables/{periods.rates_table}",
"periods.season": "https://www.bookingsync.com/api/v3/seasons/{periods.season}"
},
"periods": [
{
"links": {
"rates_table": 5,
"season": 12
},
"id": 232,
"start_date": "2025-05-02",
"end_date": "2025-05-09",
"created_at": "2025-04-11T08:33:06.616Z",
"updated_at": "2025-04-18T08:33:06.616Z"
}
]
}
Destroy a period
Required OAuth scope: :rates_write
Returns an empty response with 204 No Content
status code on success.
DELETE /periods/:period_id