API - Planyo Web Services - add_resource_season

Jesteś tutaj: Planyo » Pomoc » API » add_resource_season

add_resource_season

Description:

Adds a new season for given resource or entire Planyo site.

Input:

start_month int required
Month of the season's start time (1-12)
start_day int required
Day of the season's start time (1-31)
end_month int required
Month of the season's end time (1-12)
end_day int required
Day of the season's end time (1-31)
year int optional
Optionally you can limit the season to a single year
resource_id int optional
If you specify resource ID, the season will be added only for this resource. If you leave this empty, the season will be added for the whole site.
site_id int optional
This parameter is used only for metasite-level api keys. Setting site_id and not specifying any resource_id will add a global season (for the whole site). For site-specific api keys or when resource_id is specified, you can skip this parameter.
min_rental_time float required
Mininum rental duration during the season (expressed in hours so enter e.g. 0.25 for a 15-min period or 24 for a full day).
max_rental_time float optional
You can optionally specify the maximum rental duration during the season (expressed in hours so enter e.g. 0.25 for a 15-min period or 24 for a full day).
start_weekday_flags int optional
You can optionally force reservations to start on specific weekdays. These are ORed flags specifying days when rentals can start: 1 = 2^0 = Sunday, 2 = 2^1 = Monday, 4 = 2^2 = Tuesday, 8 = 2^3 = Wednesday, 16 = 2^4 = Thursday, 32 = 2^5 = Friday, 64 = 2^6 = Saturday -- example: when this value equals 3 = 2+1 = Monday + Sunday)
end_weekday_flags int optional
You can optionally force reservations to end on specific weekdays. These are ORed flags specifying days when rentals can end: 1 = 2^0 = Sunday, 2 = 2^1 = Monday, 4 = 2^2 = Tuesday, 8 = 2^3 = Wednesday, 16 = 2^4 = Thursday, 32 = 2^5 = Friday, 64 = 2^6 = Saturday -- example: when this value equals 3 = 2+1 = Monday + Sunday)
priority int optional
You can optionally specify the priority of this season. If multiple seasons match specific dates, the season with the lowest priority number will be used. If you skip this parameter (or specify 0) then the season will be inserted with the lowest priority. Specify 1 for the highest priority possible.
title string optional
Seasons can optionally have names. You can use the same name for multiple seasons. In such case a single pricing manager rule can be used to set a new price for a number of date ranges. Season names are also useful for the calendar preview legend.
color string optional
Seasons can optionally have a color assigned. Use the html color notation (e.g. #33FF33). The color will be used in calendar previews.
method string required
must be set to add_resource_season
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp.

Output:

season_id int
ID of the newly added season.
priority int
Priority of the newly added season

API playground:

Click here to test this function in the API playground.