> 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/stores/catalog-versioning/introduction.md

## Article Content:

# About the Catalog Versioning API

The Catalog Versioning API allows you to determine which version of the Wix Stores Catalog a site is using.

With the Catalog Versioning API, you can retrieve the catalog version installed on a site.

## V1 vs V3 catalogs

Wix Stores has two catalog versions:

- **Catalog V1**: The original Wix Stores API. Some stores remain on this version, though all sites will eventually migrate to V3. Learn more about [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/introduction.md).
- **Catalog V3**: The newer API offering finer-grained control and better performance. Learn more about [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/introduction.md).

The two versions are **not** backwards compatible. To ensure your integration works correctly, call [GetCatalogVersion](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/get-catalog-version.md) at the beginning of each flow to determine which API to use.

## Domain events and webhooks

Each catalog version has its own set of domain events. Changes in the V1 catalog trigger V1 webhooks, and changes in the V3 catalog trigger V3 webhooks.

To handle events from all sites until V1 is fully deprecated, subscribe to both V1 and V3 domain events:
- V1 domain events for notifications from sites still on V1 catalog.
- V3 domain events for notifications from sites migrated to V3 catalog.

## Important notes

- The `GetCatalogVersion` endpoint takes no parameters. All necessary information is contained within your authorization header.
- Once a store has been upgraded to V3, it will not be downgraded to V1.
- Catalog version is permanent for a given site. A single call to this endpoint is sufficient for most flows.

## Before you begin

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

- The site owner must have the Wix Stores app installed.

## Use cases

- [Create a product while supporting both V1 and V3 catalogs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/sample-flow.md#create-a-product-while-supporting-both-v1-and-v3-catalogs)

## Terminology

- **Catalog V1**: Original Wix Stores API.
- **Catalog V3**: Newer Wix Stores API with improved performance and capabilities.

## SDK Setup
  `@wix/stores`

To use the API, install the `@wix/stores` 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/stores` 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/stores` or `yarn add @wix/stores`. |
| Headless sites and apps | Run `npm install @wix/stores` or `yarn add @wix/stores`. |

#### Import the package

To import the package in your code:

```js
import { catalogVersioning } from '@wix/stores'
```

#### Import types

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