> 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

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction.md

## Article Content:

# About the Services V2 API

The Bookings Services V2 API allows you to create, manage, and retrieve the
services a business offers to customers. Businesses can offer appointment-based
services, classes, and courses. Each service defines its price, when and where events
take place, how long they last, which staff can provide
them, and which booking policies exist. For example, a booking policy may define the latest time customers
can book, and whether they can reschedule or cancel.

With the Services V2 API, you can:

- Create services.
- Manage services.
- Retrieve and count services.
- Organize service [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction.md) into [groups](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-add-on-groups.md) with customer selection constraints.

## More about services

A service is an online or in-person offering that a business provides to its
customers.

### Service types and examples

Wix Bookings supports 3 different types of services:

- **Appointments**: An appointment is a 1-time event that a customer can book
  at a time of their choice during the business hours.  
  For example, a 30-minute haircut, or 30-minute 1-on-1 personal training.
- **Classes**: A class is a single event or a series of recurring events. Multiple customers can book a class. Classes may continue indefinitely, without a
  pre-defined end date. Events may take place on different days of the week, at
  different times, and with different resources, such as staff members.
  Customers can book a single event, or multiple events.  
  For example, a beginners Cross Fit class every Monday at 8 PM and every
  Wednesday at 7 PM. Customers can join session of their choice without
  committing to attend all sessions.
- **Courses**: A course starts and ends on pre-defined dates with a limited
  number of events. Multiple customers can book a course. In contrast to classes,
  customers must book the entire course and can't book individual events.  
  For example, a once-a-week 12-event introductory course to Pilates, starting
  on February 1st and ending on March 17th.

Learn more about [service types](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types.md).

### Add-ons and add-on groups

Services can offer additional options called add-ons that customers can purchase alongside the main service. Add-ons are organized into groups, allowing businesses to present related options together and set constraints on customer selections.

For example, a spa service might offer an add-on group called "Relaxing treatments" with options like aromatherapy, hot stone therapy, and reflexology. Customers can choose up to 2 treatments from this group.

Add-ons can be:
- **Duration-based**: Extend the service time. For example, a 15-minute scalp massage.
- **Quantity-based**: Allow customers to purchase multiple units. For example, 3 protein bars.

Learn more about [add-on groups](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-add-on-groups.md).

## Before you begin

It’s important to note the following points before starting to code:

- [Wix Bookings](https://www.wix.com/app-market/web-solution/bookings)
  must be installed on a site before you can use the Services V2 APIs.
  
## Use Cases

- [Export new services to an external catalog](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/sample-flows.md#export-new-services-to-an-external-catalog).
- [Create a free class](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/sample-flows.md#create-a-free-class).
- [Create a fixed price course](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/sample-flows.md#create-a-fixed-price-course).
- [Create an appointment service with varied pricing](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/sample-flows.md#create-an-appointment-service-with-varied-pricing).
- [Add pricing plan payment option to an existing service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/sample-flows.md#add-pricing-plan-payment-option-to-an-existing-service).
- [Create a course with subscription pricing](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/sample-flows.md#create-a-course-with-subscription-pricing).
- [Create an appointment service with a duration range](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/sample-flows.md#create-an-appointment-service-with-a-duration-range).

For a complete step-by-step overview of the full booking process (including service selection, availability checks, and payment), see [End-to-End Booking Flows](https://dev.wix.com/docs/api-reference/business-solutions/bookings/flow-single-service-booking.md).

## Related APIs

- [Categories](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object.md):
  Manage how services are grouped in the live site when displayed to customers.
- [Service Options and Variants](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction.md):
  Manage custom options and variants for services. For example, pricing based on
  session duration or location.
- [Staff Members](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/introduction.md):
  Manage staff members and their working schedules.
- [Resources](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/introduction.md): Manage business resources needed to provide services to customers.
- [Booking Policies](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction.md):
  Manage policies determining if and how customers can book, reschedule, and
  cancel.
- [Locations](https://dev.wix.com/docs/rest/business-management/locations/introduction.md):
  Manage business locations. Note that businesses can also provide
  services at a location of the customer's choice, or at a custom location that
  is not a business location. Learn more about [service locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations.md).

## Terminology

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

## See also

- [About Service Types](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-types.md)
- [About Service Locations](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-locations.md)
- [About Service Payments](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-payments.md)
- [About Service Slugs](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-slugs.md)
- [About Add-On Groups](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-add-on-groups.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 { services } from '@wix/bookings'
```

#### Import types

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