API - Planyo Web Services - is_resource_available

Planyo » Pomoc » API » is_resource_available

is_resource_available (version 0.2)

Description:

Returns resource availability for given time period. Please note that making a reservation may be impossible even if the resource is available. This may be caused by additional constraints such as required start/end weekday, not enough free time after previous rental etc. Use can_make_reservation to find out if a reservation can be made for given start/end time taking under consideration both availability and other constraints.

Input:

resource_id int required
ID of the resource
start_time DateTime required
Beginning of rental
end_time DateTime required
End of rental
quantity int required
Number of units
wants_share SharingMode optional
Set the desired sharing mode (used only when sharing is possible)
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: 0.2
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

Output:

is_available bool
True if resource is available for given start/end time or false otherwise.
problem_time DateTime
If resource is not available, this indicates the first conflicting hour
quantity_available int
If resource is not available, this indicates the max. quantity available
reason string
Explanation of unavailability (if is_available is false) that can be displayed to the end user