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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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 |
| The availability ID. You need this for making a Booking. |
| The travel date/time for this availability, in the same time zone as the supplier's product. |
| The travel date/time for this availability, in the same time zone as the supplier's product. |
| Boolean indicating an all day or a fixed departure time. If true, then there will be no other available objects on the same day. |
| Whether there is availability for this date/time slot. |
| The status of that date. Possible values are:
|
| The remaining inventory. |
| Total allowed inventory. |
| Maximum number of units that can be sold within one booking on this date/time slot. |
| The time by which the booking must be confirmed. |
| When this product opens (HH:MM) |
| When this product closes (HH:MM) |
If the product status is CLOSED
then there will be no availability object returned.
Last updated