Setup

To use the Services 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 { services } from @wix/bookings:

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

createService( )

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 service.

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.
Params
serviceServiceRequired
Service to be created.
Response Object
Service
Was this helpful?
Yes
No

deleteService( )

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 service.

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.
Params
serviceIdstringRequired
ID of the service to delete.

optionsDeleteServiceOptions
Allows you to configure how to handle the deleted service's future sessions and how to notify the sessions participants.
Response Object
void
Was this helpful?
Yes
No

getService( )

Developer Preview

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

Retrieves a service.

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.
Params
serviceIdstringRequired
ID of the service to retrieve.
Response Object
Service
Was this helpful?
Yes
No

queryServices( )

Developer Preview

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

Retrieves a list of up to 100 services, given the provided paging, filtering, and sorting. queryServices() runs with these defaults, which you can override:

  • paging.limit is 100.
  • paging.offset is 0.

Notes:

  • Use UTC format when filtering with dates.
  • Only 1 use of each filter in the same query is supported. If a filter is defined more than once in a query, only the first occurrence is processed.
PROPERTYSUPPORTED FILTERS & SORTING
typeeq(),ne(),exists(),in(),hasSome()
nameeq(),ne(),exists(),in(),hasSome(),startsWith()
descriptioneq(),ne(),exists(),in(),hasSome(),startsWith()
tagLineeq(),ne(),exists(),in(),hasSome(),startsWith()
hiddeneq(),ne(),exists(),in(),hasSome()
category.ideq(),ne(),exists(),in(),hasSome(),startsWith()
category.nameeq(),ne(),exists(),in(),hasSome(),startsWith()
form.ideq(),ne(),exists(),in(),hasSome(),startsWith()
payment.options.onlineeq(),ne(),exists(),in(),hasSome()
payment.options.inPersoneq(),ne(),exists(),in(),hasSome()
payment.options.pricingPlaneq(),ne(),exists(),in(),hasSome()
onlineBooking.enabledeq(),ne(),exists(),in(),hasSome()
locations.business.ideq(),ne(),exists(),in(),hasSome(),startsWith()
staffMemberIdseq(),ne(),exists(),in(),hasSome(),hasAll()
supportedSlugs.nameeq(),ne(),exists(),in(),hasSome(),startsWith()
mainSlug.nameeq(),ne(),exists(),in(),hasSome(),startsWith()

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.
Params
optionsQueryServicesOptions
Response Object
ServicesQueryBuilder
Was this helpful?
Yes
No

updateService( )

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 a service.

Partial updates are supported.

Each time the service is updated, revision increments by 1. You must include the number of the existing revision when updating the service. This ensures you're working with the latest service information and prevents unintended overwrites.

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.
Params
_idstringRequired
Service ID.

serviceUpdateServiceRequired
Response Object
Service
Was this helpful?
Yes
No