Availabilities
Availability objects are used to convey an operator's ability to provide a service at a given time.
Reference can be found here
AvailabilityItem
An AvailabilityItem represents a point or period of time (depending on the parent Product's availabilityType
) when the parent Product Option is available for booking.
When placing a booking, the AvailabilityItem ID is used as a reference to the desired reservation time. For this reason, it is important for Operator Booking Systems to have methods in place to resolve these IDs for future reference.
Field Name | Type | Required | Description |
---|---|---|---|
id | string | Yes | Unique identifier for this Availability within the Product Option |
optionId | string | Yes | ID of the Option this availability is under, unique within the Product. |
localDateTimeStart | string(RFC3339) | Yes | The start time (inclusive) of the availability |
localDateTimeEnd | string(RFC3339) | Yes | The end time (inclusive) of the availability |
status | string(AvailabilityStatus) | Yes | Indicates whether the availability is bookable, and provides additional context |
vacancies | integer | No | Number of units available for this option at this time. Additional information on Vacancies can be found below |
Examples
// AvailabilityItems under a Product
// with an availabilityType of 'OPENING_HOURS'
// and located in Denver, Colorado.
// The Product Option 'Option 1' is available for 8
// contiguous hours a day, from 9 to 5 local time,
// and does not track capacity.
[
{
"id": "2021-02-01",
"optionId": "Option1",
"localDateTimeStart": "2021-02-01T09:00:00-07:00",
"localDateTimeEnd": "2021-02-01T17:00:00-07:00",
"status": "FREESALE"
},
{
"id": "2021-02-02",
"optionId": "Option1",
"localDateTimeStart": "2021-02-02T09:00:00-07:00",
"localDateTimeEnd": "2021-02-02T17:00:00-07:00",
"status": "FREESALE"
}
]
Note on DateTimes
localDateTimeStart
and localDateTimeEnd
must be provided as fully-qualified RFC3339 timestamps, including a UTC offset (or a suffix of Z
for an offset of -00:00
).
The offset provided MUST match the local timezone of the product option.
AvailabilityStatus
Name | Description |
---|---|
FREESALE | Always available |
AVAILABLE | Currently available for sale, but has a fixed capacity |
LIMITED | Currently available for sale, but has a fixed capacity and may be sold out soon |
SOLD_OUT | Currently sold out, but additional availability may free up |
CLOSED | Currently not available for sale, but not sold out (e.g. temporarily on stop-sell) and may be available for sale soon |
Note on Vacancies
There are some additional rules and validations on how vacancies should be counted in availabilities.
- If the availability has a status of
FREESALE
, vacancies should be omitted from the response - theFREESALE
status implies an unlimited number of vacancies. - Vacancies should be considered the total capacity of the product. The number of vacancies returned will be considered available for all unit types returned.
- It is recommended that vacancies be drawn from a general pool of vacancies shared among all Unit types within a Product Option.
- Vacancies are only available at the Option level, if you need to set availability/vacancies at a traveler type level then an option should be created for each traveler type and the vacancy set there.