Availability
Getting availability for a product
What you need to know:
The OCTo specification outlines a number of types of inventory calls. We implement the following OCTo availability calls:
POST /suppliers/:id/availability/
this endpoint will return a single availability object for each day, based on the request parameters. You MUST perform this step to obtain the availabilityId
to perform a sale transaction.
You must pass in one of the following combinations of parameters for this endpoint:
localDate
localDateStart
andlocalDateEnd
availabilityIds
Example of POST
/availability/
:
Check Availability
POST
https://api.zaui.io/octo/availability
Determines the current availability of a product.
Request Body
productId*
string/uuid
The product ID
optionId*
string
The option ID
localDateStart
string
Travel start date to search. (YYYY-MM-DD)
localDateEnd
string
Travel end date to search. (YYYY-MM-DD)
units[].id
string/uuid
seniors or adults or students or children or infants
units[].quantity
string
The unit quantity
localDate
string
The local date to query (Format: YYYY-MM-DD)
availabilityIds
array
Filter the results by given ids
Check Availability Calendar
POST
https://api.zaui.io/octo/availability/calendar/
Returns a single object per day. Designed for large date ranges used to populate an availability calendar.
Request Body
productId*
string/uuid
The product ID
optionId*
string
The option ID
localDateStart*
string
Start date to query (Format: YYYY-MM-DD)
localDateEnd*
string
End date to query (Format: YYYY-MM-DD)
units
array
A list of units
units.id*
string/uuid
The unit id
units.quantity*
int
The quantity of the unit
Response Objects:
Field
Description
id
The availability ID. You need this for making a Booking.
localDateTimeStart
The travel date/time for this availability, in the same time zone as the supplier's product.
localDateTimeEnd
The travel date/time for this availability, in the same time zone as the supplier's product.
allDay
Boolean indicating an all day or a fixed departure time. If true, then there will be no other available objects on the same day.
available
Whether there is availability for this date/time slot.
status
The status of that date. Possible values are:
AVAILABLE
This availability is available for sale
FREESALE
This availability has no capacity and is available.
SOLD_OUT
This availability is not available
LIMITED
This availability is available but limited.
vacancies
The remaining inventory.
capacity
Total allowed inventory.
maxUnits
Maximum number of units that can be sold within one booking on this date/time slot.
utcCutoffAt
The time by which the booking must be confirmed.
openingHours[].from
When this product opens (HH:MM)
openingHours[].to
When this product closes (HH:MM)
If the product status is CLOSED
then there will be no availability object returned.
Last updated