API - Planyo Web Services - is_resource_available

You are here: Planyo » Help » API » is_resource_available

is_resource_available

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. In case the resource is a package which cannot be reserved because of a resource which is in package contents, its ID will be returned in unavailable_resource_id.

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)
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:

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

API playground:

Click here to test this function in the API playground.