Setup

To use the Categories API, install the @wix/bookings package using npm or Yarn:

Copy
1
npm install @wix/bookings

or

Copy
1
yarn add @wix/bookings

Then import { categories } from @wix/bookings:

Copy
1
import { categories } from '@wix/bookings'
Was this helpful?
Yes
No

createCategory( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a new category.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings
Manage Bookings - all permissions
Learn more about permission scopes.
Copy
function createCategory(category: Category): Promise<Category>
Method Parameters
categoryCategoryRequired
Category information.
Returns
Return Type:Promise<Category>
Was this helpful?
Yes
No

deleteCategory( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Deletes a category. When deleting a category, you have the option to delete all the associated services within this category using the deleteServices field in the request.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings
Manage Bookings - all permissions
Learn more about permission scopes.
Copy
function deleteCategory(_id: string, options: DeleteCategoryOptions): Promise<DeleteCategoryResponse>
Method Parameters
_idstringRequired
Category ID.

optionsDeleteCategoryOptions
Returns
Return Type:Promise<DeleteCategoryResponse>
Was this helpful?
Yes
No

listCategories( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Lists all categories.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Bookings - Public Data
Manage Bookings Services and Settings
Manage Bookings
Read Bookings - Including Participants
Read Bookings - all read permissions
Manage Bookings - all permissions
Learn more about permission scopes.
Copy
function listCategories(options: ListCategoriesOptions): Promise<ListCategoryResponse>
Method Parameters
optionsListCategoriesOptions
Returns
Return Type:Promise<ListCategoryResponse>
Was this helpful?
Yes
No

updateCategory( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates an existing category.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings
Manage Bookings - all permissions
Learn more about permission scopes.
Copy
function updateCategory(_id: string, category: UpdateCategory): Promise<UpdateCategoryResponse>
Method Parameters
_idstringRequired
Category ID.

categoryUpdateCategoryRequired
Returns
Return Type:Promise<UpdateCategoryResponse>
Was this helpful?
Yes
No