Rentals
Allows for rental features to be accessible via API
Allow rental products to be booked via API where a rental duration can be offered and selected.
To use this capability add octo/rentals
to your Octo-Capabilities
header.
Rental Product
GET
https://api.ventrata.com/octo/products
GET
https://api.ventrata.com/octo/products/:id
The product schema has been updated to introduce two new fields:
product.isRental
which is a boolean field indicating whether this product is a rental and therefore contains rental durations.
option.rentalDurations
a list of the rental durations available for sale.
For example:
In the example above we have 3 rental durations to chose from, 1, 2 and 3 days. You have the guest pick a duration in the same form they pick the option/unitItems.
The field definitions on the rentalDuration
object are as follows:
id
The rental duration ID, you'll need this for availability and booking calls
title
The human readable title you can present to the guest to label the duration
shortDescription
Any subtitle (if any) to help describe the rental duration
durationAmount
A float indicating the duration amount
durationUnit
The duration unit for the amount above it
Rental Availability
POST
https://api.ventrata.com/octo/availability/calendar
POST
https://api.ventrata.com/octo/availability
Fetching availability for a duration object is simple, you just need to add the rentalDurationId to the request body, for example:
This will check the availability for the provided duration, and return the results including pricing for that duration (if you include octo/pricing
)
Rental Booking
POST
https://api.ventrata.com/octo/bookings
Once you're ready to make a booking, you just need to include the rentalDurationId
the request, this will make a booking with the provided duration, for example:
The booking object will now also include both the rentalDurationId
and rentalDuration
object, for example:
Last updated