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?"
get
https://api.ventrata.com/octo
/products/:id
Product Questions
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:
{
//...rest of the product, or unit object
"questions": [
{
"id": "4530e5e6-f23f-4ade-bd67-b0733245114c",
"required": true,
"label": "How did you hear about us?",
"description": "We love to hear from our guests how they found us so we can improve our communication and outreach to reach new guests.",
"inputType": "select",
"selectOptions": [
{ "label": "Google", "value": "google" },
{ "label": "Facebook", "value": "facebook" },
{ "label": "Friend/Family", "value": "friend" },
{ "label": "Other", "value": "other" }
]
}
]
}
Field
Description
id
The question id
required
A boolean value whether this question must be answered by the guest or not
label
The label of the question that you should show in your form.
description
An optional description that can help the guest answer this question.
inputType
This is the HTML input type that should be used. This can be one of the following values: - date - datetime-local - email - file - number - tel - text - time - url Although not strictly a input type, we also support the following types: - select - textarea
selectOptions
If the inputType is select then this will be an array of options, each option will be a JSON object with two fields label and value you should display this as: <option value="{value}">{label}</option>
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.
post
https://api.ventrata.com/octo
/bookings
Booking Reservation
The answers must be contained on either the booking or unit item object like so:
{
//..rest of the booking, or unit item object
"questionAnswers": [
{
"questionId": "4530e5e6-f23f-4ade-bd67-b0733245114c",
"value": "google"
}
]
}
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:
{
//..rest of the booking, or unit item object
"questionAnswers": [
{
"questionId": "4530e5e6-f23f-4ade-bd67-b0733245114c",
"question": {
"id": "4530e5e6-f23f-4ade-bd67-b0733245114c",
"required": true,
"label": "How did you hear about us?",
"description": "We love to hear from our guests how they found us so we can improve our communication and outreach to reach new guests.",
"inputType": "select",
"selectOptions": [
{ "label": "Google", "value": "google" },
{ "label": "Facebook", "value": "facebook" },
{ "label": "Friend/Family", "value": "friend" },
{ "label": "Other", "value": "other" }
]
},
"value": "google"
}
]
}
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.
Copy link
On this page
get
Product Questions
post
Booking Reservation