Pricing
Provides pricing information to various endpoints
To use this capability add octo/pricing
to your Octo-Capabilities
header.
This capability supports dynamic pricing where the price of the product can be changed day by day and even at different start times. Make sure your system is able to support this level of pricing before you integrate with it.
Product Pricing
GET
https://api.ventrata.com/octo/products/:id
Returns top-level pricing by unit on each product.
Path Parameters
id
string
The product id, leave this out to get every product.
On the response the only changes from the original schema is on the Product object:
The defaultCurrency
is the default currency for this product, if you omit the currency
parameter on future endpoints this is the value Ventrata will fallback to. availableCurrencies
are all the possible currencies that we accept for this product.
pricingPer
indicates whether the pricing is per unit (most common), or per booking. Pricing which is per booking is common for private charters or group booking products where the price is the same regardless of how many tickets are purchased.
Next, if pricingPer = "UNIT"
, on each Unit (adult, child, etc.) we add the following:
If pricingPer = "BOOKING"
then these fields will be on the Product itself instead of the Unit as the pricing applies once to the booking regardless of how many units (tickets) are purchased.
We'll produce one pricingFrom
object for each currency in availableCurrencies
. The meaning of each pricing field is given below:
Field
Description
original
The original price for this product which will be the same or higher than the sale amount. Use this to show a discount has been applied e.g. $10 $8.50
retail
The sale price you should charge your customers.
net
The wholesale rate the supplier will charge you for this sale.
currency
The currency.
currencyPrecision
All pricing is given in integers to avoid floating point rounding issues. e.g. USD = 2 and JPY = 0. To convert a price to decimal you should do: price / (10 ** currencyPrecision)
where ** is to the power of e.g. Math.pow(10, currencyPrecision)
.
includedTaxes
Any taxes included in the retail and/or net price.
Throughout this capability we'll use a convention where we'll end the object key with From
to indicate this is indicative and not the final price. Make sure you communicate this also to the customer.
Pricing Calendar
POST
https://api.ventrata.com/octo/availability/calendar
Returns pricing per day for when you're generating a calendar view.
Request Body
currency
string
The currency to use
The documentation above only shows the additions this capability adds to the availability calendar endpoint. See the documentation here to see the full request parameters and response object.
Using the availability calendar endpoint for pricing is designed to make it easy to generate a pricing calendar for example on Google Travel:
Each availability object is given a new unitPricingFrom
field with an array of unit prices in the currency for example:
If you pass the units
to the request then we'll give the total pricing for the selection under the pricingFrom
field, which is also included by default if pricingPer = BOOKING
as the number of units isn't needed to know what the price of the booking is. For example:
Having the pricingFrom
value calculated for you makes it much easier to display a single price on each date on the calendar (assuming the guest has chosen how many units they want before you display the calendar).
If pricingPer = BOOKING then unitPricingFrom will not be provided.
Pricing Check
POST
https://api.ventrata.com/octo/availability
Returns a final quote of the price before making a booking.
Request Body
currency
string
The currency to use
This endpoint is the availability check endpoint which has been extended to add pricing. We only document the added parameters here, to see the full documentation for the original availability check you can find it here.
If we were to repeat the request above in the calendar section this is what the response would look like instead: