# Query Availability

Fetch the availability of multiple products over a long period of time.

## Parameters

`perform_sync` `required` `boolean`

Whether to sync external calendars before fetching availability. Defaults to `false`

`product_ids` `required` `Array<uuid>`

The product IDs to fetch availability for.

`show_booked_as` `required` `ShowBookedAs`

How to interpret confirmed bookings. Defaults to `unavailable`

`show_closed_as` `required` `ShowClosedAs`

How to interpret blocked / closed periods. Defaults to `unavailable`

`show_pending_as` `required` `"CONFIRMED" | "TENTATIVE" | "CANCELLED"`

How to interpret pending events. Defaults to `TENTATIVE`

## Responses

`200`

Availability intervals per product

TypeScript

```
Array<{
  intervals: Array<{
    end: string;
    start: string;
    status: "available" | "booked" | "closed" | "pending" | "unavailable";
  }>;
  product_id: uuid;
}>
```

`GET /availability`

```
curl -X GET "https://api.bookingmood.com/v1/availability?product_id=00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Example response

JSON

```
[
  {
    "product_id": "00000000-0000-0000-0000-000000000000",
    "intervals": [
      {
        "start": "2026-10-30T23:37:28.748Z",
        "end": "2026-11-03T23:37:28.748Z",
        "status": "unavailable"
      },
      {
        "start": "2026-11-03T23:37:28.748Z",
        "end": "2027-02-07T23:37:28.748Z",
        "status": "available"
      }
    ]
  }
]
```
