API - Planyo Web Services - can_make_reservation

Sie sind hier: Planyo » Hilfe » API » can_make_reservation



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.


resource_id int required
ID of the resource
start_time DateTime required
Beginning of rental
end_time DateTime required
End of rental. In case of whole-day reservations, enter either the date following the rental date without time or the actual end date with the hour set to 23:59. E.g. to reserve the entire day: 1st of January 2013, enter 2013-01-01 23:59:00 as the end time. In case of night reservations (e.g. accommodations), enter the departure date without any time. E.g. to reserve a single night of the 1st of January 2013, enter 2013-01-02 (=departure date).
quantity int required
Number of units
assignment1 string optional
If the resource quantity is greater than one and it has named units, then you can specify the unit to check for availability here. If checking more than one unit (quantity > 1), pass the other ones in assignment2, assignment3, etc.
admin_mode bool optional
If set to true, the response will be given for the admin, meaning that for example dates which are vacationed will still be reservable. This is the same as when the administrator makes a reservation using the UI (the conditions are much less strict as for regular customers). The default value is false.
wants_share SharingMode optional
Set the desired sharing mode (used only when sharing is possible)
rental_prop_xyz string optional
Resource-specific additional fields (defined in the admin panel in the Reservation form layout). E.g. if you define additional reservation property 'number of children', this should be passed as rental_prop_number_of_children (where '_' replaces all space characters)
user_id int optional
You can optionally pass the user ID of a customer if your pricing depends on user properties. Note: if you only know the user's email address, you can pass it instead in the user_email parameter.
excluded_reservation_id int optional
You can optionally pass the ID of an existing reservation which should be excluded from the check. This used when you want to check if moving an existing reservation to a new time slot is possible
return_availability bool optional
If set to true, the output will include the key is_resource_available which will indicate whether the resource is available during the period requested (this is the same as calling the is_resource_available API function with the same parameters). Please note that it's possible for a resource to be available but not reservable because of one or more restrictions. By default availability information is not returned.
return_price bool optional
If set to true, the output will include the key price (float) which will indicate the price for given resource, period and all other parameters (same price as you can get by calling the get_rental_price API function with the same parameters). By default price information is not returned. Price will not be returned if the resource cannot be reserved unless the value of return_price is set to force.
method string required
must be set to can_make_reservation
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.


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

API playground:

Click here to test this function in the API playground.