> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

> **Deprecated.** This article is deprecated.

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/availability-calendar/introduction.md

## Article Content:

# About the Availability Calendar API

<blockquote class='warning'>

__Deprecation Notice:__

**Availability Calendar** has been replaced with [Time Slots V2](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/time-slots-v2/introduction.md) and will be removed on March 31, 2026.

See our Availability Calendar [migration guide](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/migration-guide.md) for details.

</blockquote>

The Availability Calendar API enables you to check the availability of
appointment slots and class events, allowing for efficient booking and
scheduling for customers. It also automatically handles time zone differences
and Daylight Savings Time (DST).

With the Availability Calendar API, you can:

- Retrieve available slots for an appointment-based service.
- Retrieve available class events.

## Before you begin

It's important to note the following point before starting to code:

Calculating course availability isn't possible with the Availability Calendar API. To calculate course availability, call [Query Extended Bookings](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-reader-v2/query-extended-bookings.md)
and retrieve all bookings for a specific course. Then, ensure that the
booking's intended `numberOfParticipants` doesn't exceed the course's number
of remaining places.

See this [sample flow](https://dev.wix.com/docs/rest/business-solutions/bookings/end-to-end-booking-flows.md#book-a-course) for more details.

## Use cases

- [Book an appointment](https://dev.wix.com/docs/rest/business-solutions/bookings/end-to-end-booking-flows.md#book-an-appointment).
- [Book a class event](https://dev.wix.com/docs/rest/business-solutions/bookings/end-to-end-booking-flows.md#book-a-class-session).

## Terminology

- **Availability**: Availability refers to the time slots on an appointment-based
  service's [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction.md)
  that customers can book.
- **Policy violation**: Indicates any violations of [booking policies](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction.md),
  such as booking too early or too late.
- **Event**: A booked or reserved period of time for an appointment, class, or
  course. Alternatively, you can consider an event as a specific instance of a
  service occurring at a particular time. Previously, events were also called
  sessions in Wix Bookings APIs. The aggregation of all events for a service
  constitutes the service's schedule. Learn more about [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction.md)
  and [schedules](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction.md)
  in the [Calendar APIs](https://dev.wix.com/docs/rest/business-management/calendar/introduction.md).
- **Slot**: A time period that customers can book for a service. For
  appointments, it includes all available times for booking. For classes, it
  refers to sessions that are open for booking.

For a comprehensive glossary of Wix Bookings terms, see [Terminology](https://dev.wix.com/docs/rest/business-solutions/bookings/terminology.md).

## SDK Setup
  `@wix/bookings`

To use the API, install the `@wix/bookings` package.

#### Install the package

Follow the installation instructions for your development environment.

| Development environment | Installation method |
|--|--|
| Wix sites (editor or IDE) | Use the [package manager](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-in-the-editor.md). |
| Wix sites (local IDE) | Run `wix install @wix/bookings` using the [Wix CLI](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-with-the-wix-cli.md).|
| Blocks apps | Use the same installation method as Wix sites. |
| CLI and self-hosted apps | Run `npm install @wix/bookings` or `yarn add @wix/bookings`. |
| Headless sites and apps | Run `npm install @wix/bookings` or `yarn add @wix/bookings`. |

#### Import the package

To import the package in your code:

```js
import { availabilityCalendar } from '@wix/bookings'
```

#### Import types

Types for this API are accessed through the `availabilityCalendar` namespace you already imported above, as `availabilityCalendar.<TypeName>`, using any type name shown in these docs.
  