Resources 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 bookable resource

You could create a resource that's bookable only at a specific location.

To create a bookable resource:

  1. Call Query Resource Types (SDK | REST) and save the ID of the relevant resource type.
  2. Call Query Locations (SDK | REST) to retrieve the ID of the business location.
  3. Call Create Resource (SDK | REST) to create the resource. Specify a name, the ID of the resource type and the ID of the business location.
  4. Call Query Services (SDK | REST) Confirm that the resource type is associated with relevant services by making sure that serviceResources.resourceType is set to the correct resource Type ID.
  5. Optional: For every service that doesn't specify the correct resourceType, call Update Service (SDK | REST). Specify the correct resource Type ID in serviceResources.resourceType.
Did this help?