allowFreesaleis 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.
POST /availability/calendarthis 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.
POST /availabilitythis 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
availabilityIdin order to confirm a sale, so if you just want to use this endpoint and skip the calendar endpoint then that's perfectly ok.
localDateEnd. Each object is defined as:
AVAILABLEThere are availabilities available on this date for sale.
SOLD_OUTThis date was available but is now fully sold out.
LIMITEDThis date is available but has less than 50% capacity left.
CLOSEDThis date is closed and not available for sale.
status == 'AVAILABLE' || status == 'LIMITED'
AVAILABLEThis availability is available for sale
FREESALEThis availability has no capacity and is available.
SOLD_OUTThis availability is not
LIMITEDThis availability is available but has less than 50% capacity left.
product.availabilityTypethe response will keep the same structure but will generally look slightly different. We've provided examples of that below:
2020-07-01then they must then pick a departure time. Again in this example the departure times would be: