API - Planyo Web Services - add_vacation

Jesteś tutaj: Planyo » Pomoc » API » add_vacation

add_vacation (version 1)

Description:

Adds a new one-time vacation for given resource or entire Planyo site. To add weekly vacations, see the function set_weekly_schedule.

Input:

start_time DateTime required
Vacation start time
end_time DateTime required
Vacation end time. In case of day-based resources, enter either the date following the last vacationed date without time or the actual end date with the hour set to 23:59. E.g. to add vacation for the entire day: 1st of January 2013, enter 2013-01-01 23:59:00 as the end time.
resource_id int optional
If you specify resource ID, the vacation will be added only for this resource. If you leave this empty, vacation will be added for the whole site.
site_id int required
Setting site_id and not specifying any resource_id will add a global vacation (for the whole site).
quantity int optional
Enter the number of resources which should be made unavailable. In case you don't work with quantities, you can skip this parameter.
type int optional
Skip this parameter unless you want to mark the vacation as imported from a Google calendar. In such case set this parameter's value to 2.
comment string optional
Describe the vacation. In case of google calendar vacations, enter the unique event identifier.
validate bool optional
If set to true and your resource is day-based and the vacation includes start and end times (which shouldn't happen), then the vacation will be corrected automatically to match the day- or night-based character of the resource
unit_assignment string optional
Vacations can optionally also be assigned to specific units (specific a single unit or comma-separated list)
version float optional
you can optionally specify the version of the API that you're using. Use the value of latest or simply skip this parameter to use the latest API version. The latest version is: 1
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:

none

API playground:

Click here to test this function in the API playground.