Adjust lock time
https://euapi.ttlock.com/v3/lock/updateDate
If the lock is WiFi lock or it's connected to a gateway, you can request this API to adjust the lock time.
There is a time in the lock, when unlocking via passcode or ekey, the lock will check if it is valid base on the lock time. If the lock time is incorrect, a valid passcode may failed to unlock the lock. You can request cloud API: Get lock time to query the lock time, and you can request this API to adjust lock time if it's incorrect.
1 Request example
POST, ContentType:application/x-www-form-urlencoded
javascript
curl --location -g --request POST 'https://euapi.ttlock.com/v3/lock/updateDate' \
--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \
--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \
--data-urlencode 'lockId=163377' \
--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 |
| date | Long | Y | Current time (timestamp in millisecond) |
3 Response and example
| Parameter | Type | Description |
|---|---|---|
| date | Long | The lock time after adjusting (timestamp in millisecond) |
{
"date": 1625025703000
}