Resource Types API: Sample Use Cases and Flows

This article presents a possible use case that you could support, along with a sample flow to implement it. This examples can serve as a helpful starting point as you plan your implementation.

Create a resource type with bookable resources

You can create a custom resource type with bookable resources, allowing Wix Bookings to automatically check availability and avoid double bookings.

To create a custom resource type with bookable resources:

  1. Call Create Resource Type (SDK | REST), specifying a descriptive name. Save the resource type ID.
  2. Call Create Resource (SDK | REST), or Bulk Create Resources (SDK | REST) to create individual resources. Make sure to include the ID of the created resource type to make each resource bookable.
  3. Call Query Services (SDK | REST). Identify the IDs of the services that require a resource of this type to be booked.
  4. For each identified service, call Update Service (SDK | REST). Specify the service ID and the ID of the created resource type.
Did this help?