API DOCUMENTATION

Table of Contents


Getting Started

Step 1: Setup the lock using KAS Cloud App

In order to start using the API, each lock and gateway needs to be set up and bound to an account created on the KAS Cloud App. To do this, download the app and set up the lock. Note you can only conduct API calls on locks which are bound to your account.

Once the locks(s) and gateway(s) are activated to your account. Now retrieve your API Key

Step 2: Retrieve your API Key

The API Key is used to authenticate your account with the locks and gateways that you own. It’s a way to identifying that you are in fact the owner of the device.

Example:

API Key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1YzI3Yjk3ZDRiMTJhMTAwMTc3MTVlZmYiLCJsYXRlc3RfdG9rZW5fZGF0ZSI6IjIwMTktMDEtMTNUMDY6NTI6MzUuMjg5WiIsImlhdCI6MTU0NzUwMTM5Mn0.v8cuLVqum_sWuM1OsSWiM3MUpRYRHuSMsBYucZIYVk0

Note: the above string is an invalid token. Just for demo purposes only.

Get your token by logging into your account here *note link will be updated soon*

Step 3: Start using the API

Now you the locks setup using the KAS Cloud App and you have your API Key, proceed below to get started.

Overview and Specifications

  • There are two types of API Commands available; BASIC and ADVANCED
    • BASIC is free for every user
    • ADVANCED requires a subscription
  • Use the HTTP Status code to check for call result. We do not provide success or fail acknowledgment parameters in the response body.
  • Unless specified please use: Content-type: Application/JSON

Basic API

Remote Unlock – API READY

Unlocks the door.

Lock Gateway required to conduct this command. This command will work if a Gateway is 1) activated, 2) connected to a network, 3) within the specified range of the target door lock.

Request

Request URLhttps://cloud.kas.com.au/api/lockCommand/remoteUnlock/:{factory_number}/:{API_KEY}factory_name is obtained from app interface. It either starts with ‘SS’ or ‘UL’. Replace API_KEY with your API Key retrieved from above.
Request MethodGET
HeaderContent-typeapplication/json
Bodynil

Example

GET https://cloud.kas.com.au/api/lockCommand/remoteUnlock/SS000510/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1YzI3Yjk3ZDRiMTJhMTAwMTc3MTVlZmYiLCJsYXRlc3RfdG9rZW5fZGF0ZSI6IjIwMTktMDEtMTNUMDY6NTI6MzUuMjg5WiIsImlhdCI6MTU0NzUwMTM5Mn0.v8cuLVqum_sWuM1OsSWiM3MUpRYRHuSMsBYucZIYVk

Response

HTTP Status CodeResponse Body (Plain Text)
200Door is unlocking…
400You are not the admin.
Invalid Token.
Lock is not found.
500Unknown Error

Notice:

Actually, the device has not been unlocked yet when finishing the API call. Developers should check the instruction status (Refer to ADVANCED) after the call. The remote unlock command has been completed successfully but we still need to deliver it to the gateway and lock network. Check the instruction status to checking if the unlocking action was successful or unsuccessful.

Create Auto-Generated Code – STILL IN DEVELOPMENT

Creates an 8 digit auto-generated code for door access

You do NOT need a gateway connected to conduct this command. Firstly, you need to set up the timestamp parameter using the app. This is done by the mobile app. If you forget to do this, there is a default timestamp and the API will return the result accordingly. Timestamps can only have 11 months of validity from initial lock activation. To continue using the API after 11months you need to visit the lock with the app and re-sync the timestamp. Then the API will start working again.

NOTE: In order to use this API, you need to access the lock at least once every 11 months to re-sync the timestamp.

Request

Request URLhttps://cloud.kas.com.au/api/lockCommand/pinCode/:{factory_number}factory_name is obtained from app interface. It either starts with ‘SS’ or ‘UL’.
Replace API_KEY with your API Key retrieved from above.
Request MethodPOST
HeaderContent-typeapplication/json
Bodymode: Int [0,1]
duration: Int [0,61]
startTime: Int [epoch]
apiKey: STRING
{
mode:
duration:
startTime:
apiKey:
}

Example

POST https://cloud.kas.com.au/api/lockCommand/pinCode/S000510

Response

HTTP Status CodeResponse Body (Plain Text)
20012345678
400You are not the admin.
Invalid Token.
Lock is not found.
500Unknown Error

Notice:

  • The lock must have the clock set (Use the mobile app to set)
  • The lock must have a current timestamp (Use the mobile app to set OR use default)
  • Auto-gen codes can only be created within an 11 month timeframe from last timestamp sync.

Advanced API

The Advanced API is currently under development. See the list of APIs coming soon to the Advanced subscription.

Note: Advanced API requires a paid subscription to use.

  • POST/DELETE Pin codes (100pcs)
  • POST/DELETE RFID Tags (100pcs)
  • POST/DELETE Mobile Keys (Unlimited)
  • GET Instruction Status (check to see if unlock command or free passage toggle was actually successful)
  • PUT Free Passage on or off