Custom Questions
Adds the ability to ask custom questions on a booking or unit item
To use this capability add octo/questions
to your Octo-Capabilities
header.
Custom questions allow you to ask the reseller to provide answers to specific questions during the booking flow. These questions can't affect availability or pricing, they're purely informative such as "How did you hear about us?" and "Do you have any allergies?"
Product Questions
GET
https://api.ventrata.com/octo/products/:id
With this capability enabled we'll add questions
array to both the product and the unit schema. Questions assigned to the product schema are intended once for the whole booking, and questions on the unit schema are intended for each unit item belonging to that unit.
For example:
If the inputType
is anything other than select
then the selectOptions
array will be empty.
You should display all questions to the guest, either once for the booking (if the question was on the product object) or one for each and every unit item (if the question was on the unit object).
You must submit the answers before or on the final booking confirmation call.
Booking Reservation
POST
https://api.ventrata.com/octo/bookings
The answers must be contained on either the booking or unit item object like so:
The value should always be as text, and the questionId
value should equal the question.id
from the section before.
The booking object when it's returned will always list the answers like so:
Note that the answers array on both the booking and unit item will ALWAYS be populated with answers for every question whether you have already answered them or not. We also include the full question object in each answer to make it easier for you to present a form to the guest after creating the initial booking.
Our recommended approach for implementing questions is to dynamically fetch them after initially creating the booking, using the questions contained within booking.answers
and booking.unitItems[].answers
the value
field will be null
if they haven't been answered already.
Last updated