Resources
Adds the ability to see and edit resource allocations
To use this capability add octo/resources
to your Octo-Capabilities
header.
Resources are allocated to each booking and determine the availability of some products. For example a resource might be a bus with 30 seats, and if 2 busses were assigned to the 9:00am departure availability then the capacity returned by the availability response would be 60. However it may be preferable to allow the guest to see each bus and specify which they prefer to be booked onto. This is what this capability is intended to allow.
Even for products that rely on resources, using this capability is entirely optional. We will automatically behind the scenes allocate the best resources and seats.
Check Available Resources
POST
https://api.ventrata.com/octo/availability/resources
Returns a list of available resources for the given availability
Request Body
productId*
String
The product ID
optionId*
String
The option ID
availabilityId*
String
The availability ID
units[].id
String
The unit id
units[].quantity
Integer
The quantity of the unit
The response body will be an array of resource groups defined as:
resourceGroupId
The resource group id
resourceGroup.id
The resource group id
resourceGroup.title
The resource group name
resourceGroup.split
Whether a booking can be split between multiple resources within this group
resources[].resourceId
The resource id
resources[].resource.id
The resource id
resources[].resource.title
The resource name
resources[].resource.seating
Does this resource have reserved seating or not (boolean)
resources[].resource.seats[]
An array of all the possible seats in this resource, which will allow you to create a seat map. The seat object will be defined in the table below as it's used in multiple different areas.
resources[].availableSeats[]
A list of available seats, the schema for seat is defined below.
resources[].status
The status of that date. Possible values are:
AVAILABLE
There are availabilities available on this date for sale.
SOLD_OUT
This date was available but is now fully sold out.
LIMITED
This date is available but has less than 50% capacity left.
CLOSED
This date is closed and not available for sale.
resources[].available
A boolean value (true or false) indicating whether you're able to sell tickets. This is basically just an alias for: status == 'AVAILABLE' || status == 'LIMITED'
resources[].vacancies
The maximum number of space left available on this resource.
resources[].capacity
The total capacity this resource can hold
resources[].maxUnits
The maximum number of units that can be bought in a single booking.
Note each booking must have enough resources from EVERY resource group allocated. If resourceGroup.split
is true
then you may split the booking between multiple resources in that group, otherwise you must pick a resource that has enough space to fit the booking you're trying to make.api
Booking Reservation
POST
https://api.ventrata.com/octo/bookings
When making a booking reservation this allows you to specify which resources you want to allocate.
An example body would look like this:
The fields should be obvious, but for clarity:
resourceAllocations[].resourceGroupId
The resource group id
resourceAllocations[].resourceId
The resource id
paxCount
The size you wan't to allocate. If the resource group has split = false
then size must equal SUM(unit.paxCount)
otherwise the total sum can be split between multiple resource allocations in the same resource group.
seatIds[]
An array of seats to reserve (if resource.seating is true). This is entirely optional and if left out the best available seats will automatically be selected.
If successfully created the booking object will echo these fields back including the expanded fields, for example:
Last updated