Lock Records Notify

This API should be developed yourself on your system, you can set the callback URL in the detail page of your application in Management Center.

If your locks are WiFi lock or they are connected to gateways , the cloud server will call this callback URL to notify your system when there are new lock records.

Lock records will be automatically uploaded to cloud by the gateway when they are generated, the cloud server will request the callback URL to notify your system in real time.

Notice: to receive lock records notify, please make sure the lock's administrator have get access token with your application's clientId.

1 Request example

POST, ContentType:application/x-www-form-urlencoded

Notice: please replace https://example.com/lockRecord/callback with your callback URL.

2 Request parameters

NameTypeDescription
notifyTypeInt1, mean lock records notify
lockIdIntLock ID
lockMacStringLock MAC
recordsStringConverting a list of records from a JsonArray to a String, please refer to the example above.

parameters in the records

ParameterTypeDescription
recordTypeIntRecord type, refer to: Record type of cloud for details
successIntIs success: 0-No, 1-Yes
usernameStringOperator account or username:
APP user account for records of unlocking by APP
password name for records of unlocking by passcodes
Card name for records of unlocking by cards
Fingerprint name for records of unlocking by fingerprints
keyboardPwdStringPasscode, card number or fingerprint number
lockDateLongOperate time on the lock (timestamp in millisecond).
electricQuantityIntLock battery
serverDateLongTime of record uploaded to the cloud server (timestamp in millisecond).
subRecordTypeLongWhen recordType=123, network abnormalities may occur due to: 1- Chip abnormal reset; 2- Data transmission failure; 3- Unexpected WiFi disconnection; 4- IP address loss or conflict; 5- Gateway unreachable (please check your router); 6- ISP network timeout; 7- Incorrect WiFi password; 8- Server disconnection; 9- Server connection refused; 10- Network heartbeat timeout; 11- Firewall reset.

3 Response and example

Response a raw string: "success" in the response body.