LockCommand
Represents a command sent to a Lock on the UniKey CORE Platform which has been connected to bluetooth Gateway such as a Kevo Plus
The LockCommand object
Attributes
Name | Type | Description |
---|---|---|
id |
UUID | The ID of the LockCommand |
lock_id |
UUID | The ID of the Lock this command is for |
type |
String | The type of LockCommand |
status |
String | The status of the LockCommand |
created_at |
DateTime | When the LockCommand was created |
Lock Command Types
Name | Description |
---|---|
lock |
This command should attempt to lock the Lock |
unlock |
This command should attempt to unlock the Lock |
Lock Command Status Values
Status | Description |
---|---|
created |
The command request has been created |
processing |
The command is being processed |
completed |
The command has been confirmed as complete |
failed |
The command failed to complete (This could be a failure in delivery of the command or a bolt jam) |
Available APIs
POST
/locks/{lock_id}/commands
This call will issue a command to begin a remote lock or unlock using Kevo Plus. This API is only available for users that own a Kevo Plus. An HTTP/1.1 400
will be returned if no Kevo Plus is available.
Request Properties
Name | Type | Description |
---|---|---|
type |
String | Required The type of command you’d like to initiate |
Response Properties
Returns a LockCommand object
Example Request
POST /locks/cc26d357-816d-4ecb-ac65-3aa776d9bf67/commands
{
"type": "lock"
}
Example Response
HTTP/1.1 201 Created
{
"id": "fb75325a-2ce3-4563-83dc-ebd2f3b9ff8a",
"lock_id": "cc26d357-816d-4ecb-ac65-3aa776d9bf67",
"type": "lock",
"status": "processing",
"created_at": "2016-05-11T18:25:43.511Z"
}
GET
/locks/{lock_id}/commands/{command_id}
Returns the details of a command, including current status
Request Properties
Name | Type | Description |
---|---|---|
type |
String | Required The type of command you’d like to initiate |
Response Properties
Returns a LockCommand object
Example Request
GET /locks/cc26d357-816d-4ecb-ac65-3aa776d9bf67/commands/fb75325a-2ce3-4563-83dc-ebd2f3b9ff8a
Example Response
HTTP/1.1 200 OK
{
"id": "fb75325a-2ce3-4563-83dc-ebd2f3b9ff8a",
"lock_id": "cc26d357-816d-4ecb-ac65-3aa776d9bf67",
"type": "lock",
"status": "completed",
"created_at": "2016-05-11T18:25:43.511Z"
}