Get Lock

Get a Lock on your account by its Device ID

Deprecated: Use Get Device instead.

Get Locks for Device

GET https://connect.getseam.com/locks/get

Query Parameters

Name
Type
Description

device_id*

String

ID of Device to be Locked

name

String

Name of Device

Headers

Name
Type
Description

Authorization*

String

Bearer <API_KEY>

{
  "lock": {
    "device_id": "a83690b2-2b70-409a-9a94-426699b84c97",
    "device_type": "schlage_lock",
    "capabilities_supported": [],
    "properties": {
      "locked": false,
      "online": true,
      "battery_level": 0.48,
      "schlage_metadata": {
        "device_id": "device-3",
        "device_name": "GARAGE"
      },
      "name": "Front Door"
    },
    "location": null,
    "connected_account_id": "b0be0837-29c2-4cb1-8560-42dfd07fb877",
    "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d",
    "created_at": "2022-08-24T11:14:37.116Z",
    "errors": []
  },
  "device": {
    "device_id": "a83690b2-2b70-409a-9a94-426699b84c97",
    "device_type": "schlage_lock",
    "capabilities_supported": [],
    "properties": {
      "locked": false,
      "online": true,
      "battery_level": 0.48,
      "schlage_metadata": {
        "device_id": "device-3",
        "device_name": "GARAGE"
      },
      "name": "Front Door"
    },
    "location": null,
    "connected_account_id": "b0be0837-29c2-4cb1-8560-42dfd07fb877",
    "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d",
    "created_at": "2022-08-24T11:14:37.116Z",
    "errors": []
  },
  "ok": true
}

Code Example

from seam import Seam

seam = Seam()
device_id = "123e4567-e89b-12d3-a456-426614174000"
device = seam.locks.get(device_id)
# device = seam.devices.get(None, 'GARAGE')

print(device)
# Device(
#   device_id='a83690b2-2b70-409a-9a94-426699b84c97',
#   device_type='schlage_lock',
#   location=None,
#   properties={
#     'locked': False,
#     'online': True,
#     'battery_level': 0.48,
#     'schlage_metadata': {
#       'device_id': 'device-3',
#       'device_name': 'GARAGE'
#       },
#     'name': 'GARAGE'
#     },
#   capabilities_supported=[],
#   errors=[]
#   )

Parameters

device_id

type: string

Device ID

Response

This section shows the JSON response returned by the API. Since each language encapsulates this response inside objects specific to that language and/or implementation, the actual type in your language might differ from what’s written here.

JSON format

{
  "lock": {
    "device_id": "a83690b2-2b70-409a-9a94-426699b84c97",
    "device_type": "schlage_lock",
    "capabilities_supported": [],
    "properties": {
      "locked": false,
      "online": true,
      "battery_level": 0.48,
      "schlage_metadata": {
        "device_id": "device-3",
        "device_name": "GARAGE"
      },
      "name": "Front Door"
    },
    "location": null,
    "connected_account_id": "b0be0837-29c2-4cb1-8560-42dfd07fb877",
    "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d",
    "created_at": "2022-08-24T11:14:37.116Z",
    "errors": []
  },
  "device": {
    "device_id": "a83690b2-2b70-409a-9a94-426699b84c97",
    "device_type": "schlage_lock",
    "capabilities_supported": [],
    "properties": {
      "locked": false,
      "online": true,
      "battery_level": 0.48,
      "schlage_metadata": {
        "device_id": "device-3",
        "device_name": "GARAGE"
      },
      "name": "Front Door"
    },
    "location": null,
    "connected_account_id": "b0be0837-29c2-4cb1-8560-42dfd07fb877",
    "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d",
    "created_at": "2022-08-24T11:14:37.116Z",
    "errors": []
  },
  "ok": true
}

Last updated

Logo

© Seam Labs, Inc. All rights reserved.