Back to overview
Calendar
The MyTourist calendar is the centralized space where all the magic happens. Your bookings, price rates, available rooms, and restrictions like min./max. stay and check-in/out restrictions printed into one single calendar.
This endpoint returns fully cached results, the cache will refresh after a change took place in your account. It may take a few minutes to implement those changes into the cache.
Index:
Fetch the calendar data
This endpoint will return the number of available
rooms and current logies price per price rate
for each day of the given month. You can take all your roomtypes or just a single one.
POST https://app.mytourist.cloud/api/v1/calendar
Query Parameters
date | required | YYYY-MM-DD (it will automatically determine the month range) |
roomtype_id | optional | @id from roomtypes |
language | optional | ISO 639-1 |
Example result
{
"@roomtype_id":{
"@date(YYYYMMDD)":{
"availability":{
".." : ".."
},
"prices": {
"@rate_id" : {
".." : ".."
}
}
}
},
"4719120611":{
"20201130":{
"availability":{
"value":2,
"custom_value":false
},
"prices":{
"120022112": {
"id": "120022112",
"min_stay": 2,
"max_stay": 3,
"closed_on_arrival": false,
"closed_on_departure": true,
"name": "Weekend arrangement",
"public_name": "Verblijf met 15% korting - vanaf 3 nachten",
"current_price": 100,
"default_price": 100,
"is_custom_price": false,
},
"120022113": {
"id": "120022112",
"min_stay": 3,
"max_stay": 14,
"closed_on_arrival": false,
"closed_on_departure": true,
"name": "OTA (booking.com)",
"public_name": "",
"current_price": 110,
"default_price": 110,
"is_custom_price": false,
"is_subrate": true,
"subrate": {
"adjusted_by": "percentage",
"value": "10"
}
},
"120022114": {
"id": "120022112",
"min_stay": 3,
"max_stay": 14,
"closed_on_arrival": false,
"closed_on_departure": true,
"name": "Midweek",
"public_name": "",
"current_price": 150,
"default_price": 140,
"is_custom_price": true,
},
}
},
"20201201" : {
"..." : "..."
}
},
"23192010281":{
"2020-12-01" : {
"..." : "..."
}
}
}
Bulk changes
With this function you can manage and overwrite the following values; available
, price_per_night
, min_stay
, max_stay
, may_checkin_on
, may_checkout_on
per price_rate
per day or just a selected period. With this functions it’s no longer needed to make bulk changes to your calendar via the MyTourist GUI.
POST https://app.mytourist.cloud/api/v1/calendar/{RATE_ID}
Query Parameters
from | required | YYYY-MM-DD |
until | required | YYYY-MM-DD |
rooms_to_sell | optional | Won't go higher than the exact number of rooms. `rooms_to_sell` = `rooms_to_sell` MINUS `number_of_bookings` (calculated automatically) or use `auto` for the default value |
min_stay | optional | Nights or use `auto` for the default value |
max_stay | optional | Nights or use `auto` for the default value |
may_checkin_on | optional | Default: mo,tu,we,th,fr,sa,su (comma separated) |
may_checkout_on | optional | Default: mo,tu,we,th,fr,sa,su (comma separated) |
price_per_night | optional | decimal 10,2 or use `auto` for the default value |
Example 1 | change availability for one single day.
In this example we will lower the number of available rooms from 4 to just 1 available room.
curl --location --request POST 'https://app.mytourist.cloud/api/v1/calendar/{RATE_ID}' \
--header 'Authorization: Bearer {YOUR_SECRET_BEARER}' \
--form 'from="2030-01-01"' \
--form 'until="2030-01-01"' \
--form 'rooms_to_sell="1"'
Example 2 | setup only arrivals on Monday/Tuesday and Departures on Friday/Saturday between longer period.
In this example we give the weekdays witch allowed to arrive and depart. The weekdays now given will be closed for arrival or departure.
curl --location --request POST 'https://app.mytourist.cloud/api/v1/calendar/{RATE_ID}' \
--header 'Authorization: Bearer {YOUR_SECRET_BEARER}' \
--form 'from="2030-01-01"' \
--form 'until="2030-05-15"' \
--form 'may_checkin_on="mo,tu"' \
--form 'may_checkout_on="fr,sa"'
Example 3 | Change price for one week
For this period we will change te price from 120 to 100.
curl --location --request POST 'https://app.mytourist.cloud/api/v1/calendar/{RATE_ID}' \
--header 'Authorization: Bearer {YOUR_SECRET_BEARER}' \
--form 'from="2030-01-01"' \
--form 'until="2030-01-07"' \
--form 'price_per_night="100,00"'
#### Example 3 | Change price for one week for a sub-price rate.
For this period we will change te price from 100 to 110 by increasing the subprofiles percentage by 10%.
> With sub-price rates, you only enter the amount or percentage that this price profile deviates from the parent price profile. In the "Fetch the calendar data" enpoint as described above, you can find the exact `adjusted_by` value of the respective sub price rate.
curl –location –request POST ‘https://app.mytourist.cloud/api/v1/calendar/{RATE_ID}’
–header ‘Authorization: Bearer {YOUR_SECRET_BEARER}’
–form ‘from=”2030-01-01”’
–form ‘until=”2030-01-07”’
–form ‘price_per_night=”10”’
#### Example 4 | Reset everything into their defaults
This will take the default availability and the price and restrictions from the price rate.
curl –location –request POST ‘https://app.mytourist.cloud/api/v1/calendar/{RATE_ID}’
–header ‘Authorization: Bearer {YOUR_SECRET_BEARER}’
–form ‘from=”2030-01-01”’
–form ‘until=”2030-01-07”’
–form ‘rooms_to_sell=”auto”’
–form ‘price_per_night=”auto”’
–form ‘min_stay=”auto”’
–form ‘max_stay=”auto”’
–form ‘may_checkin_on=”mo,tu,we,th,fr,sa,su”’
–form ‘may_checkout_on=”mo,tu,we,th,fr,sa,su”’
```