API - Planyo Web Services - can_make_reservation

Planyo » Pomoc » API » can_make_reservation

can_make_reservation (version 0.2)

Description:

Returns true if reservation can be made or false if it's not possible. A reservation may not be possible because of lack of availability or because of other constraints such as required start/end weekday, not enough free time after previous rental etc.

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_reservation_possible bool
True if reservation can be made or false otherwise.
problem_time DateTime
If resource is not available, this indicates the first conflicting hour
reason string
Explanation of why a reservation cannot be made (if is_reservation_possible is false) that can be displayed to the end user