Flow: Set Up a Service

This article describes how to set up an appointment, class, or course service for Wix Bookings using the APIs. The flow lists the steps in order and which API to call at each step, from locations and staff through services, add-ons, and the booking form. Most steps apply to all service types. Where steps differ, the differences are called out.

Before you begin

Service setup flow

The following diagram shows the full service setup flow.

Service Setup Flow

The following steps describe the complete service setup from locations and staff configuration through service creation, add-ons, and pricing plans.

Step 1 | Create or retrieve business locations

Services support 3 location types:

  • Business locations are the business's venues.
  • Custom location is a single fixed address set by the business.
  • Customer location is a place the customer provides, for example their home. Applies to appointments only.

Create or retrieve business locations for the service when it's offered at those venues and for limiting which staff or resources are available at which venues. Locations may already exist, for example in the business dashboard, so retrieve existing first and create only what's missing.

Action:

  1. Call List Locations to retrieve existing business locations.
  2. Call Create Location for any that are missing.

Result: You have business locations to attach to services and to limit staff or resource availability. Save the id of each location.

For appointments, continue to step 2. For classes and courses, skip to step 9.

Learn more about service locations.

Step 2 | Create staff members

Create the staff members who deliver the service. Each staff member has an auto-created resource.

Action: Call Create Staff Member for each staff member you need.

Result: The staff members are created, each with an auto-created resource. Save id, resource.id, and resource.eventsSchedule.id from each response.

Learn more about the Staff Members and Resources APIs and when to use each.

Step 3 | Limit staff by location

Create Staff Member doesn't accept location options. To limit a staff member to specific venues, update the location options on their linked resource.

Action: For each staff member to limit, call Update Resource with that staff member's resource.id from step 2 and set locationOptions.specificLocationOptions.businessLocations.locationId to the relevant location IDs from step 1.

Result: Those staff members are available only at the specified venues.

Step 4 | Assign working hours schedules

Assign a dedicated working hours schedule to any staff member whose hours differ from the business schedule.

Action: For each such staff member, call Assign Working Hours Schedule, specifying the staff member’s id and the resource.eventsSchedule.id from step 2 as scheduleId.

Result: The staff member’s availability is now driven by their own schedule instead of the business schedule.

Learn more about business schedules and working hours.

Step 5 | Customize staff schedules

Add extra working hours or block time on staff schedules.

Action:

  1. To change an existing event: Call Update Event.
  2. To add working hours or block time: Call Create Event with event.scheduleId set to resource.eventsSchedule.id from step 2.
  3. To remove a block or working hours: Call Cancel Event.

For which event types to use for working hours and blocks, and how to retrieve event IDs with Query Events before updating or canceling, see the article about business schedules and working hours.

Result: Staff availability reflects the updated working hours and blocked periods.

Step 6 | Create resource types

Define the types of resources the service uses, such as rooms or equipment.

Action: Call Create Resource Type for each resource type you need.

Result: The resource types are created. Save the id of each resource type.

Step 7 | Create resources

Create the actual resources linked to the resource types from step 6, such as an individual room or piece of equipment.

Action: Call Create Resource, using the relevant resource type ID from step 6.

Result: The resources are created. Save the id and workingHoursSchedules.value.scheduleId of each resource.

Step 8 | Customize resource schedules

Block time for resources when they're unavailable. For example, block time for maintenance or when a resource is booked elsewhere. Resources follow the business working hours, so you can only block time for them, not add custom working hours.

Appointment service availability depends on the service's staff and resources. When a service has no required resource type, availability is driven by staff schedules and slots are bookable when at least 1 staff member is working, even outside default business hours. When a service has a required resource type, a slot is available only when both a staff member and a resource are available.

Action:

  1. To block time: Call Create Event with event.scheduleId set to workingHoursSchedules.value.scheduleId from step 7.
  2. To remove a block: Call Cancel Event.

For which event types to use for blocks and how to retrieve event IDs with Query Events before canceling, see the article about business schedules and working hours.

Result: Resource availability reflects the blocked periods.

Step 9 | Create booking policies

Define when customers can book and set cancellation and rescheduling rules. Each service has a single booking policy. Some policy fields apply only to specific service types:

  • For appointments: Set reschedulePolicy and cancellationPolicy to control whether and when customers can reschedule or cancel.
  • For classes: Set waitlistPolicy to allow customers to join a waiting list when a class is fully booked.
  • For courses: Set bookAfterStart to allow customers to sign up after the first session has begun.

Action: Call Create Booking Policy for each booking policy you need.

Result: The booking policies are created. Save the id of each policy.

Step 10 | Create service category

Categories control the order in which services appear on the site and in the dashboard. A service must be assigned to exactly 1 category to be visible on the live site. Wix Bookings creates a default category named Our Services on install, so retrieve existing categories first, then create a category if needed.

Action:

  1. Call Query Categories to retrieve existing categories, including the default.
  2. Call Update Category, for example to rename the default category.
  3. Call Create Category if you need an additional category.

Result: The categories are ready. Save the id of each category.

Step 11 | Create a custom booking form

Services use a booking form to collect customer information. To use the default booking form, skip this step and don't set service.form.id in step 12.

Action:

  1. Call Clone Form with formId set to 00000000-0000-0000-0000-000000000000. The cloned form inherits the wix.bookings.v2.bookings namespace from the source form. Save the returned form ID.
  2. Optionally call Update Form to add, remove, or require fields, and set fields.validation.required as needed.

Result: You now have a custom booking form.

Learn more about how Wix Bookings integrates with Wix Forms.

Step 12 | Create the service

Create the service and attach staff, resources, a booking policy, a category, locations, and the booking form.

Action: Call Create Service. Set type to APPOINTMENT, CLASS, or COURSE. See the method description for required fields and type-specific field guidance.

  • For all types: Pass the IDs from the shared steps:
    • Policy ID from step 9 in service.bookingPolicy.id.
    • When using a custom booking form, booking form ID from step 11 in service.form.id.
    • Category ID from step 10 in service.category.id. Services aren't automatically assigned to a category, so this is required for the service to be visible on the live site.
    • Location IDs from step 1 for business locations.
  • For appointments: Specify the IDs from the appointments-only steps:
    • Staff resource.id values from step 2 in service.staffMemberIds. At least 1 is required.
    • Resource type IDs from step 6 in service.serviceResources.resourceType.id.
  • Pricing plans: Set payment.options.pricingPlan to true to enable pricing plan payments for this service. Services with requireManualApproval set to true can't accept pricing plan payments.

Result: The service is created. Save id and schedule.id from the response.

Learn more about service types and their unique settings.

For classes and courses, continue to step 13. For appointments, skip to step 14.

Step 13 | Create sessions (classes and courses only)

For classes and courses, create the individual sessions on the service's calendar schedule. Appointments skip this step because their time slots are dynamically generated from staff availability.

Action: Call Create Event for each session, with event.scheduleId set to the service's schedule.id from step 12.

  • For classes: Create a recurring event defining the recurrence pattern.
  • For courses: Create a recurring event with a defined end date for the course series.

For sessions with irregular timing, create individual events instead. Learn more about recurring events.

Result: The sessions appear on the booking calendar. Customers can now discover and book them through the single-service booking flow.

Note: Steps 14 through 18 are optional. Complete only those that apply to your service.

Step 14 | Create service options and variants

Add options and variants to the service if needed. For appointments, you can offer variants based on staff member, session duration, or a custom parameter such as customer age group. For classes and courses, only custom parameter variants are supported.

Action: Call Create Service Options And Variants for the service if it needs options or variants. Specify the service ID from step 12.

Result: The service now exposes the configured options and variants to customers.

Step 15 | Create add-ons

Create add-ons that customers can select when booking. For appointments, add-ons can be duration-based to extend session time or quantity-based for purchasable extras such as equipment rental. For classes and courses, only quantity-based add-ons are supported.

Action: Call Create Add-On for each add-on you need.

Result: The add-ons are created. Save the id of each add-on.

Step 16 | Create add-on groups

Attach add-ons to the service by grouping them and linking the group to the service.

Action: Call Create Add-On Group for each add-on group you need, using add-on IDs from step 15 and the service ID from step 12.

Result: The service offers the configured add-ons during booking.

Step 17 | Create pricing plans

Create pricing plans for the service, such as memberships or packages.

Action: Call Create Plan for each pricing plan you need.

Result: The pricing plans are created. Save the id of each plan.

Learn more about pricing plans.

Step 18 | Enable pricing plans for services

Attach the pricing plans from step 17 to the services that should accept them.

Action: Call Enable Pricing Plans For Service with the service ID from step 12 and the plan IDs from step 17.

Result: Customers can use the enabled plans when booking the service.

Results

After completing this flow, the business offers a fully configured service that customers can discover and book using the standard booking flow.

See also

Did this help?