POST

Create Service


Creates a service.

Required fields

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.
  • For classes, set to the maximum number of participants per session.
  • For courses, set to the maximum number of participants for the course.

Category

Set category.id to assign the service to a category. Without an assigned category, the service isn't visible on the live site.

Online booking

Set onlineBooking.enabled to true so customers can book the service online. When enabled, the service is included in the single-service booking flow.

Approval

Set onlineBooking.requireManualApproval to control whether bookings need business approval before confirmation. Services with manual approval enabled can't accept pricing plan payments.

Payment

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.

Session durations

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

  • Specify all supported session durations in schedule.availabilityConstraints.sessionDurations.
  • Note that Wix Bookings doesn't display these values to customers and ignores them in pricing and availability calculations. Instead session durations are retrieved from the relevant service variants.
  • It is mandatory to specify schedule.availabilityConstraints.sessionDurations, even though these values are ignored.

Buffer time

For appointment-based services, you can set schedule.availabilityConstraints.timeBetweenSessions to add buffer time between booked sessions.

Locations

Set the service's location types and options. You can set 1, some, or all types simultaneously. See About service locations for details.

Media

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.

Add-on groups

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.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/_api/bookings/v2/services

Errors
400Invalid Argument

There are 21 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?