get_rental_price (version 1)
Returns the price of a rental for given resource and start/end times. Price is returned even if resource is not available in given period (because of vacations defined or existing reservations).
Note that if you want to fetch prices for multiple periods (up to 50), you can pass optional parameters start_time_x
(e.g. start_time_2=...&end_time_2=...&start_time_3=...&end_time_3=....) where x is in range from 2 to 50. In such case the output will include extra_times
with the prices for the extra times.
resource_id int required
ID of the resource
Beginning of rental. Can be a timestamp or text.
End of rental. Can be a timestamp or text. 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. for 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
admin_mode bool optional
If set to true
, the response will be given for the admin and not for a regular customer. This normally makes no difference, except when using a custom pricing script which returns different pricing for the admins. The default value is false
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). You can also pass the voucher code in rental_prop_voucher.
Set the desired sharing mode (used only when sharing is possible)
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
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
Currency in which the price is expressed (3-letter ISO 4217 code)
Click here to test this function in the API playground.