Links
Comment on page

Availability

The first step when making a sale is to check for availability. Note if allowFreesale is set to true on the product then this step is optional but it is advised you check it anyway if you can to check for closures.
OCTO has two main availability calls:
Availability Calendar endpoint is designed to be highly optimized and returns a single object per day. It's designed to be queried for large date ranges and the result is used to populate an availability calendar.
Availability Check endpoint may be slightly slower as it will return an object for each individual departure time (or day).

Availability Calendar

post
https://api.example.com/octo
/availability/calendar
Availability Calendar

This endpoint is highly optimised and will return a single object per day. It's designed to be queried for large date ranges and the result is used to populate an availability calendar.

When the end user selects an open date you can call on /availability endpoint to get the availabilityId to create the booking.

Parameters
No parameters
Body
Example
Schema
{
"productId": "6b903d44-dc24-4ca4-ae71-6bde6c4f4854",
"optionId": "DEFAULT",
"localDateStart": "2022-05-23",
"localDateEnd": "2022-05-29",
"units": [
{
"id": "string",
"quantity": 0
}
]
}
Responses
200: OK
OK
400: Bad Request
Example response

Availability Check

A reseller has to perform Availability Check to retrieve an availabilityId in order to make a Booking Reservation, so this endpoint is critical for the booking flow.
post
https://api.example.com/octo
/availability
Availability Check

This endpoint is slightly slower as it will return an object for each individual departure time (or day). You have to perform this step to retrieve an availabilityId in order to confirm a sale, so if you just want to use this endpoint and skip the calendar endpoint then that's perfectly ok.

You must pass in one of the following combinations of parameters for this endpoint:

  • localDate

  • localeDateStart and localDateEnd

  • availabilityIds

Parameters
No parameters
Body
Example
Schema
{
"productId": "6b903d44-dc24-4ca4-ae71-6bde6c4f4854",
"optionId": "DEFAULT",
"localDateStart": "2022-05-23",
"localDateEnd": "2022-05-29",
"availabilityIds": [
"2022-05-23T00:00:00+01:00"
],
"units": [
{
"id": "string",
"quantity": 0
}
]
}
Responses
200: OK
OK
400: Bad Request
Example response