Open Platform
Skip to content

Set a Group of a Device ​

https://euapi.ttlock.com/v3/group/setDeviceGroup

For locks, the lock administrator calls this interface to set the lock's group, and ordinary ekey users call this interface to set the key's group.

For water and electricity meters, only the water and electricity meter administrator calls this interface to set the meter's group.

1 Request example ​

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

javascript
curl --location -g --request POST 'https://euapi.ttlock.com/v3/group/setDeviceGroup' \
--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \
--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \
--data-urlencode 'deviceType=0' \
--data-urlencode 'deviceId=3442324' \
--data-urlencode 'groupId=1342' \
--data-urlencode 'date=1625025703000'

2 Request parameters ​

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
deviceTypeStringYEquipment type 0: Lock. 1: Electricity meter. 2: Water meter.
deviceIdStringYDevice ID
groupIdStringYGroup ID, returned by the "Get Group List" interface; passing 0 cancels the group.
dateLongYCurrent time (timestamp in millisecond)

3 Response and example ​

ParameterTypeDescription
errcodeIntError code
errmsgStringError message
descriptionStringError description
{
    "errcode": 0, 
    "errmsg": "none error message",
    "description":"表示成功或是"
}
CopyRight © 2012-2026 TTLock.All Rights Reserved