Creates a service.
When creating a service you must specify the following fields:
type:
Whether it's an appointment-based service, class, or course.name: Service name that's displayed to customers.onlineBooking:
Settings determining whether customers can book online, whether the business
must manually confirm bookings, and whether customers can request to book an
appointment time slot that already has a booking request awaiting business
confirmation.payment:
How customers can pay when signing up for the service.defaultCapacity: The maximum number of customers that can book the service. Required for all service types.1.Set category.id to assign the service to a category.
Without an assigned category, the service isn't visible on the live site.
Set onlineBooking.enabled to true so customers can book the service online.
When enabled, the service is included in the single-service booking flow.
Set onlineBooking.requireManualApproval to control whether bookings need business approval before confirmation.
Services with manual approval enabled can't accept pricing plan payments.
Set payment.rateType to FIXED, VARIED, CUSTOM, or NO_FEE and specify the corresponding rate details:
FIXED: Set payment.fixed.price.VARIED: Set payment.varied.defaultPrice.CUSTOM: Set payment.custom.description.NO_FEE: No additional rate details required.Configure payment.options to control how customers can pay:
online: Customers can pay online. Requires rateType of FIXED or VARIED.inPerson: Customers can pay in person.deposit: A deposit is required to book. Requires rateType of FIXED or VARIED and a deposit amount in the rate details.pricingPlan: Customers can pay using a pricing plan.
Can't be used in combination with manual approval.Learn more about service payments.
Depending on which type of service you're creating, you may also need to specify supported session durations.
Classes and courses
Don't specify schedule.availabilityConstraints.sessionDurations.
Appointment-based services without varied pricing based on session length
Specify the single supported session duration in the
schedule.availabilityConstraints.sessionDurations array.
Appointment-based services with varied pricing based on session length
schedule.availabilityConstraints.sessionDurations.schedule.availabilityConstraints.sessionDurations,
even though these values are ignored.For appointment-based services, you can set schedule.availabilityConstraints.timeBetweenSessions to add buffer time between booked sessions.
Set the service's location types and options. You can set 1, some, or all types simultaneously. See About service locations for details.
Specify media so customers see images when selecting the service.
Set media.mainMedia as the primary image and optionally media.coverMedia or media.items.
Each item is an image with id, height, and width, and optionally url and altText.
Refer to the Media Manager API for details about uploading images and retrieving their IDs.
Don't specify existing add-on groups when calling Create Service. Instead, use dedicated add-on group and add-on creation methods to ensure proper validation and maintain referential integrity between services and their optional extras. You can follow this sample flow to create bookable add-ons.
You can only call this method when authenticated as a Wix app or Wix user identity.
There are 21 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.