# Availabilities

To fetch the availability of a `Product` (`CatalogItem` or `CatalogItemDetails`) , you may use the following method, passing in the date range you are interested in. If you are only interested in a single day, just pass in the same end date as the start date.

This method will asynchronously return an `Availability` type for every date for which the desired experience is available.

{% tabs %}
{% tab title="iOS" %}

```swift
Traveler.fetchAvailabilities(product: catalogItemDetails, 
                           startDate: Date(), 
                             endDate: Date()) { (availabilities, error) in
  
}
```

Alternatively you can use the delegate pattern

```swift
Traveler.fetchAvailabilities(product: catalogItemDetails, 
                           startDate: Date(), 
                             endDate: Date()),
                            delegate: self)
```

```swift
extension MyViewController: AvailabilitiesFetchDelegate {
    func availabilitiesFetchDidFailWith(_ error: Error) {
    
    }
    
    func availabilitiesFetchDidSucceedWith(_ availabilities: [Availability]) {
    
    }
}
```

{% endtab %}

{% tab title="Android" %}

```java
Traveler.fetchAvailabilities(catalogItem, new Date(), new Date(), new FetchAvailabilitiesCallback() {
    @Override
    void onAvailabilitySuccess(List<Availability> availabilities) {
    
    }
    
    @Overrider
    void onAvailabilityError(Error error) {
    
    }
});
```

{% endtab %}
{% endtabs %}

Embedded inside each `Availability` there may optionally be a `BookingOptionSet` that provide the different `BookingOption`s that may exist for that date. An example of a `BookingOption` may be the different times that are available for that date.
