Availability
Getting availability for a product
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. GET /suppliers/:id/availability/
similar to the POST version, a single availability object for each day is returned, based on the request parameters. You must pass in one of the following combinations of parameters for this endpoint:
localDate
localDateStart
andlocalDateEnd
availabilityIds
Example of
POST
/suppliers/{id}/availability/
:POST /suppliers/:id/availability/
{
"productId": 121,
"optionId": "328d132f3cf710bbe34cd48be09e439b2948f43d",
"localDateStart": "2024-10-10",
"localDateEnd": "2024-10-20",
"units": [
{ "id": "seniors", "quantity": 2 },
{ "id": "adults", "quantity": 1 }
]
}
post
https://api.zaui.io/octo
/suppliers/{id}/availability
Check Availability
get
https://api.zaui.io/octo
/suppliers/{id}/availability
Check Availability
post
https://api.zaui.io/octo
/suppliers/{id}/availability/calendar/
Check Availability Calendar
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 saleFREESALE 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 modified 4mo ago