This resource represents Periods which define the timeline for applicability of the Seasons.
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 all periods for a given account.
GET /periods
{
"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": [
{
"id": 232,
"created_at": "2023-12-11T08:26:23Z",
"updated_at": "2023-12-11T08:26:23Z",
"start_date": "2023-12-18",
"end_date": "2024-08-23",
"links": {
"rates_table": 5,
"season": 12
}
}
]
}
Returns a single period identified by ID.
GET /periods/:period_id
{
"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": [
{
"id": 232,
"created_at": "2023-12-11T08:26:23Z",
"updated_at": "2023-12-11T08:26:23Z",
"start_date": "2023-12-18",
"end_date": "2024-08-23",
"links": {
"rates_table": 5,
"season": 12
}
}
]
}
Creates a period for given season.
POST /seasons/:season_id/periods
{
"periods": [
{
"start_date": "2023-12-18",
"end_date": "2024-08-23"
}
]
}
{
"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": [
{
"id": 232,
"created_at": "2023-12-11T08:26:23Z",
"updated_at": "2023-12-11T08:26:23Z",
"start_date": "2023-12-18",
"end_date": "2024-08-23",
"links": {
"rates_table": 5,
"season": 12
}
}
]
}
Returns an updated period identified by ID.
PUT /periods/:period_id
{
"periods": [
{
"start_date": "2023-12-18",
"end_date": "2024-08-23"
}
]
}
{
"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": [
{
"id": 232,
"created_at": "2023-12-11T08:26:23Z",
"updated_at": "2023-12-11T08:26:23Z",
"start_date": "2023-12-18",
"end_date": "2024-08-23",
"links": {
"rates_table": 5,
"season": 12
}
}
]
}
Required OAuth scope: :rates_write
Returns an empty response with ‘204 No Content’ status code on success.
DELETE /periods/:period_id