Update
Updates the door sensor with the specified id.
PATCH https://api.tedee.com/api/v1.33/my/doorsensor/{id}
URI Parameters
Name |
Type |
Description |
---|---|---|
id |
number |
id of the door sensor |
Body Parameters
Name |
Type |
Description |
---|---|---|
revision |
number |
current revision of door sensor configuration |
name |
string (optional) |
door sensor name |
timeZone |
datetime (optional) |
timezone of door sensor |
userSettings |
Door sensor user settings (optional) |
settings of current user for that device |
All parameters in this endpoint (except id and revision) are optional. This means that specifying a given parameter will update its value. If a given parameter is not specified, its value will not change.
Only the owner or admin can update name and time zone. Guest can only modify user settings.
Responses
Name |
Type |
Description |
---|---|---|
200 OK |
successful operation |
|
409 Conflict |
revision in request is different than in database |
Scopes
Name |
Description |
---|---|
Device.ReadWrite |
Grants user possibility to read and write data connected with devices |
Examples
Update name of the door sensor
Example shows how to update name of the door sensor with id = 123. Only owner or admin can update name of the device.
Sample Request
curl -X PATCH "https://api.tedee.com/api/v1.33/my/doorsensor/123" -H "accept: application/json" -H "Content-Type: application/json-patch+json" -H "Authorization: Bearer <<access token>>" -d "<<body>>"
Body:
{
"revision": 1,
"name": "New Name"
}
Sample response
HTTP status code: 200
{
"result": {
"id": 123,
"revision": 2,
"targetDeviceRevision": 1
}
"success": true,
"errorMessages": [],
"statusCode": 200
}