Resources Element
Overview
The Resources Element is a list element that will display all Resources within a Location. List elements are used for the purposes of a user selection. When a user selects a Resource, the clickResource event listener will trigger returning all of the Resource details.
The clickResource event listener can be used to mount the Resource Setup Element and display an edit form for internal purposes, or to capture the ID of the Resource selected to use when mounting the Availability Element in a booking flow.
Please see below for the optional parameters that are to be provided to this element, custom events included with the element, a code sample for the element, and screenshot before any additional style sheet is provided.
Custom Events
- getResources
The Get Resources custom event returns when the API request toGET /resources
has returned with a response. The response in its entirety is then accessible within the event object in a nested object named detail. - clickResource
The Click Resource custom event returns immediately with the details of the Resource selected. The ID of this Resource can then be stored and used in other elements in order to reference the user selection.
Syntax
Below is a basic syntax for loading the Resources Element. This example uses IDs from our public sandbox profile, to integrate this example into your own booking page copy the IDs from your Dashboard profile and replace with the IDs in the example below.
Parameters
locationId
String
id of business location, defaults to primary business location
resourceGroupId
integer($int32)
Filter by groupId
email
String
Filter by email address
name
String
Search by name, supports Partial name search
sortOrder
String
Specify sort order of response
offset
Integer($int32)
Starting row of page, default 0
limit
Integer($int32)
Page limit default 20, max 100
Options
search
Boolean
Displays a search bar for the user to search Locations
searchBy
String
Defines the query parameter that will by included in the Rest API GET
request when a Resource is searched. Default: name. See below for a list of all possible query parameters for the GET
Locations endpoint:
locationId
String
id of business location, defaults to primary business locationresourceGroupId
Integer($int32)
Filter by groupIdemail
String
Filter by email addressname
String
Search by name, supports Partial name searchsortOrder
String
Specify sort order of responseoffset
Integer($int32)
Starting row of page, default 0limit
Integer($int32)
Page limit default 20, max 100
Updated about 1 year ago