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.
post
https://api.ventrata.com/octo
/availability/resources
Check Available Resources
The response body will be an array of resource groups defined as:
Field
Description
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
post
https://api.ventrata.com/octo
/bookings
Booking Reservation
An example body would look like this:
{
//... rest of the booking object
"resourceAllocations": [
{
"resourceGroupId": "4effa6c9-eba0-4a4e-a763-91760dc884c3",
"resourceId": "4effa6c9-eba0-4a4e-a763-91760dc884c3",
"paxCount": 2,
"seatIds": [
"7f82745f-1220-4a46-abd8-8d829c448428",
"814a7f87-bc31-4edf-b52e-d23d0a91047c"
]
}
]
}
The fields should be obvious, but for clarity:
Field
Description
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:
{
//... rest of the booking object
"resourceAllocations": [
{
"resourceGroupId": "4effa6c9-eba0-4a4e-a763-91760dc884c3",
"resourceGroup": {
"id": "4effa6c9-eba0-4a4e-a763-91760dc884c3",
"title": "Busses",
"split": false
},
"resourceId": "4effa6c9-eba0-4a4e-a763-91760dc884c3",
"resource": {
"id": "d68ab73f-eed1-4098-9051-58ed74331fdf",
"title": "Bus 1",
"seating": true,
"seats": [
{
"id": "7f82745f-1220-4a46-abd8-8d829c448428",
"title": "1A",
"column": 1,
"row": 1
},
{
"id": "814a7f87-bc31-4edf-b52e-d23d0a91047c",
"title": "1B",
"column": 2,
"row": 1
}
//...etc
]
},
"paxCount": 2,
"seatIds": [
"7f82745f-1220-4a46-abd8-8d829c448428",
"814a7f87-bc31-4edf-b52e-d23d0a91047c"
],
"seats": [
{
"id": "7f82745f-1220-4a46-abd8-8d829c448428",
"title": "1A",
"column": 1,
"row": 1
},
{
"id": "814a7f87-bc31-4edf-b52e-d23d0a91047c",
"title": "1B",
"column": 2,
"row": 1
}
//...etc
]
}
]
}
Copy link
On this page
post
Check Available Resources
post
Booking Reservation