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. 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.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.
This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:
Service to create.
There are 21 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.