Devices
A device is a physical or virtual device that belongs to an organization and is owned by a specific integration instance. Devices contain entities (relays, lights, sensors, etc.).
A device has an optional zone_id on create, update, and responses. It must be a non-deleted zone in the device’s org; otherwise the request returns 422. Send null to remove the device from its zone.
The device zone is the default for its entities: entities with zone.mode: "inherit" take it as their effective zone. A device update that changes zone_id lists zone_id in details.changed, with the new zone in details.zone_id. The event also carries details.previous_zone_id and details.inheriting_entity_count (the number of entities that moved with the device). Those two fields describe the change and are not listed in details.changed. See Entity zone placement.
GET /devices?zone_id={id} lists devices whose own zone_id is that zone. A malformed zone_id returns 400.
Location
Section titled “Location”A device’s location comes from its own location binding (/devices/{id}/location-binding), then its integration, then its org. The device zone doesn’t affect location—a device in a zone with an address doesn’t inherit that address. Zones have their own location binding.
See Resource hierarchy for the data model. For API endpoints (list, create, update, delete), use the link above.