Upload valid passcode from lock
https://cnapi.sciener.com/v3/keyboardPwd/uploadValidCodeFromLock
After use SDK method to Get all valid passcodes in lock, You can upload those data to the cloud via this API
Upload valid passwords read by the SDK, if they do not exist in the cloud, they will be recorded in the cloud; if passwords not read by the SDK exist in the cloud, they will be recorded as invalidated passwords
1 Request example
POST, ContentType:application/x-www-form-urlencodedjavascript
curl --location -g --request POST 'https://cnapi.sciener.com/v3/keyboardPwd/uploadValidCodeFromLock' \
--data-urlencode 'clientId=fd2ff35ee3xxxxxx' \
--data-urlencode 'accessToken=780f7671b6e6bxxxxxxx' \
--data-urlencode 'lockId=24451' \
--data-urlencode 'keyboardPwdList=[{"cycleType":0,"endDate":0,"keyboardPwd":"147362","keyboardPwdType":2,"newKeyboardPwd":"147369","startDate":946656000730},{"cycleType":0,"endDate":0,"keyboardPwd":"771108","keyboardPwdType":2,"newKeyboardPwd":"771108","startDate":946656000821},{"cycleType":0,"endDate":0,"keyboardPwd":"458698","keyboardPwdType":2,"newKeyboardPwd":"458698","startDate":946656000913}]' \
--data-urlencode 'date=1626945087000'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 |
| keyboardPwdList | String | Y | From APP SDK method Get all valid passcodes in lock |
| date | Long | Y | Current time (timestamp in millisecond) |
3 Response and example
| Parameter | Type | Description |
|---|---|---|
| errcode | Int | Error code |
| errmsg | String | Error message |
{
"errcode": 0,
"errmsg": "none error message"}