{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/kontaktio/main/json-schema/kontaktio-update-device-virtual-attributes-request-schema.json", "title": "Update Device Virtual Attributes", "description": "Device Update Virtual Attributes", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/kontaktio-device-api-openapi.yml#/components/schemas/UpdateDeviceVirtualAttributesRequest", "x-stoplight": { "id": "i59cs9vye4tsv" }, "allOf": [ { "type": "object", "description": "Device selector.", "properties": { "uniqueId": { "description": "List of Unique IDs of Devices that should be updated.", "type": "array", "items": { "type": "string" } }, "deviceType": { "$ref": "#/$defs/DeviceType" } }, "required": [ "uniqueId", "deviceType" ] }, { "$ref": "#/$defs/DeviceEditableVirtualAttributes" }, { "type": "object", "description": "Other updatable virtual properties.", "properties": { "exclusions": { "$ref": "#/$defs/OccupancyExclusionZones" }, "inclusions": { "$ref": "#/$defs/OccupancyInclusionZones" }, "deployment.status": { "$ref": "#/$defs/DeploymentStatus" }, "deployment.deploymentDate": { "type": "string", "format": "date-time", "description": "Timestamp of when the device was deployed (ISO 8601 format). Defaults to the current time if not provided when updating deployment info." }, "deployment.installerEmail": { "type": "string", "description": "Email address of the person who deployed the device." }, "deployment.installerName": { "type": "string", "description": "First and last name of the person who deployed the device." }, "desiredConfig": { "type": "object", "x-sl-internally-excluded": true, "x-sl-error-message": "You do not have permission to view this reference" }, "protocol": { "type": "string", "description": "Selects the communication protocol used by the gateway to exchange data with the\nKontakt.io platform. This is the recommended way to configure protocol-related\nsettings on a gateway; the platform automatically derives the corresponding\n`desiredConfig.apiHost`, `desiredConfig.dataHost`, and `desiredConfig.mqttAuth`\nvalues. Applicable to gateway devices only.\n", "enum": [ "MQTT", "HTTP" ] } } } ], "$defs": { "DeploymentStatus": { "type": "string", "description": "Current deployment status of this device - e.g. whether is it deployed or not.\n\n`END_OF_LIFE` means the device is not going to be used anymore. Can occur for many reasons: battery dead, unserviceable device, contract with owning company was discontinued, etc.", "enum": [ "TO_BE_DEPLOYED", "DEPLOYED", "END_OF_LIFE" ] }, "DeviceEditableVirtualAttributes": { "type": "object", "description": "Set of read-write editable virtual attributes.", "properties": { "alias": { "type": [ "string", "null" ], "description": "Alternative description for the Device, stored only on Kontakt.io backend - it's not possible to read this value via Bluetooth directly from the Device itself. In Device Management App represented as a Notes." }, "tags": { "description": "Comma-separated list of maximum 20 user-defined labels (no longer than 32 characters).", "type": "array", "maxItems": 20, "uniqueItems": true, "items": { "type": "string", "maxLength": 32 } }, "metadata": { "type": [ "object", "null" ], "description": "Object containing arbitrary key-value pairs that can be defined by a Device's Manager.\n\nDanger: may be overwritten by other API clients." }, "lat": { "type": [ "number", "null" ], "format": "float", "deprecated": true }, "lng": { "type": [ "number", "null" ], "format": "float", "deprecated": true }, "deployedlat": { "type": [ "number", "null" ], "format": "float", "deprecated": true }, "deployedlng": { "type": [ "number", "null" ], "format": "float", "deprecated": true } } }, "DeviceType": { "type": "string", "enum": [ "BEACON", "GATEWAY", "EXTERNAL" ], "description": "General type of device." }, "OccupancyExclusionZones": { "description": "Exclusion zones. Areas excluded from occupancy counting like windows, heaters, etc. Applicable only in static room occupancy. **It's a virtual attribute.**", "type": "array", "items": { "$ref": "#/$defs/Polygon" } }, "OccupancyInclusionZones": { "description": "Inclusion zones. Areas included in occupancy counting. Applicable only in seat occupancy. Zone ids must match seat ids from Smart Location system. **It's a virtual attribute.**", "type": "array", "items": { "$ref": "#/$defs/Polygon" } }, "Polygon": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "polygon": { "type": "array", "items": { "type": "object", "properties": { "x": { "type": "integer" }, "y": { "type": "integer" } } } } } } } }