Creates a service.
When creating a service you must specify the following fields:
type
(SDK | REST):
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
(SDK | REST):
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. For appointment-based services, it must be 1
.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.
Service to create.
There are 21 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.