POST

Create Service


Creates a service.

Required fields

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.

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 (SDK | REST).
  • It is mandatory to specify schedule.availabilityConstraints.sessionDurations, even though these values are ignored.
Authentication

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

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

Body Params
serviceServiceRequired

Service to create.

Response Object
serviceService

Created service.

Request
cURL
Response
JSON
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?