Sections and articles

API for integrating electronic locks into Shelter CLOUD

Description

Shelter CLOUD provides an API for connecting third-party electronic locks. For integration, it is necessary to develop an agent program that is installed on a computer that is directly connected to the encoder (or has network access to it). This program performs the following functions:

  • managing connection settings;

  • sending requests to Shelter CLOUD about the availability of commands for the encoder;

  • transmitting the received commands to the encoder and processing the responses.

Setting up the connection

The program should provide flexible settings for the following parameters:

  • The URL of the Shelter CLOUD API service (in case it changes).

  • The network address of the encoder.

  • Access token for authentication in the API.

Default settings:

Getting commands

To receive commands, the program must call the GetLocksCommands API method at 10-second intervals. If there is a pending command for the encoder, the method will return its data.

List of command options:

 The command code Description
  WriteCard = 1   Write down the card (key).
  ReadCard = 3   Read the map. The program processes the card data independently.
 ExpireCard = 4       Cancel the card (for example, when a guest checks out).
 Exception= -1  The error is on the server side. The service is temporarily unavailable.

Processing the WriteCard command

For the WriteCard write command, the following parameters are passed along with the command:

from   date and time of arrival
until   date and time of departure
room   room number
copies  number of cards to record
user  the ID of the user who issued the card
guests  number of guests per room
mainGuestInfo  Full name of the main guest

Command confirmation mechanism

Each command is considered processed after receiving it once from the GetLocksCommands method. The system does not send the same command repeatedly.

Important: If the program could not execute the command (for example, due to a lack of communication with the encoder), you must re-initiate sending it manually through the interface of the Shelter CLOUD web office. There is no automatic replay of the execution request.