Add wireless keypad
https://euapi.ttlock.com/v3/wirelessKeypad/add
Request this API after successfully adding a wireless keypad to the lock via APP SDK, this API just upload the wireless keypad's info to the cloud server to facilitate follow-up management.
You can add multiple wireless key pads to a lock.
1 Request example
POST, ContentType:application/x-www-form-urlencoded
javascript
curl --location -g --request POST 'https://euapi.ttlock.com/v3/wirelessKeypad/add' \
--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \
--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \
--data-urlencode 'lockId=163377' \
--data-urlencode 'wirelessKeypadNumber=3661413478' \
--data-urlencode 'wirelessKeypadName=Wireless keypad for front door' \
--data-urlencode 'wirelessKeypadMac=33:33:33:33:33:33' \
--data-urlencode 'wirelessKeypadFeatureValue=8001' \
--data-urlencode 'date=1625025703000'2 Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| lockId | Int | Y | Lock ID, generated by Lock init |
| wirelessKeypadNumber | String | Y | Wireless keypad serial number |
| wirelessKeypadName | String | Y | Wireless keypad name |
| wirelessKeypadMac | String | Y | Wireless keypad MAC |
| wirelessKeypadFeatureValue | String | Y | Feature value of wireless keypad |
| electricQuantity | Int | N | Wireless keypad battery |
| date | Long | Y | Current time (timestamp in millisecond) |
3 Response and example
| Parameter | Type | Description |
|---|---|---|
| wirelessKeypadId | Int | Wireless keypad ID |
{
"wirelessKeypadId": 4242
}