The booking API endpoint is a special endpoint that makes building integrations of booking platforms easier. The same integrations could also be built by using the API endpoints for users, permissions, lock activation links and invitations. The booking API endpoint is also used by the KleverKey Zapier app and that is the recommended way to use it, but it's also possible to use it directly.
The feature guest access is called lock activation links in the KleverKey API.
The booking API endpoint support the following integration scenarios:
- Grant/revoke permissions to/from a user (property "useLockActivationLinks" has to be false)
- If the user already has a KleverKey account and has already joined the organization, a permission will be granted directly
- If the user already has a KleverKey account, but hasn't joined the organization, an invitation to join the organization and get permissions will be sent
- If the user doesn't have a KleverKey account, an invitation to create a KleverKey account, to join the organization and get permissions will be sent
- Grant/revoke guest access to/from a user (property "useLockActivationLinks" has to be true)
- The user will receive an email or SMS with a link to access one or more locks
The property "operationType" is used to define if access should be granted or revoked:
- CreateOrUpdate = Grant
- Delete = Revoke
The property "permission" is used to the define the permission type and details:
- BookingPermissionAlways = PermissionType Always, TimeProfile = None
- BookingPermissionTimeSlot = PermissionType TimeProfile, TimeProfile with RepetitionType.None
- BookingPermissionWeeklyItems = PermissionType TimeProfile, TimeProfile with RepetitionType.Weekly
There are several properties with refeference IDs that are used to find the correct user and permission in subsequent requests to the booking API endpoint:
The property "userReferenceId" has to be unique user ID provided by the booking platform. If the booking platform doesn't provide a unqie user ID, the email address can be used. But we aware that if the email address is used as reference ID and it changes in the booking platform, the user will end up with a new KleverKey account after a new booking request. If the "userReferenceId" is a unique user ID the email address can be changed in the booking platform and the user can still use the same KleverKey account afterwards.
The property "referenceId" in the object "permission" has to be a unique ID of the booking provided by the booking platform. This reference ID is used to update permissions or lock activation links if the booking has changed (e.g. different room in a hotel) or to revoke permissions or lock activation links if a booking gets cancelled.
The booking API endpoint doesn't support access groups.
Please go to the KleverKey API documentation and open "/organizations/{organizationId}/bookings" to get more information about the endpoint.
Comments
0 comments
Please sign in to leave a comment.