https://api.sciener.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.
POST, ContentType:application/x-www-form-urlencoded
xxxxxxxxxx71curl --location -g --request POST 'https://api.sciener.com/v3/group/setDeviceGroup' \2--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \3--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \4--data-urlencode 'deviceType=0' \5--data-urlencode 'deviceId=3442324' \6--data-urlencode 'groupId=1342' \7--data-urlencode 'date=1625025703000'| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| deviceType | String | Y | Equipment type 0: Lock. 1: Electricity meter. 2: Water meter. |
| deviceId | String | Y | Device ID |
| groupId | String | Y | Group ID, returned by the "Get Group List" interface; passing 0 cancels the group. |
| date | Long | Y | Current time (timestamp in millisecond) |
| Parameter | Type | Description |
|---|---|---|
| errcode | Int | Error code |
| errmsg | String | Error message |
| description | String | Error description |
xxxxxxxxxx51{2"errcode": 0,3"errmsg": "none error message",4"description":"表示成功或是"5}