The Duplicate Locks API

Duplicating Locks is useful in mainly three scenarios:

  1. When several Lock Holders managed by the same Integrator use the same Lock, such as a garage door.
  2. When a company, such as a locksmith, manages Locks for several Lock Holders. This is typical for Salto installations.
  3. When a Lock Holder wants to temporarily grant ownership of a Lock to a private individual, such as an apartment tenant.

This guide will cover these scenarios.

Duplicating Locks from a Lock Holder managed by the same Integrator

This requires no additional setup, and allows several Lock Holders to manage separate sets of Keys and Roles for the same physical Lock.

This scenario is useful when several Lock Holders share a common Lock, such as a garage door, a backyard door, or main entrance in a co-working space.

This is the scenario:

  • The integrator manages Lock Holder 1 and Lock Holder 2.
  • Lock Holder 2 has a Vendor Connection and Lock 1

To duplicate Lock 1 with LockHolder1 as owner follow these steps:

  1. Get the list of managed Lock Holders and store LockHolder 1's ID, as this will be the owner of the new Lock
  2. Get an access token with the lockHolder.admin scope for LockHolder 2 (lockHolder.admin:[**LockHolder 2**'s ID])
  3. Get the list of Lock Holder 2's Locks, and save Lock 1's ID, as this is the Lock we want to duplicate.
  4. Call the Duplicate a Lock endpoint with Lock 1's ID in path, and LockHolder 1's ID in the duplicatedLockHolderId field.
886

Diagram of an integrator managing two Lock Holders (Lock Holder 1 and Lock Holder 2) one of which (Lock Holder 1) is associated with a Vendor Connection that provides the garage door Lock (Lock 1). Duplicate Lock 1 allows for Lock Holder 1 to manage Lock 1.

Duplicate Locks from a Lock Holder managed by another Integrator or none at all

This is useful when a smaller company, such as a locksmith, manages Locks for several Lock Holders.

This is the scenario:

  1. The Integrator manages LockHolder 1
  2. LockHolder 2, the locksmith, has a vendor connection and lots of Locks. This is typical for a Salto server.
  3. The Integrator has a special permission, granted by Unloc, to duplicate Locks owned by LockHolder 2

To duplicate one of the installed Locks with Lock Holder 1 as owner follow these steps:

  1. Get the list of managed Lock Holders and store Lock Holder 1's ID, as this will be the owner of the new Lock
  2. Get an access token with the lockHolder.duplicateLocks scope for LockHolder 2 (lockHolder.duplicateLocks:[**LockHolder 2**'s ID]). This allows getting and duplicating LockHolder 2's Locks, but nothing more.
  3. Get the list of Lock Holder 2's Locks, and save the ID of the Lock to be duplicated.
  4. Call the Duplicate a Lock endpoint with the Lock's ID in path, and LockHolder 1's ID in the duplicatedLockHolderId field.
956

Duplicate Locks managed by a Lock Holder to be owned by a User

It is also possible to duplicate a Lock to be owned by a User, such as for a private door.

The advantage of doing this is that the manager of LockHolder 1 doesn't have to (and is not able to) manage Keys and Roles for the Lock.

The scenario is the same as the one described above.

To duplicate one of the installed locks with User as owner follow these steps:

  1. Get an access token with the lockHolder.duplicateLocks scope for LockHolder 2 (lockHolder.duplicateLocks:[**LockHolder 2**'s ID]). This allows getting and duplicating LockHolder 2's Locks, but nothing more.
  2. Get the list of Lock Holder 2's Locks, and save the ID of the Lock to be duplicated.
  3. Call the duplicate Lock endpoint with the Lock's ID in path, and Users's mobile phone number in the duplicateUserId field.
1216

Deleting a duplicated lock

Duplicated Locks can be deleted by using the Delete a duplicate Lock endpoint.