ym88659208ym87991671
Update user's devices (put devices) | Documentation for developers

Update user's devices (put devices)

Last updated on May 25, 2023

The vendor posts for Sber Smart Home an up-to-date list of a user's devices.

Sample case:

  1. A user in the vendor application changes a parameter of one or more devices, such as name, firmware version or some other parameter.
  2. The vendor sends to Sber Smart Home a list of devices that have changed.
  3. Sber Smart Home updates devices in Salute mobile app, SberPortal, SberBox and other devices supported with Salute assistants.

Query format

The vendor sends a notification to Sber Smart Home endpoint: https://partners.iot.sberdevices.ru/. Please note that in order to access the Sber cloud, Russian certificates must be installed on vendor's server.

For the headers, see Query headers.

PUT /v1/devices

Query body:

FieldTypeMandatory?Description
deviceslist<object>✔︎Device list (see User device (device))
{
"devices": [
{
"id": string,
"parent_id": string,
"name": string,
"default_name": string,
"nicknames": [
string,
string
// ...
],
"home": string,
"room": string,
"groups": [
string,
string
// ...
],
"model_id": string,
"hw_version": string,
"sw_version": string,
"partner_meta": {
"key": value,
"key": value,
// ...
},
},
{
// ...
}
]
}

Response format

Sber Smart Home sends a response to the vendor's endpoint. For the headers, see Query headers.

Success response:

 HTTP/1.1 200 OK

If an error occurs, Sber Smart Home may return:

  • A list of errors, containing error objects. Each object points to specific devices whose status could not be updated.
  • A common error. that describes the problem as a whole and is returned when the problem cannot be juxtaposed with specific devices.

If a vendor notified of several devices, and Sber Smart Home has managed to update some of them, but an error occurs when updating the rest, Sber Smart Home will send an error response containing a list of devices not updated.

Device-specific error:

{
"errors": [
{
"id": string,
"code": integer,
"message": string
}
]
}

Common error:

{
"code": integer,
"message": string,
"details": list<string>
}

Sample query and response

The vendor notifies Sber Smart Home of the user's smart lamp update.

Query:

curl -i -X PUT /v1/devices HTTP/1.1 \
-H Host: example.com \
-H Content-Type: application/json \
-H Authorization: Bearer qwerty-1234-... \
-H X-Request-Id: abcd-0000-ifgh-...

```json
{
"devices": [
{
"id": "ABCD_003",
"name": "My lamp",
"default_name": "Smart lamp",
"nicknames": [
"LED lamp",
"Smart lamp"
],
"home": "My home",
"room": "Living room",
"groups": [
"Overhead light",
"Alcove"
],
"model_id": "QWERTY123",
"hw_version": "3.2",
"sw_version": "5.7",
"partner_meta": {
"internal-id": 1234,
"specificity": "microchip 2A"
},
}
]
}

Success response:

HTTP/1.1 200 OK

Error response:

{
"errors": [
{
"id": "ABCD_003",
"code": 500,
"message": "System error"
}
]
}
Sber process cookies only to personalize services according to Cookies Usage Policy. You can prevent the processing of cookies in your browser settings.