You can grant users access to locks by adding them to an access group. An access group is how you define which users should have access to which locks for a given timeframe. You do this by adding a list of users and a list of locks to an access group, as well as determining a time schedule for which that access should be valid.
An access group is a definition of what users can enter which doors when. You first have to create the access group after which you can add doors/users/time schedules.
A. Create a POST request to {{url}}/v1.1/sites/{siteid}/accessgroups
. In the body of the request you have to specify a customer_reference
ie. a human readable name for the access group.
On success the endpoint will return the ID of the access group you have created.
A.Create a POST request to {{url}}/v1.1/sites/{siteid}/accessgroups/{accessgroupid}/locks
. In the body of the request provide the lock ID of the lock you want to add.
A.Create a POST request to {{url}}/v1.1/sites/{siteid}/accessgroups/{accessgroupid}/time_schedules
. In the body of the request provide the details of the time schedule you want to add. Some parameters are optional, refer to the Swagger documentation for more details on how to build a time schedule.
A. Create a POST request to {{url}}/v1.1/sites/{siteid}/accessgroups/{accessgroupid}/users
. In the body of the request provide the ID of the user you want to add.
All components of the access group are now defined. Check that the user you added indeed has access to the lock using his/her tag.