Work with Wix Forms to Create Services and Bookings

Customers are required to complete the booking form when signing up for a service. By default, all services use a standard booking form. You can create custom booking forms by adding fields, removing fields, or marking fields as required.

This article provides sample workflows for setting up a service with a custom booking form, creating a booking, and retrieving submitted booking form data.

As of January 31, 2025, Wix Bookings integrates with the Wix Forms APIs to provide form functionality in a standardized way across all Wix solutions.

Changes to the booking object

The integration of Wix Forms APIs into Wix Bookings has introduced several changes to the booking object.

  • *New fields:
    • formSubmissionId: Unique ID of the form submission associated with the booking.
    • formId: Unique ID of the booking form belonging to the relevant service.
  • Deprecated field: The additionalFields array that stores data from the filled-out booking form is deprecated and will be removed on September 30, 2025. When creating a booking, specify the submitted booking form data in formSubmission instead of booking.additionalFields. Contact details from fields belonging to the default booking form are saved in the booking's contactDetails, while all other values aren't saved on the booking object. See the default booking form for more details.

Customizable booking forms

Due to the integration with Wix Forms APIs, you can create booking forms with a wider variety of field types, including text, dropdowns, file uploads, signatures, dates, and numbers. This functionality comes built-in with Wix Forms.

Essential APIs to manage booking forms

Use the following APIs to manage booking forms and submitted data.

  • Forms API: Use the Forms API to manage which fields are included in a custom booking form, including which ones customers must fill out while booking.
  • Services API: Use the Services API to manage which booking form is connected to a service.
  • Form Submissions API: Use the Form Submissions API to retrieve and manage data submitted by customers during the booking process. This includes submission-related information such as submission status and whether the merchant has seen the submission.
  • Bookings API: Use the Bookings API to retrieve and manage the customer's contactDetails submitted in default booking form fields.

Default booking form fields

When creating a custom booking form you need to clone the default booking form, which includes the following fields.

Field nameCustomer input requiredNotes
firstNameRequired
lastNameRequiredCan be removed in custom booking forms.
emailRequiredWix Bookings checks the format of the provided email address, but not whether it actually exists.
phoneRequiredWix Bookings checks the format of the provided phone number, but not whether it actually exists.
address.countryConditionally requiredIn ISO 3166-2 code format.
address.subdivisionConditionally required
address.cityConditionally required
address.postalCodeConditionally required
address.streetNameConditionally required
address.streetNumberConditionally required
address.addressLineNot requiredCan be removed in custom booking forms.
address.addressLine2Not requiredCan be removed in custom booking forms.

Conditionally required fields

Customers are required to provide an address when booking a service at a location that isn't associated with the business, such as their home or office. Depending on the specified country, subdivision and/or postal code may not be required.

You can remove the entire address object in custom booking forms if the service doesn't support CUSTOMER locations. Additionally, you can always remove address.addressLine and address.addressLine2 in custom booking forms, even if the service supports booking at a CUSTOMER location.

Sample flows

You could create a new service with a custom booking form, create a new booking with a filled-out booking form, or retrieve a booking's submitted booking form.

Create a new service with a custom booking form

You can follow these steps to create a new service and its associated custom booking form.

To set up a booking form:

  1. Call Wix Forms' Clone Form. Make sure to specify the Bookings namespace and the template ID of the default booking form like this.

    Copy

    Save the ID of the returned form.

  2. Call Wix Forms' Update Form to add additional, custom fields to the form, or to remove optional default fields. Make sure to set fields.validation.required appropriately.

  3. Call Wix Bookings' Create Service. Specify the form ID in service.form.id.

Create a booking with a filled-out booking form

You can follow these steps to create a new booking and submit its booking form on behalf of the customer.

To create a booking:

  1. Call Wix Bookings' Query Services and display the services to the customer.

  2. For the selected service, save form.formId.

  3. Call Wix Forms' Get Form Summary. Make sure to specify the form ID.

  4. Construct a valid JSON object based on the returned data. Make sure to use the exact values from formSummary.fields.target as keys in the JSON object. For example:

    Copy
  5. Call Wix Bookings' Create Booking. Specify the constructed JSON object in formSubmission.

  6. Listen to Wix Bookings' Booking Confirmed and save booking.formSubmissionId.

Retrieve a submitted booking form

You can follow these steps to retrieve the submitted booking form for a specific booking.

To retrieve a submitted booking form:

  1. Optional: If your use case requires more filters than supported in Wix Forms' Query Submissions by Namespace, call Wix Bookings' Query Extended Booking with the relevant query filter. For example, you could filter by booking id or status. We strongly recommend including startDate in any filter you specify to ensure optimal API performance.
  2. Call Wix Forms' Query Submissions by Namespace. Always filter namespace by wix.bookings.v2.bookings while setting additional query filters as required. For example, also filter by the list of form IDs retrieved from Query Extended Bookings.

See also

Learn more about how business owners can customize bookings forms.

Did this help?