NAV Navbar
json

Introduction

This document contains all necessary resources to consume the RemoteLock RESTful API, meaning that a client application is able authenticate a user, fetch, create, update, delete and perform other actions via HTTP with objects in JSON representation.

Production environment

Changelog

Getting Started

Introduction

This tutorial is a step-by-step configuration of an application that integrates with the RemoteLock API to manage access to rental properties or rooms. In the next steps we will go over:

Throughout this tutorial you will see links to different parts of the RemoteLock API documentation. This documentation is more detailed and can be used for troubleshooting or if you have a different use case from what's presented here.

What you're going to need

Creating an OAuth Application

Create Account

Before you can create an OAuth Application, first create an account on the RemoteLock Connect Portal. Enter your user information on Step 1, then select the Basic Plan option on Step 2. When presented with payment information, you can select “Skip” to complete account creation.

Skip button to the left of Submit & Finish

Setup an OAuth Application

Now that an account is created, send an e-mail to sales@remotelock.com requesting API access for your account. Once API access is enabled, you can go to the developer portal, click on "New OAuth Application" and fill the form:

After submitting the form, you will be redirected to a page with your generated Client ID and Client Secret. These are the credentials for your integration, so make sure you take note and keep them in a secure place. For security reasons, this is the only time the client secret is visible.

Authenticating a User

Generating an Authorization Code

The RemoteLock API supports two of the OAuth 2.0 grant types: Authorization Code and Client Credentials. On this example, since you want your users to authorize your application to manage their locks, we will use the Authorization Code Grant. You can check the Authentication Section of the documentation for more details on the two types of grants.

With your OAuth application created, your users can be redirected to the authorization URL to allow your application to access their resources. The URL must be formatted as below:

https://connect.remotelock.com/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code

In the above example, you will be replacing CLIENT_ID and REDIRECT_URI with values from the OAuth Application you just created. If you view your application on the developer portal, you will see an "Authorize" button next to the redirect URI that takes you to a generated URL using the above format. If you have created a separate account to represent a customer, you should go to that URL using an incognito / private mode, so you can sign in using that account and not your current one.

Once you go to this URL, you will either see a sign in page or, if you're already logged in, a list of accounts. Unless you have access to shared accounts, this list should only have one pre-selected option, so all you need to do is click "Authorize". If our Redirect URI was set to a URL on an application, that is where we would've been taken now, but since we've used urn:ietf:wg:oauth:2.0:oob. What you should see is a JSON result like so:

{"code":"a1b2...d4e5","state":""}

The value in the code attribute is what we call your authorization code, we'll use it to generate a token to access a user's data.

Generating a Token

To generate a token, we must send the authorization code in a POST request like the following:

curl -X POST \
  -d code=$AUTHORIZATION_CODE \
  -d client_id=$CLIENT_ID \
  -d client_secret=$CLIENT_SECRET \
  -d redirect_uri=urn:ietf:wg:oauth:2.0:oob \
  -d grant_type=authorization_code \
  'https://connect.remotelock.com/oauth/token'

Replacing $AUTHORIZATION_CODE, $CLIENT_ID and $CLIENT_SECRET with their respective values. The response should look like the following:

{
  "access_token": "acc3...063n",
  "token_type": "bearer",
  "expires_in": 7199,
  "refresh_token": "13f1...ab14",
  "created_at": 1531403248
}

The value in the access_token attribute of that response is what we'll use as authorization in the API requests to manipulate that user's resources in the next steps.

Retrieving the List of Locks

The next step is to retrieve the list of locks in the account so that your user can assign them to Rooms/Units in your application. To fetch that list, use the following request:

curl -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Accept: application/vnd.lockstate+json; version=1' \
  'https://api.remotelock.com/devices'

Replacing $ACCESS_TOKEN in the authorization header with the value we generated in the previous step. Notice how an additional header is required to specify the API version we're using. See the API Versioning section of the documentation for more details. The response should look like this:

{
  "data": [
    {
      "type": "lock",
      "attributes": {
        "name": "My Lock",
        "heartbeat_interval": 1200,
        // ...
        "model_id": "1d99dded-91ce-47ed-90e4-84389e783a92",
        "location_id": "38e651b3-9944-4539-be3b-13203b61d638"
      },
      "id": "053994ef-ceed-455a-a5f7-7962261a722d",
      "links": {
        // ...
      },
      "meta": {
        // ...
      }
    },
    // ...
  ],
  "meta": {
    // ...
  }
}

In the response, each entry in the data array is a Device. The most important value we need to consider here is the id and type, as we will need them to assign an accessible when granting access, so this is what your application should keep track of.

If you have many devices of different types, or if your application's flow will only use specific device types, you can use query string parameters on the URL to filter down the results, like so:

curl -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Accept: application/vnd.lockstate+json; version=1' \
  'https://api.remotelock.com/devices?type[]=lock&type[]=zwave_lock&type[]=resort_lock'

The above example changes the URL to add a filter on type, to return only locks, zwave_locks and resort_locks. You can check our documentation for more information on Filtering and Listing Devices.

For more information on the JSON structure of requests and responses, refer to the JSON Structure section of the documentation.

The next section of the tutorial is specific to connected locks, if you need to grant access to ResortLocks (algorithmic code locks), refer to the Working with ResortLocks section in the end of the tutorial.

Granting Door Access to a User

Granting access is done in two steps:

  1. Create an Access User (we'll also create an Access Guest in the next step) with a credential that can be used on the lock.
  2. Grant that Access User access to the lock.

Step 1: Create an Access User

To create an Access User, send the following POST request:

curl -X POST \
  -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Accept: application/vnd.lockstate+json; version=1' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "access_user",
    "attributes": {
      "name": "Example User",
      "generate_pin": true
    }
  }' \
  'https://api.remotelock.com/access_persons'

Replacing $ACCESS_TOKEN in the authorization header with the value we generated in the authentication step. Keep in mind that POST and PUT requests require an additional Content-Type: application/json header.

You will get a response that looks like this:

{
  "data": {
    "type": "access_user",
    "attributes": {
      "name": "Example User",
      "pin": "2155",
      // ...
      "created_at": "2018-07-12T21:05:30Z",
      "updated_at": "2018-07-12T21:05:30Z"
    },
    "id": "1864e7e5-2475-44ab-9dfe-2912469fc1b2",
    "links": {
      // ...
    }
  }
}

Notice that since we used "generate_pin": true, a PIN was generated. You could set your own PIN, along with other options for users, all listed in the documentation for creating an access user.
The most important value in this response is the id. We'll be using it, together with the lock's id and type we have from the previous step to grant this newly created user access to our lock.

Step 2: Grant Access

To grant access, send the following POST request:

curl -X POST \
  -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Accept: application/vnd.lockstate+json; version=1' \
  -H 'Content-Type: application/json' \
  -d '{
    "attributes": {
      "accessible_id": "053994ef-ceed-455a-a5f7-7962261a722d",
      "accessible_type": "lock"
    }
  }' \
  'https://api.remotelock.com/access_persons/1864e7e5-2475-44ab-9dfe-2912469fc1b2/accesses'

There are a few more things to replace on this step:

For more options and details, refer to the documentation section on granting access.

The response will look like this:

{
  "data": {
    "type": "access_person_access",
    "attributes": {
      // ...
      "access_person_id": "1864e7e5-2475-44ab-9dfe-2912469fc1b2",
      "access_person_type": "access_user",
      "accessible_id": "053994ef-ceed-455a-a5f7-7962261a722d"
    },
    "id": "c5d4ef02-1538-4924-990e-21e40dd0d5a6",
    "links": {
      // ...
    }
  }
}

Your user is all set! The next time the lock wakes up, this new code will be synchronized and usable to lock/unlock your lock.

Granting Door Access to a Guest

This step is very similar to the previous one. However, in step 1 you'll be creating an Access Guest instead of an Access User. The creation of an Access Guest also requires two additional attributes: starts_at and ends_at, to set the time period during which that Guest has access.

Step 1: Create an Access Guest

To create an Access Guest, send the following POST request:

curl -X POST \
  -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Accept: application/vnd.lockstate+json; version=1' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "access_guest",
    "attributes": {
      "starts_at": "2020-01-02T16:04:00",
      "ends_at": "2021-01-02T16:04:00",
      "name": "My Guest",
      "pin": "4567"
    }
  }' \
  'https://api.remotelock.com/access_persons'

Replacing $ACCESS_TOKEN in the authorization header with the value we generated in the authentication step. Feel free to change the starts_at and ends_at values. Notice that the time format on those do not include a timezone. The effective timezone is the one configured at the lock. You will get a response that looks like this:

{
  "data": {
    "type": "access_guest",
    "attributes": {
      "name": "My Guest",
      "pin": "4567",
      // ..
      "starts_at": "2020-01-02T16:04:00",
      "ends_at": "2021-01-02T16:04:00"
    },
    "id": "036aa265-d008-4c1a-942d-905e7f2ec3e2",
    "links": {
      // ...
    }
  }
}

The most important value in this response is the id. We'll be using it, together with the lock's id and type we have from the previous step to grant this newly created user access to our lock.

For more information see the documentation section for creating an access guest.

Step 2: Grant access

Now all you need to do is grant access using that Access Guest's id, just like you did before with the Access User. To grant access, send the following POST request:

curl -X POST \
  -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Accept: application/vnd.lockstate+json; version=1' \
  -H 'Content-Type: application/json' \
  -d '{
    "attributes": {
      "accessible_id": "053994ef-ceed-455a-a5f7-7962261a722d",
      "accessible_type": "lock"
    }
  }' \
  'https://api.remotelock.com/access_persons/036aa265-d008-4c1a-942d-905e7f2ec3e2/accesses'

Replacing $ACCESS_TOKEN in the authorization header with the value we generated in the authentication step. And the response will look like this:

{
  "data": {
    "type": "access_person_access",
    "attributes": {
      // ...
      "accessible_type": "lock",
      "access_person_id": "036aa265-d008-4c1a-942d-905e7f2ec3e2",
      "access_person_type": "access_guest",
      "accessible_id": "053994ef-ceed-455a-a5f7-7962261a722d"
    },
    "id": "6786a08e-665e-4722-a68f-a6b41fa129a0",
    "links": {
      // ...
    }
  }
}

Your guest is all set! The next time the lock wakes up, this new code will be synchronized and usable to lock/unlock your lock within that specified time period.

Webhook Notification Subscriptions (Optional)

Your application might need to be informed of events as they happen in the user's account, like when one of the codes is synchronized with a lock, or when access is granted or denied. The best way to do that is by creating a webhook notification subscription, so that as events happen, a URL in your application is sent data about the event for your application to act upon. In this example, you will create a webhook that will be triggered when an access is synchronized with the lock you've selected previously.

Create a Webhook Notification Subscriber

The first step is to create a Notification Subscriber. Send the following POST request:

curl -X POST \
  -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Accept: application/vnd.lockstate+json; version=1' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "webhook_notification_subscriber",
    "attributes": {
      "active": true,
      "name": "My webhook",
      "url": "https://myrentalapplication.com/my_webhook_example",
      "content_type": "json",
      "secret": "oRWQWqQ0sn5xugpl"
    }
  }' \
  'https://api.remotelock.com/notification_subscribers'

Where the url must be a valid endpoint of your application able to handle this request. Make sure you review the requirements, along with a few more options for configuring webhooks in the documentation section about creating a webhook notification subscriber. The response should look like this:

{
  "data": {
    "type": "webhook_notification_subscriber",
    "attributes": {
      "name": "My webhook",
      "url": "https://myrentalapplication.com/my_webhook_example",
      "content_type": "json",
      "secret": "oRWQWqQ0sn5xugpl",
      "active": true,
      "created_at": "2018-07-13T14:37:17Z",
      "updated_at": "2018-07-13T14:37:17Z"
    },
    "id": "df4e347b-b885-47da-b627-59d0b4b47807",
    "links": {
      // ...
    }
  }
}

Create a Notification Subscription

With the Subscriber configured, you now can associate it with event types and a publisher. In this case we'll create a Notification Subscription for the access_person_synced event using the lock id and type as a publisher. Send the following POST request:

curl -X POST \
  -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Accept: application/vnd.remotelock+json; version=1' \
  -H 'Content-Type: application/json' \
  -d '{
    "attributes": {
      "events": [
        {
          "event_type": "access_person_synced"
        }
      ],
      "publisher_type": "lock",
      "publisher_id": "053994ef-ceed-455a-a5f7-7962261a722d",
      "subscriber_type": "webhook_notification_subscriber",
      "subscriber_id": "df4e347b-b885-47da-b627-59d0b4b47807"
    }
  }' \
  'https://api.remotelock.com/notification_subscriptions'

Don't forget to replace $ACCESS_TOKEN with your generated value. Notice that the publisher_idand publisher_type here are the values from our lock, and the subscriber_id and subscriber_type, values for the webhook subscriber created in the previous step. It's worth mentioning that multiple event types can be configured, and the publisher can be a broader scope, like a Location or even the entire Account. For more details, see the documentation section on creating notification subscriptions. You will get a response similar to the one below:

{
  "data": {
    "type": "notification_subscription",
    "attributes": {
      "events": [
        {
          "event_type": "access_person_synced"
        }
      ],
      "created_at": "2018-07-13T14:54:11Z",
      "updated_at": "2018-07-13T14:54:11Z",
      "subscriber_id": "df4e347b-b885-47da-b627-59d0b4b47807",
      "subscriber_type": "webhook_notification_subscriber",
      "publisher_id": "053994ef-ceed-455a-a5f7-7962261a722d",
      "publisher_type": "lock"
    },
    "id": "09491f96-da50-4ae1-8d29-390e5397d5ad",
    "links": {
      // ...
    }
  }
}

Now, whenever that event happens on that lock, a POST request will be sent to the configured URL with a body similar to the one below:

{
  "data": {
    "type": "access_person_synced_event",
    "attributes": {
      "source": "user",
      "status": "succeeded",
      "time_zone": "America/Denver",
      "occurred_at": "2018-07-10T18:15:32Z",
      // ...
      "publisher_id": "053994ef-ceed-455a-a5f7-7962261a722d",
      "publisher_type": "lock",
      "associated_resource_id": "1864e7e5-2475-44ab-9dfe-2912469fc1b2",
      "associated_resource_type": "access_user"
    },
    "id": "a152915c-3d12-480b-8d68-baebbfa1264c",
    "links": {
      // ...
    }
  }
}

Working with ResortLocks (Optional)

The process for granting access to ResortLocks works differently from Wi-Fi connected locks, as they use algorithmic codes instead of synchronizing codes over Wi-Fi. If you have a registered ResortLock, the list of devices in the response from the /devices endpoint should include an object similar to this one in the data array:

{
  "type": "resort_lock",
  "attributes": {
    "name": "My ResortLock",
    // ...
  },
  "id": "ed1b7a1b-0dc5-4081-8658-728d96ed0dde",
  "links": {
    // ...
  }
}

To create a guest for this ResortLock, send the following POST request:

curl -X POST \
  -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Accept: application/vnd.remotelock+json; version=1' \
  -H 'Content-Type: application/json' \
  -d '{
    "attributes": {
      "resort_lock_id": "ed1b7a1b-0dc5-4081-8658-728d96ed0dde",
      "name": "My ResortLock Guest",
      "starts_at": "2020-01-02T13:00:00",
      "ends_at": "2021-01-02T16:00:00"
    }
  }' \
  'https://api.remotelock.com/resort_lock_guests'

Replacing $ACCESS_TOKEN in the authorization header with the value we generated in the authentication step, and the value for resort_lock_id with the id for your ResortLock. This guest will only have access between the times in starts_at and ends_at, and those should not use minutes or seconds - any value here will be converted to 0. Refer to the Resort Lock Guests documentation section for more information.

The response will look like this:

{
  "data": {
    "type": "resort_lock_guest",
    "attributes": {
      "name": "My ResortLock Guest",
      "pin": "123456789012",
      "starts_at": "2020-01-02T13:00:00",
      "ends_at": "2021-01-02T16:00:00",
      // ...
      "resort_lock_id": "ed1b7a1b-0dc5-4081-8658-728d96ed0dde"
    },
    "id": "f66610b0-a73f-4cee-9ba5-eafd73f80e4d",
    "links": {
      // ...
    }
  }
}

The PIN for that guest is the pin value in the response. In the above example, 123456789012.

Authentication

RemoteLock uses OAuth 2.0 to authenticate users in applications installed in mobile devices or running in external servers. The supported OAuth flows:

The RemoteLock user credentials are only accepted in RemoteLock sign in page, which generates an Authorization Code for an access token request.

The access token for this flow gives access to the user resources that signed in using your Application.

Only the Application ID and Secret are used to authorize access to the API.

The access token for this flow only allows access to resources associated with the application's account.

Once a user is authorized, every API request must include a valid access token.

The following OAuth 2.0 endpoints are available under https://connect.remotelock.com.

These are needed for OAuth2 client library you'll be using:

GET       /oauth/authorize
POST      /oauth/token

Choose an OAuth2 client library for your language

To simplify integration with RemoteLock it is strongly recommended to use one of the open source OAuth2 client libraries available in your language. The library will handle many details described in this documentation.

Since OAuth2 is an open protocol a quick Google search will give you at least a couple options. Here are some examples:

Setup a new Application

  1. Send an email to sales@remotelock.com requesting API Access for your account.
  2. Once API access is enabled for your account, go to the developer portal and sign in to manage your OAuth Applications.

1. Authorization Code Grant - RFC 6749-Section 4.1

1.1. Generating the initial Authorization Code

Whenever you need access to a user's account for the first time, the application should load the Authorize URL in a browser or webview. The user will enter the credentials and the server will redirect to the Callback URL so that the application can extract the authorization code and then generate an access token.

Example:

Let your Application settings be:

Application ID: abc
Secret: xyz
Callback URL: http://your.server/oauth_callback

The Authorize URL should be:

https://connect.remotelock.com/oauth/authorize?client_id=a1b2c3&response_type=code&redirect_uri=http://your.server/oauth_callback

Your app should load the above URL in a browser and the user will enter credentials on it. Once the authentication succeeds, the server will redirect the request to:

http://your.server/oauth_callback?code=123

Where 123 is the Authorization Code that is valid for 10 minutes, which is enough time to your application request the token for the first time. Your application must be able to handle this URL in order to capture this code so that it can obtain the OAuth Token.

1.2. Generating an OAuth Token

POST /oauth/token
Host: connect.remotelock.com
Content-Type: application/x-www-form-urlencoded

code=123&
client_id=abc&
client_secret=xyz&
redirect_uri=http://your.server/oauth_callback&
grant_type=authorization_code
{
  "access_token": "1/4cc3ss-t0k3n",
  "expires_in": 7200,
  "token_type": "Bearer",
  "refresh_token": "1/r3fR3sH-t0k3n"
}

1.3. Refresh Token

Each access token expires in 7200 seconds (2 hours). The access token JSON response contains a refresh_token that can be used to issue a new access_token without asking for user authentication again.

POST /oauth/token
Host: connect.remotelock.com
Content-Type: application/x-www-form-urlencoded

client_id=abc&
client_secret=123&
refresh_token=1/r3fR3sH-t0k3n&
grant_type=refresh_token
{
  "access_token": "1/N3w-4cc3ss-T0k3n",
  "expires_in": 7200,
  "refresh_token": "1/n3w-r3fR3sH-t0k3n",
  "token_type": "Bearer"
}

Your application should store both Access Token and Refresh Token so that it can access the user account when the user is offline or the application is running in background.

Whenever an Access Token expires and you use the Refresh Token to request a new Access Token, the response includes a new Refresh Token, meaning the previous one became invalid, and then your application should store the new Access Token and Refresh Token replacing the previous (expired) ones.

Here is an example of this flow:

  1. Customer authorizes and you get the initial Access Token A as well as a Refresh Token X
  2. You access customer data using Access Token A
  3. After 2 hours the Access Token A expires, but you need to access customer data and you notice that Access Token A is expired
  4. You make a request to issue a new Access Token based on the Refresh Token X and you get a new Access Token B and a new Refresh Token Y. At this point, the Refresh Token X becomes invalid since it was just used
  5. Repeat from step 2 replacing A with B and X with Y

The user can revoke the authorization to your app at anytime, so the Refresh Token will become invalid and your app will need to ask for user authorization again.

2. Client Credentials Grant - RFC 6749-Section 4.4

In this flow, only your account resources are available via API. For this reason, the only credentials required are the Application ID and Secret.

Let your Application settings be:

Application ID: abc
Secret: xyz

2.1. Generating an OAuth Token

POST /oauth/token
Host: connect.remotelock.com
Content-Type: application/x-www-form-urlencoded

client_id=abc&
client_secret=xyz&
grant_type=client_credentials
{
  "access_token": "1/4cc3ss-t0k3n",
  "expires_in": 7200,
  "token_type": "Bearer",
}

Notice that this flow does not include a Refresh Token, meaning that this same request must be done when the access token expires.

Making requests with an OAuth Token

Just make a GET request using a valid access token. Example:

GET /locations
Host: api.remotelock.com
Accept: application/vnd.lockstate.v1+json
Authorization: Bearer 1/4cc3ss-t0k3n

Revoking an OAuth Access Token

Send the following POST request to immediately revoke a token:

POST /oauth/revoke
Host: connect.remotelock.com
Content-Type: application/x-www-form-urlencoded

client_id=abc&
client_secret=xyz&
token=1/4cc3ss-t0k3n

JSON Structure

Overview

JSON request structure

The HTTP methods POST/PUT/PATCH require the header Content-Type: application/json and the request body must contain a valid JSON structure.

Other HTTP methods accept empty or missing Content-Type header since the request body is ignored.

Example JSON request structure:

{
  "attributes": {
    "body": "Very informative article"
  }
}

JSON response structure

JSON response structure for a collection

{
  "data": [
    {
      "type": "article",
      "id": "3",
      "attributes": {
        "title": "JSON API paints my bikeshed!",
        "body": "The shortest article. Ever.",
        "author_id": 1,
        "created_at": "2015-07-23T18:51:11Z",
        "updated_at": "2015-07-23T18:51:11Z"
      },
      "links": {
        "self": "https://api.remotelock.com/articles/3",
        "author": "https://api.remotelock.com/authors/1",
        "comments": "https://api.remotelock.com/comments"
      }
    },
    {
      "type": "article",
      "id": "5",
      "attributes": {
        "title": "Ruby on Rails framework",
        "body": "RoR is 10 years old!",
        "author_id": 1,
        "created_at": "2015-05-22T14:56:29Z",
        "updated_at": "2015-05-22T14:56:28Z"
      },
      "links": {
        "self": "https://api.remotelock.com/articles/3",
        "author": "https://api.remotelock.com/authors/1",
        "comments": "https://api.remotelock.com/comments"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 2,
    "total_pages": 7,
    "total_count": 14
  }
}

JSON response structure for a single resource

{
  "data": {
    "type": "article",
    "id": "3",
    "attributes": {
      "title": "JSON API paints my bikeshed!",
      "body": "The shortest article. Ever.",
      "author_id": 1,
      "created_at": "2015-07-23T18:51:11Z",
      "updated_at": "2015-07-23T18:51:11Z"
    },
    "links": {
      "self": "https://api.remotelock.com/articles/3",
      "author": "https://api.remotelock.com/authors/1",
      "comments": "https://api.remotelock.com/comments"
    }
  }
}

Errors

There are 2 types of error responses:

Resource errors

Resource errors are used to indicate an error happened for a resource you're trying to work with. For example: if an invalid configuration option is passed when updating a lock, the response will be a resource error.

Here's the example response when an error happens:

{
  "attributes": {
    "name": "",
    "age": 10
  },
  "errors": [{
    "attribute": "name",
    "messages": ["is empty"],
    "full_messages": ["name is empty"]
  }]
}

In case an error is not related to a particular attribute, the errors attribute value will be null.

{
  "attributes": {
    "name": "",
    "age": 10
  },
  "errors": [{
    "attribute": null,
    "messages": ["Subuser creation limit reached, please upgrade your account."],
    "full_messages": ["Subuser creation limit reached, please upgrade your account."]
  }]
}

General errors

General errors are used to describe application-wide errors. For example: the response contains general error if you try creating a lock but the account doesn't have a paid subscription.

Here's the example response:

{
  "message": "Please create a subscription",
  "type": "billing_subscription_required"
}

Pagination

Collection resources can be paginated using the data from meta top level key.

{
  "data": {
    //...
  },
  "meta": {
    "page": 1,
    "per_page": 2,
    "total_pages": 7,
    "total_count": 14
  }
}

On every endpoint that responds with a collection of resources, you can provide the following query parameters:

The pagination is limited to access up to 10,000 resources, which means the product page * per_page should not exceed that number.

Examples:

HTTP Status Codes

Request Method Response Outcome Response Status Code
GET Success 200
PUT/PATCH Success 200
POST Success 201
DELETE Success 204
ANY Malformed request 400
ANY Not permitted 401
ANY Payment required 402
ANY Expired/Invalid token 403
GET Not found 404
POST Duplicate resource 409
POST/PUT/PATCH/DELETE Validation error 422
ANY Unexpected server error 5xx

Filtering

Filter results by multiple ids

Supported in endpoints that return a collection of resources

Filter results by resource type

Supported in endpoints that return a collection of resources of multiple types

Filter results by association

Used to apply the id or type filter in a resource association
Example: To retrieve devices of the location a1b2
GET https://api.remotelock.com/devices?attributes[location_id]=a1b2

Sorting

Most endpoints that return a collection are sortable. Additionally, these endpoints usually have a default sort attribute. The documentation for each endpoint specifies the default sort attribute as well as other attributes that can be used for sorting (if any).

Query formats

Sort order

The default sort order for any attribute is "ascending". In order to get "descending" sort order prefix the attribute with hyphen (-).

Examples:

Examples

Versioning

Specifying API version

It is strongly recommended to explicitly specify the version. Specifying the version can be done:

If API version is not specified, the application will default to the latest version.

Changes

API version will increase only if there's a breaking change.

For example: if a single field is added to the resource, the version won't change as this is a non breaking change.

Rate Limiting

Currently, each account is limited to 120 requests/minute.

Each API response includes rate limiting related headers such as:

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 15
X-RateLimit-Reset: 1452626187
Header Description
X-RateLimit-Limit The maximum number of requests that the account is allowed to make per minute.
X-RateLimit-Remaining The number of requests remaining in current rate limit window.
X-RateLimit-Reset UTC epoch seconds in which the current rate limit window will reset

Whenever the account has exceeded the rate limit, the request will be responded with status 429 (Too Many Requests) and the body will contain following JSON:

{
  "message": "Your account has exceeded the rate limit. Check the X-RateLimit-* headers."
}

Alternative

Rather than polling our API, we offer Webhook Notification Subscriptions to keep your application up to date.

Access Exceptions

Get all access exceptions

Request

Endpoint

GET /access_exceptions

GET /access_exceptions

Parameters

Name Description
sort Sortable attributes: created_at and name, default: created_at ascending

Response


200 OK
{
  "data": [
    {
      "type": "access_exception",
      "attributes": {
        "name": "Non eum qui et.",
        "dates": [
          {
            "start_date": "2016-11-24",
            "end_date": "2016-11-25"
          },
          {
            "start_date": "2015-12-25",
            "end_date": "2015-12-25"
          }
        ],
        "created_at": "2021-11-04T18:03:47Z",
        "updated_at": "2021-11-04T18:03:47Z"
      },
      "id": "1c8385f4-192a-426a-998a-6a080878ba40",
      "links": {
        "self": "http://api.remotelock.dev/access_exceptions/1c8385f4-192a-426a-998a-6a080878ba40"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 1,
    "total_pages": 1
  }
}

Get an access exception

Request

Endpoint

GET /access_exceptions/:id

GET /access_exceptions/40b59e03-3a60-4be6-ad57-026675722a49

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "access_exception",
    "attributes": {
      "name": "Officia voluptatum qui minus.",
      "dates": [
        {
          "start_date": "2016-11-24",
          "end_date": "2016-11-25"
        },
        {
          "start_date": "2015-12-25",
          "end_date": "2015-12-25"
        }
      ],
      "created_at": "2021-11-04T18:03:48Z",
      "updated_at": "2021-11-04T18:03:48Z"
    },
    "id": "40b59e03-3a60-4be6-ad57-026675722a49",
    "links": {
      "self": "http://api.remotelock.dev/access_exceptions/40b59e03-3a60-4be6-ad57-026675722a49"
    }
  }
}

Create an access exception

Request

Endpoint

POST /access_exceptions

POST /access_exceptions

Parameters

{
  "attributes": {
    "name": "Thanks Giving and Christmas",
    "dates": [
      {
        "start_date": "2016-11-24",
        "end_date": "2016-11-25"
      },
      {
        "start_date": "2015-12-25",
        "end_date": "2015-12-25"
      }
    ]
  }
}
Name Description
attributes[name] required Access exception name
attributes[dates] required [{ "start_date": "2016-01-01", "end_date": "2016-01-01" }, ...]

Response


201 Created
{
  "data": {
    "type": "access_exception",
    "attributes": {
      "name": "Thanks Giving and Christmas",
      "dates": [
        {
          "start_date": "2016-11-24",
          "end_date": "2016-11-25"
        },
        {
          "start_date": "2015-12-25",
          "end_date": "2015-12-25"
        }
      ],
      "created_at": "2021-11-04T18:03:48Z",
      "updated_at": "2021-11-04T18:03:48Z"
    },
    "id": "835bb363-f983-4a87-8e9a-2b67051f9a73",
    "links": {
      "self": "http://api.remotelock.dev/access_exceptions/835bb363-f983-4a87-8e9a-2b67051f9a73"
    }
  }
}

Update an access exception

Request

Endpoint

PUT /access_exceptions/:id

PUT /access_exceptions/514da0ab-00d6-46a9-9bb9-9c7a567aa511

Parameters

{
  "attributes": {
    "name": "Thanks Giving",
    "dates": [
      {
        "start_date": "2016-11-24",
        "end_date": "2016-11-25"
      }
    ]
  }
}
Name Description
attributes[name] Access exception name
attributes[dates] required [{ "start_date": "2016-01-01", "end_date": "2016-01-01" }, ...]

Response


200 OK
{
  "data": {
    "type": "access_exception",
    "attributes": {
      "name": "Thanks Giving",
      "dates": [
        {
          "start_date": "2016-11-24",
          "end_date": "2016-11-25"
        }
      ],
      "created_at": "2021-11-04T18:03:49Z",
      "updated_at": "2021-11-04T18:03:49Z"
    },
    "id": "514da0ab-00d6-46a9-9bb9-9c7a567aa511",
    "links": {
      "self": "http://api.remotelock.dev/access_exceptions/514da0ab-00d6-46a9-9bb9-9c7a567aa511"
    }
  }
}

Delete an access exception

Request

Endpoint

DELETE /access_exceptions/:id

DELETE /access_exceptions/33804e48-dddc-46ea-a188-8ba8d3abfb64

Parameters

None.

Response


204 No Content

Access Persons

Get access persons

Returns all access person types (homogeneous).

Status

Statuses for access_guest type:

Statuses for access_user type:

This endpoint returns only current and upcoming by default. See next example to fetch expired and deactivated access persons.

Request

Endpoint

GET /access_persons

GET /access_persons

Parameters

Name Description
[type] Filter by type(s). Supported types: access_user and access_guest
sort Sortable attributes: created_at, updated_at, name, department, starts_at, and ends_at, default: created_at ascending
attributes[status] Status: current, upcoming, deactivated or expired. Default: current and upcoming. Supports array query

Response


200 OK
{
  "data": [
    {
      "type": "access_user",
      "attributes": {
        "name": "Glinda Heller",
        "email": "kirk@sawayn-white.co",
        "phone": null,
        "department": null,
        "status": "current",
        "source": null,
        "guest_source": null,
        "created_at": "2021-11-04T18:04:50Z",
        "updated_at": "2021-11-04T18:04:50Z",
        "pin": "1158",
        "card_number": null
      },
      "id": "095cdabb-57be-4554-a408-2b4095c6a09d",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/095cdabb-57be-4554-a408-2b4095c6a09d"
      }
    },
    {
      "type": "access_guest",
      "attributes": {
        "name": "Celinda McClure",
        "email": "elois@stamm.info",
        "phone": null,
        "department": null,
        "status": "current",
        "source": null,
        "guest_source": null,
        "created_at": "2021-11-04T18:04:50Z",
        "updated_at": "2021-11-04T18:04:50Z",
        "pin": "1159",
        "card_number": null,
        "starts_at": "2021-11-05T00:00:00",
        "ends_at": "2021-11-28T18:04:50"
      },
      "id": "0dabd518-fed3-4d5b-8835-69e3d944bd26",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/0dabd518-fed3-4d5b-8835-69e3d944bd26"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Get access persons filtered by status

Request

Endpoint

GET /access_persons

GET /access_persons?attributes[status][]=deactivated&attributes[status][]=expired

Parameters

attributes: {"status"=>["deactivated", "expired"]}
Name Description
[type] Filter by type(s). Supported types: access_user and access_guest
sort Sortable attributes: created_at, updated_at, name, department, starts_at, and ends_at, default: created_at ascending
attributes[status] Status: current, upcoming, deactivated or expired. Default: current and upcoming. Supports array query

Response


200 OK
{
  "data": [
    {
      "type": "access_user",
      "attributes": {
        "name": "Ms. Lavern Christiansen",
        "email": "jame@pacocha.org",
        "phone": null,
        "department": null,
        "status": "deactivated",
        "source": null,
        "guest_source": null,
        "created_at": "2021-11-04T18:04:50Z",
        "updated_at": "2021-11-04T18:04:50Z",
        "pin": "1160",
        "card_number": null
      },
      "id": "cb065d8a-d48f-4f3b-854a-7158b5e86084",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/cb065d8a-d48f-4f3b-854a-7158b5e86084"
      },
      "meta": {
        "restricted_actions": [
          "update"
        ]
      }
    },
    {
      "type": "access_guest",
      "attributes": {
        "name": "Bobbye Kiehn",
        "email": "lanita@littel-durgan.co",
        "phone": null,
        "department": null,
        "status": "expired",
        "source": null,
        "guest_source": null,
        "created_at": "2021-11-04T18:04:50Z",
        "updated_at": "2021-11-04T18:04:50Z",
        "pin": "1162",
        "card_number": null,
        "starts_at": "2021-11-01T18:04:50",
        "ends_at": "2021-11-03T18:04:50"
      },
      "id": "3b67953e-4068-4199-854c-2f3ba6aa888a",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/3b67953e-4068-4199-854c-2f3ba6aa888a"
      },
      "meta": {
        "restricted_actions": [
          "update"
        ]
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Get an access person

Request

Endpoint

GET /access_persons/:id

GET /access_persons/5d1060de-ccad-4e1d-963f-111564b1ce23

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "access_user",
    "attributes": {
      "name": "Shanika Bruen DVM",
      "email": "modesto@jakubowski.org",
      "phone": null,
      "department": null,
      "status": "current",
      "source": null,
      "guest_source": null,
      "created_at": "2021-11-04T18:04:55Z",
      "updated_at": "2021-11-04T18:04:55Z",
      "pin": "1173",
      "card_number": null
    },
    "id": "5d1060de-ccad-4e1d-963f-111564b1ce23",
    "links": {
      "self": "http://api.remotelock.dev/access_persons/5d1060de-ccad-4e1d-963f-111564b1ce23"
    }
  }
}

Create an access user

'Access user' is a permanent access person type. The only difference from 'access guest' is it doesn't accept 'starts_at' and 'ends_at' parameters.

Request

Endpoint

POST /access_persons

POST /access_persons

Parameters

{
  "type": "access_user",
  "attributes": {
    "name": "Ann Smith",
    "email": "ann.smith@example.com",
    "department": "Human Resources",
    "pin": "1234",
    "card_number": "23456"
  }
}
Name Description
type required access_user
attributes[name] required Name
attributes[email] Email
attributes[pin] Access person pin (pin, generate_pin or card_number are required)
attributes[card_number] Card number (pin, generate_pin or card_number are required)
attributes[generate_pin] When true, a random pin is generated (pin, generate_pin or card_number are required). Default: false
attributes[department] Department name

Response


201 Created
{
  "data": {
    "type": "access_user",
    "attributes": {
      "name": "Ann Smith",
      "email": "ann.smith@example.com",
      "phone": null,
      "department": "Human Resources",
      "status": "current",
      "source": null,
      "guest_source": null,
      "created_at": "2021-11-04T18:04:56Z",
      "updated_at": "2021-11-04T18:04:56Z",
      "pin": "1234",
      "card_number": "23456"
    },
    "id": "6fc191af-64bc-4d72-bcc9-53553be09b6b",
    "links": {
      "self": "http://api.remotelock.dev/access_persons/6fc191af-64bc-4d72-bcc9-53553be09b6b"
    }
  }
}

Create an access guest

'Access guest' is a temporary access person type. It has all the same features as 'access user', with the addition of 'starts_at' and 'ends_at' parameters that enable additional access limiting.

Request

Endpoint

POST /access_persons

POST /access_persons

Parameters

{
  "type": "access_guest",
  "attributes": {
    "starts_at": "2020-01-02T16:04:00",
    "ends_at": "2020-01-30T16:04:00",
    "name": "Ann Smith",
    "pin": "1234"
  }
}
Name Description
type required access_guest
attributes[name] required Name
attributes[email] Email
attributes[pin] Access person pin (pin, generate_pin or card_number are required)
attributes[card_number] Card number (pin, generate_pin or card_number are required)
attributes[generate_pin] When true, a random pin is generated (pin, generate_pin or card_number are required). Default: false
attributes[starts_at] required Starts at ISO 8601 timestamp without time zone
attributes[ends_at] required Ends at ISO 8601 timestamp without time zone

Response


201 Created
{
  "data": {
    "type": "access_guest",
    "attributes": {
      "name": "Ann Smith",
      "email": null,
      "phone": null,
      "department": null,
      "status": "expired",
      "source": null,
      "guest_source": null,
      "created_at": "2021-11-04T18:04:58Z",
      "updated_at": "2021-11-04T18:04:58Z",
      "pin": "1234",
      "card_number": null,
      "starts_at": "2020-01-02T16:04:00",
      "ends_at": "2020-01-30T16:04:00"
    },
    "id": "8cf95fea-eff1-4055-a48b-f6776378173f",
    "links": {
      "self": "http://api.remotelock.dev/access_persons/8cf95fea-eff1-4055-a48b-f6776378173f"
    },
    "meta": {
      "restricted_actions": [
        "update"
      ]
    }
  }
}

Update an access user

Request

Endpoint

PUT /access_persons/:id

PUT /access_persons/042fc144-b80e-4dec-a6a4-ebee87dbf92e

Parameters

{
  "attributes": {
    "name": "House Owner",
    "pin": "2345"
  }
}
Name Description
attributes[name] Name
attributes[email] Email
attributes[pin] Access person pin (pin, generate_pin or card_number are required)
attributes[card_number] Card number (pin, generate_pin or card_number are required)
attributes[generate_pin] When true, a random pin is generated (pin, generate_pin or card_number are required). Default: false
attributes[department] Department name

Response


200 OK
{
  "data": {
    "type": "access_user",
    "attributes": {
      "name": "House Owner",
      "email": "cornelia.rogahn@lowe-schoen.biz",
      "phone": null,
      "department": null,
      "status": "current",
      "source": null,
      "guest_source": null,
      "created_at": "2021-11-04T18:05:06Z",
      "updated_at": "2021-11-04T18:05:06Z",
      "pin": "2345",
      "card_number": null
    },
    "id": "042fc144-b80e-4dec-a6a4-ebee87dbf92e",
    "links": {
      "self": "http://api.remotelock.dev/access_persons/042fc144-b80e-4dec-a6a4-ebee87dbf92e"
    }
  }
}

Update an access guest

Request

Endpoint

PUT /access_persons/:id

PUT /access_persons/711c19b0-1adf-4a79-ab29-0d533229f96c

Parameters

{
  "attributes": {
    "name": "Cleaning Crew",
    "ends_at": "2021-11-15T00:00:00Z"
  }
}
Name Description
attributes[name] Name
attributes[email] Email
attributes[pin] Access person pin (pin, generate_pin or card_number are required)
attributes[card_number] Card number (pin, generate_pin or card_number are required)
attributes[generate_pin] When true, a random pin is generated (pin, generate_pin or card_number are required). Default: false
attributes[starts_at] Starts at ISO 8601 timestamp without time zone
attributes[ends_at] Ends at ISO 8601 timestamp without time zone

Response


200 OK
{
  "data": {
    "type": "access_guest",
    "attributes": {
      "name": "Cleaning Crew",
      "email": "tatiana.armstrong@towne-weber.io",
      "phone": null,
      "department": null,
      "status": "current",
      "source": null,
      "guest_source": null,
      "created_at": "2021-11-04T18:05:07Z",
      "updated_at": "2021-11-04T18:05:07Z",
      "pin": "1200",
      "card_number": null,
      "starts_at": "2021-11-05T00:00:00",
      "ends_at": "2021-11-15T00:00:00"
    },
    "id": "711c19b0-1adf-4a79-ab29-0d533229f96c",
    "links": {
      "self": "http://api.remotelock.dev/access_persons/711c19b0-1adf-4a79-ab29-0d533229f96c"
    }
  }
}

Deactivates an access person

We recommend using this endpoint rather than DELETE /access_persons/:id because it allows you to fetch deactivated and expired access persons.

Request

Endpoint

PUT /access_persons/:id/deactivate

PUT /access_persons/e6ad9029-6c2e-4ea8-9291-993495e607b6/deactivate

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "access_user",
    "attributes": {
      "name": "Jeanine Dickens DC",
      "email": "rickie.heathcote@oreilly.org",
      "phone": null,
      "department": null,
      "status": "deactivated",
      "source": null,
      "guest_source": null,
      "created_at": "2021-11-04T18:05:08Z",
      "updated_at": "2021-11-04T18:05:08Z",
      "pin": "1201",
      "card_number": null
    },
    "id": "e6ad9029-6c2e-4ea8-9291-993495e607b6",
    "links": {
      "self": "http://api.remotelock.dev/access_persons/e6ad9029-6c2e-4ea8-9291-993495e607b6"
    },
    "meta": {
      "restricted_actions": [
        "update"
      ]
    }
  }
}

Delete an access person

Request

Endpoint

DELETE /access_persons/:id

DELETE /access_persons/83bd82f4-c342-48dc-be28-698cdb8bab34

Parameters

None.

Response


204 No Content

Schedule sending access instructions email in days

Request

Endpoint

POST /access_persons/:id/email/notify

POST /access_persons/b3eda80f-ea3e-4cbb-897e-2c435869bced/email/notify

Parameters

{
  "attributes": {
    "days_before": 1
  }
}
Name Description
attributes[days_before] Schedule sending email a number of days beforeguest start time. Default: sends the email immediately.

Response


200 OK

Get all of an access person's accesses

Request

Endpoint

GET /access_persons/:access_person_id/accesses

GET /access_persons/5d518968-7ca1-4d0e-bfdd-fdc8fc883c69/accesses

Parameters

None.

Response


200 OK
{
  "data": [
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 1,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 1,
        "devices_failed_sync_count": 0,
        "accessible_type": "lock",
        "created_at": "2021-11-04T18:05:15Z",
        "updated_at": "2021-11-04T18:05:15Z",
        "access_person_id": "5d518968-7ca1-4d0e-bfdd-fdc8fc883c69",
        "access_person_type": "access_user",
        "accessible_id": "c9d06b7e-9b4e-4ba7-b033-7ac5edf8a8cd"
      },
      "id": "92263fbe-9d5f-46b2-8206-41876adfac00",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/5d518968-7ca1-4d0e-bfdd-fdc8fc883c69/accesses/92263fbe-9d5f-46b2-8206-41876adfac00",
        "access_person": "http://api.remotelock.dev/access_persons/5d518968-7ca1-4d0e-bfdd-fdc8fc883c69",
        "accessible": "http://api.remotelock.dev/devices/c9d06b7e-9b4e-4ba7-b033-7ac5edf8a8cd"
      }
    },
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "acs_door",
        "created_at": "2021-11-04T18:05:15Z",
        "updated_at": "2021-11-04T18:05:15Z",
        "access_person_id": "5d518968-7ca1-4d0e-bfdd-fdc8fc883c69",
        "access_person_type": "access_user",
        "accessible_id": "4cb5d404-3858-420a-a00c-caa4b2ddb0eb"
      },
      "id": "1e66b4cb-a613-4b0d-bf9b-9b5a39a69b31",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/5d518968-7ca1-4d0e-bfdd-fdc8fc883c69/accesses/1e66b4cb-a613-4b0d-bf9b-9b5a39a69b31",
        "access_person": "http://api.remotelock.dev/access_persons/5d518968-7ca1-4d0e-bfdd-fdc8fc883c69",
        "accessible": "http://api.remotelock.dev/devices/4cb5d404-3858-420a-a00c-caa4b2ddb0eb"
      }
    },
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "door_group",
        "created_at": "2021-11-04T18:05:16Z",
        "updated_at": "2021-11-04T18:05:16Z",
        "access_person_id": "5d518968-7ca1-4d0e-bfdd-fdc8fc883c69",
        "access_person_type": "access_user",
        "accessible_id": "560f4ff9-77c2-46e8-86e9-f1e7d8bb6bd3"
      },
      "id": "95b4d4b2-f660-400d-9247-2ed303a76db5",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/5d518968-7ca1-4d0e-bfdd-fdc8fc883c69/accesses/95b4d4b2-f660-400d-9247-2ed303a76db5",
        "access_person": "http://api.remotelock.dev/access_persons/5d518968-7ca1-4d0e-bfdd-fdc8fc883c69",
        "accessible": "http://api.remotelock.dev/groups/560f4ff9-77c2-46e8-86e9-f1e7d8bb6bd3"
      }
    },
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "location",
        "created_at": "2021-11-04T18:05:16Z",
        "updated_at": "2021-11-04T18:05:16Z",
        "access_person_id": "5d518968-7ca1-4d0e-bfdd-fdc8fc883c69",
        "access_person_type": "access_user",
        "accessible_id": "1e669d97-7069-4e8e-a728-73a0d32b8201"
      },
      "id": "5a661730-c4a7-4bdf-9704-9b1f3f7610db",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/5d518968-7ca1-4d0e-bfdd-fdc8fc883c69/accesses/5a661730-c4a7-4bdf-9704-9b1f3f7610db",
        "access_person": "http://api.remotelock.dev/access_persons/5d518968-7ca1-4d0e-bfdd-fdc8fc883c69",
        "accessible": "http://api.remotelock.dev/locations/1e669d97-7069-4e8e-a728-73a0d32b8201"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 4,
    "total_pages": 1
  }
}

Get an access person's access

Request

Endpoint

GET /access_persons/:access_person_id/accesses/:id

GET /access_persons/b286a839-9578-4665-a784-3a549145a656/accesses/47c720a9-1d60-4450-9f65-4c821b7d5e24

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "access_person_access",
    "attributes": {
      "guest_start_time": null,
      "guest_end_time": null,
      "devices_count": 1,
      "devices_synced_count": 0,
      "devices_pending_sync_count": 1,
      "devices_failed_sync_count": 0,
      "accessible_type": "lock",
      "created_at": "2021-11-04T18:05:16Z",
      "updated_at": "2021-11-04T18:05:16Z",
      "access_person_id": "b286a839-9578-4665-a784-3a549145a656",
      "access_person_type": "access_user",
      "accessible_id": "794c639e-a428-4862-9b7b-23a12b8f85c6"
    },
    "id": "47c720a9-1d60-4450-9f65-4c821b7d5e24",
    "links": {
      "self": "http://api.remotelock.dev/access_persons/b286a839-9578-4665-a784-3a549145a656/accesses/47c720a9-1d60-4450-9f65-4c821b7d5e24",
      "access_person": "http://api.remotelock.dev/access_persons/b286a839-9578-4665-a784-3a549145a656",
      "accessible": "http://api.remotelock.dev/devices/794c639e-a428-4862-9b7b-23a12b8f85c6"
    }
  }
}

Grant an access person access

Accessible can be one of: acs_door, acs_elevator_floor, lock, zwave_lock, schlage_home_lock, door_group or location

Request

Endpoint

POST /access_persons/:access_person_id/accesses

POST /access_persons/d2e7324f-cfab-4112-b757-4d5a70ab4c67/accesses

Parameters

{
  "attributes": {
    "accessible_id": "89d11f35-054e-463d-9c72-64ed856ae712",
    "accessible_type": "lock",
    "guest_start_time": "14:00",
    "access_schedule_id": "a10d15f7-cfeb-4229-bb1d-d2b539d518f7"
  }
}
Name Description
attributes[accessible_type] required Accessible type: acs_door, acs_elevator_floor, lock, zwave_lock, schlage_home_lock, door_group or location
attributes[accessible_id] required Accessible id
attributes[access_schedule_id] Access schedule id
attributes[guest_start_time] Access Guest start time override, ISO 8601 24 hour time format
attributes[guest_end_time] Access Guest end time override, ISO 8601 24 hour time format

Response


201 Created
{
  "data": {
    "type": "access_person_access",
    "attributes": {
      "guest_start_time": "14:00:00",
      "guest_end_time": null,
      "devices_count": 0,
      "devices_synced_count": 0,
      "devices_pending_sync_count": 0,
      "devices_failed_sync_count": 0,
      "accessible_type": "lock",
      "created_at": "2021-11-04T18:05:30Z",
      "updated_at": "2021-11-04T18:05:30Z",
      "access_schedule_id": "a10d15f7-cfeb-4229-bb1d-d2b539d518f7",
      "access_person_id": "d2e7324f-cfab-4112-b757-4d5a70ab4c67",
      "access_person_type": "access_guest",
      "accessible_id": "89d11f35-054e-463d-9c72-64ed856ae712"
    },
    "id": "e649c20e-297b-44ea-9fa3-f038740c3876",
    "links": {
      "self": "http://api.remotelock.dev/access_persons/d2e7324f-cfab-4112-b757-4d5a70ab4c67/accesses/e649c20e-297b-44ea-9fa3-f038740c3876",
      "access_schedule": "http://api.remotelock.dev/schedules/a10d15f7-cfeb-4229-bb1d-d2b539d518f7",
      "access_person": "http://api.remotelock.dev/access_persons/d2e7324f-cfab-4112-b757-4d5a70ab4c67",
      "accessible": "http://api.remotelock.dev/devices/89d11f35-054e-463d-9c72-64ed856ae712"
    }
  }
}

Update an access person's access

Only updating the access schedule is supported. To change the accessible, revoke the access and grant a new one.

Request

Endpoint

PUT /access_persons/:access_person_id/accesses/:id

PUT /access_persons/7942b4d3-1257-4586-bf9a-f93f576380e8/accesses/ea44d2b0-de80-4345-9f6e-5ba5aa3c8af0

Parameters

{
  "attributes": {
    "access_schedule_id": "75ae370c-6a1a-4148-baef-1cfe44c0ce62"
  }
}
Name Description
attributes[access_schedule_id] Access schedule id

Response


200 OK
{
  "data": {
    "type": "access_person_access",
    "attributes": {
      "guest_start_time": null,
      "guest_end_time": null,
      "devices_count": 1,
      "devices_synced_count": 0,
      "devices_pending_sync_count": 1,
      "devices_failed_sync_count": 0,
      "accessible_type": "lock",
      "created_at": "2021-11-04T18:05:33Z",
      "updated_at": "2021-11-04T18:05:33Z",
      "access_schedule_id": "75ae370c-6a1a-4148-baef-1cfe44c0ce62",
      "access_person_id": "7942b4d3-1257-4586-bf9a-f93f576380e8",
      "access_person_type": "access_user",
      "accessible_id": "27f01f2d-0219-4970-948b-fd274fe1c5d8"
    },
    "id": "ea44d2b0-de80-4345-9f6e-5ba5aa3c8af0",
    "links": {
      "self": "http://api.remotelock.dev/access_persons/7942b4d3-1257-4586-bf9a-f93f576380e8/accesses/ea44d2b0-de80-4345-9f6e-5ba5aa3c8af0",
      "access_schedule": "http://api.remotelock.dev/schedules/75ae370c-6a1a-4148-baef-1cfe44c0ce62",
      "access_person": "http://api.remotelock.dev/access_persons/7942b4d3-1257-4586-bf9a-f93f576380e8",
      "accessible": "http://api.remotelock.dev/devices/27f01f2d-0219-4970-948b-fd274fe1c5d8"
    }
  }
}

Revoke an access person's access

Request

Endpoint

DELETE /access_persons/:access_person_id/accesses/:id

DELETE /access_persons/ac374c56-36db-4b51-9b6a-cd1bf080c594/accesses/d944152f-4382-4428-b24d-5bb812773201

Parameters

None.

Response


204 No Content

Accounts

Get current account

Request

Endpoint

GET /account

GET /account

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "account",
    "attributes": {
      "name": "Antonia Boyer",
      "created_at": "2021-11-04T18:05:38Z",
      "updated_at": "2021-11-04T18:05:38Z",
      "default_guest_start_time": "16:00:00",
      "default_guest_end_time": "11:00:00",
      "rental_guest_time_override": false,
      "primary_owner_id": "7ada5a73-75cc-4c6b-a2fb-9a07fec3f69a",
      "owner_role_id": "ae86a293-9a13-47be-bc54-f8e70265ba97"
    },
    "id": "265510a6-ec5e-47f7-bb2b-a08b19d9e1a9",
    "links": {
      "self": "http://api.remotelock.dev/account",
      "primary_owner": "http://api.remotelock.dev/user",
      "owner_role": "http://api.remotelock.dev/roles/ae86a293-9a13-47be-bc54-f8e70265ba97"
    }
  }
}

Update current account

Request

Endpoint

PUT /account

PUT /account

Parameters

{
  "attributes": {
    "default_guest_start_time": "15:30:00",
    "default_guest_end_time": "02:15:00"
  }
}
Name Description
attributes[name] Account Name
attributes[default_guest_start_time] Default Access Guest start time, ISO 8601 24 hour time format, default: "11:00:00"
attributes[default_guest_end_time] Default Access Guest end time, ISO 8601 24 hour time format, default: "23:00:00"

Response


200 OK
{
  "data": {
    "type": "account",
    "attributes": {
      "name": "Mr. Bryan Mills",
      "created_at": "2021-11-04T18:05:40Z",
      "updated_at": "2021-11-04T18:05:41Z",
      "default_guest_start_time": "15:30:00",
      "default_guest_end_time": "02:15:00",
      "rental_guest_time_override": false,
      "primary_owner_id": "be11a829-40bc-4766-85ef-b05c35e6ed3d",
      "owner_role_id": "d2adca3f-b2d9-42ba-b75e-c6c10a5ae92f"
    },
    "id": "abdce020-e064-46f2-bc7b-7214af4e1e6b",
    "links": {
      "self": "http://api.remotelock.dev/account",
      "primary_owner": "http://api.remotelock.dev/user",
      "owner_role": "http://api.remotelock.dev/roles/d2adca3f-b2d9-42ba-b75e-c6c10a5ae92f"
    }
  }
}

Devices

Register an OpenEdge RG/BG/CG (formerly 5i/3i/7i) lock

Request

Endpoint

POST /devices

POST /devices

Parameters

{
  "attributes": {
    "name": "Home Lock",
    "location_id": "687435b9-be6d-4648-b189-bbed697e7f02",
    "serial_number": "AC000W000213429"
  }
}
Name Description
attributes[name] required Name
attributes[serial_number] required Serial number
attributes[model_id] Model
attributes[location_id] required Location

Response


201 Created
{
  "data": {
    "type": "lock",
    "attributes": {
      "name": "Home Lock",
      "heartbeat_interval": 1200,
      "wifi_level": 0,
      "signal_quality": 2,
      "connected": false,
      "alive": true,
      "power_source": "alkaline_battery",
      "connected_at": "2021-11-04T18:07:36Z",
      "serial_number": "AC000W000213429",
      "connectivity_enabled": true,
      "algorithmic_pin_enabled": true,
      "auto_lock": true,
      "auto_lock_timeout": 20,
      "created_at": "2021-11-04T18:08:36Z",
      "default_guest_end_time": null,
      "default_guest_start_time": null,
      "local_pins": [
        "1234"
      ],
      "mac_address": "64:a3:5e:71:9a:e9",
      "manual_auto_lock_timeout": 0,
      "muted": false,
      "nfc": "no_nfc",
      "no_enter_code": false,
      "online_auto_lock": false,
      "power_level": 5,
      "programming_code": "123456",
      "ready_pin_seed": "",
      "state": "unlocked",
      "updated_at": "2021-11-04T18:08:36Z",
      "wake_wifi": "user_action",
      "wifi_enabled": true,
      "model_id": "4e756aab-16d4-472a-918d-dcc2ed8cce33",
      "location_id": "687435b9-be6d-4648-b189-bbed697e7f02"
    },
    "id": "73b695d0-3cb3-421e-bf59-bf17c6570044",
    "links": {
      "self": "http://api.remotelock.dev/devices/73b695d0-3cb3-421e-bf59-bf17c6570044",
      "model": "http://api.remotelock.dev/models/4e756aab-16d4-472a-918d-dcc2ed8cce33",
      "location": "http://api.remotelock.dev/locations/687435b9-be6d-4648-b189-bbed697e7f02"
    }
  }
}

Fields

Name Description
heartbeat_interval Number of seconds between connections.
connected Is the device connected at this moment?
alive Is the device "heartbeating" regularly?
signal_quality Wi-Fi signal quality, values 0 to 4
power_level Battery power level (percentage)
wake_wifi When the lock is synced with the cloud.
auto_lock Automatically lock after an unlock event.
auto_lock_timeout Number of seconds before relocking.
connected_at Time of last successful connection.

Update a lock

Your settings changes might be lost if you make this request before the lock wakes up for the first time - which means you should wait until connected_at has a timestamp before making this request. This is because we request the current lock settings whenever it's registered.

Request

Endpoint

PUT /devices/:id

PUT /devices/b7e524b7-4178-4306-9e2f-c5e565383e6b

Parameters

{
  "attributes": {
    "name": "Backdoor Lock",
    "location_id": "a5cc3e6c-423b-4354-ac40-f7fd5b66c739",
    "default_guest_start_time": "11:15:00",
    "power_source": "alkaline_battery",
    "local_pins": [
      "1234"
    ]
  }
}
Name Description
attributes[name] Name
attributes[serial_number] Device serial number
attributes[programming_code] Programming code
attributes[heartbeat_interval] Heartbeat interval
attributes[wake_wifi] Controls what events cause the lock to sync with the cloud. Can be user_action or heartbeat_interval. Additionally, model LS-5i supports user_action_except_manual, which excludes interaction with the knob.
attributes[muted] Muted
attributes[auto_lock] Auto-lock
attributes[auto_lock_timeout] Auto-lock timeout
attributes[auto_lock_schedule_id] Auto-lock Schedule
attributes[lock_action_schedule_id] Lock Action Schedule
attributes[location_id] Location
attributes[default_guest_start_time] Default Access Guest start time, ISO 8601 24 hour time format
attributes[default_guest_end_time] Default Access Guest end time, ISO 8601 24 hour time format
attributes[power_source] One of hardwire, alkaline_battery, or lithium_battery. This affects the battery level percentage as well as "low battery" notifications.
attributes[local_pins] Array of PINs programmed via the device keypad. This is a "set" operation. Only PIN removal is supported.

Response


200 OK
{
  "data": {
    "type": "lock",
    "attributes": {
      "name": "Backdoor Lock",
      "heartbeat_interval": 1200,
      "wifi_level": 0,
      "signal_quality": 2,
      "connected": true,
      "alive": true,
      "power_source": "alkaline_battery",
      "connected_at": "2021-11-04T18:07:41Z",
      "serial_number": "AC000W003963344",
      "connectivity_enabled": true,
      "algorithmic_pin_enabled": true,
      "auto_lock": true,
      "auto_lock_timeout": 20,
      "created_at": "2021-11-04T18:08:41Z",
      "default_guest_end_time": null,
      "default_guest_start_time": "11:15:00",
      "local_pins": [
        "1234"
      ],
      "mac_address": "12:05:00:8e:10:a5",
      "manual_auto_lock_timeout": 0,
      "muted": false,
      "nfc": "no_nfc",
      "no_enter_code": false,
      "online_auto_lock": false,
      "power_level": 15,
      "programming_code": "123456",
      "ready_pin_seed": "",
      "state": "locked",
      "updated_at": "2021-11-04T18:08:41Z",
      "wake_wifi": "user_action",
      "wifi_enabled": true,
      "model_id": "4009f771-bce8-4f1e-89f1-b6a3671ce059",
      "location_id": "a5cc3e6c-423b-4354-ac40-f7fd5b66c739"
    },
    "id": "b7e524b7-4178-4306-9e2f-c5e565383e6b",
    "links": {
      "self": "http://api.remotelock.dev/devices/b7e524b7-4178-4306-9e2f-c5e565383e6b",
      "model": "http://api.remotelock.dev/models/4009f771-bce8-4f1e-89f1-b6a3671ce059",
      "location": "http://api.remotelock.dev/locations/a5cc3e6c-423b-4354-ac40-f7fd5b66c739"
    }
  }
}

Lock a lock

Request

Endpoint

PUT /devices/:id/lock

PUT /devices/37a0d279-d311-4717-8134-bef4ec799513/lock

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "lock",
    "attributes": {
      "name": "OEMAIN - AC000W007534830",
      "heartbeat_interval": 0,
      "wifi_level": 0,
      "signal_quality": 0,
      "connected": false,
      "alive": false,
      "power_source": "hardwire",
      "connected_at": null,
      "serial_number": "AC000W007534830",
      "connectivity_enabled": false,
      "algorithmic_pin_enabled": false,
      "auto_lock": true,
      "auto_lock_timeout": 0,
      "created_at": "2021-11-04T18:08:43Z",
      "default_guest_end_time": null,
      "default_guest_start_time": null,
      "local_pins": [

      ],
      "mac_address": "",
      "manual_auto_lock_timeout": 0,
      "muted": false,
      "nfc": "no_nfc",
      "no_enter_code": false,
      "online_auto_lock": false,
      "power_level": 0,
      "programming_code": null,
      "ready_pin_seed": "",
      "state": "locked",
      "updated_at": "2021-11-04T18:08:43Z",
      "wake_wifi": "user_action",
      "wifi_enabled": false,
      "model_id": "b4ae801d-cb57-4827-85f7-1212544506cb",
      "location_id": "80be3aef-f059-4132-8a61-70064b730a74"
    },
    "id": "37a0d279-d311-4717-8134-bef4ec799513",
    "links": {
      "self": "http://api.remotelock.dev/devices/37a0d279-d311-4717-8134-bef4ec799513",
      "model": "http://api.remotelock.dev/models/b4ae801d-cb57-4827-85f7-1212544506cb",
      "location": "http://api.remotelock.dev/locations/80be3aef-f059-4132-8a61-70064b730a74"
    }
  }
}

Unlock a lock

Request

Endpoint

PUT /devices/:id/unlock

PUT /devices/0b6138d5-c032-4a36-bac7-7a3013b55212/unlock

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "lock",
    "attributes": {
      "name": "OEMAIN - AC000W001736702",
      "heartbeat_interval": 0,
      "wifi_level": 0,
      "signal_quality": 0,
      "connected": false,
      "alive": false,
      "power_source": "hardwire",
      "connected_at": null,
      "serial_number": "AC000W001736702",
      "connectivity_enabled": false,
      "algorithmic_pin_enabled": false,
      "auto_lock": true,
      "auto_lock_timeout": 0,
      "created_at": "2021-11-04T18:08:45Z",
      "default_guest_end_time": null,
      "default_guest_start_time": null,
      "local_pins": [

      ],
      "mac_address": "",
      "manual_auto_lock_timeout": 0,
      "muted": false,
      "nfc": "no_nfc",
      "no_enter_code": false,
      "online_auto_lock": false,
      "power_level": 0,
      "programming_code": null,
      "ready_pin_seed": "",
      "state": "unlocked",
      "updated_at": "2021-11-04T18:08:45Z",
      "wake_wifi": "user_action",
      "wifi_enabled": false,
      "model_id": "3a0e18d1-c792-4166-9deb-0c06c946d712",
      "location_id": "ca9ed0e8-f3d9-42f1-8fb5-bf7ca6401af7"
    },
    "id": "0b6138d5-c032-4a36-bac7-7a3013b55212",
    "links": {
      "self": "http://api.remotelock.dev/devices/0b6138d5-c032-4a36-bac7-7a3013b55212",
      "model": "http://api.remotelock.dev/models/3a0e18d1-c792-4166-9deb-0c06c946d712",
      "location": "http://api.remotelock.dev/locations/ca9ed0e8-f3d9-42f1-8fb5-bf7ca6401af7"
    }
  }
}

Access person accesses of a lock

Request

Endpoint

GET /devices/:id/access_person_accesses

GET /devices/28a5c6f7-4ffb-4883-9f3c-cefbcdb392c8/access_person_accesses?attributes[access_person_type]=access_user

Parameters

attributes: {"access_person_type"=>"access_user"}
Name Description
attributes[access_person_type] Filter by type(s). Supported types: access_user and access_guest

Response


200 OK
{
  "data": [
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "location",
        "created_at": "2021-11-04T18:08:46Z",
        "updated_at": "2021-11-04T18:08:46Z",
        "access_person_id": "019b6f54-145f-4883-9f25-679cd9efb735",
        "access_person_type": "access_user",
        "accessible_id": "059fa33f-30eb-46c2-aa13-837e1a3fbd91"
      },
      "id": "a3bf235e-afe7-4fc7-909f-069e913b69fc",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/019b6f54-145f-4883-9f25-679cd9efb735/accesses/a3bf235e-afe7-4fc7-909f-069e913b69fc",
        "access_person": "http://api.remotelock.dev/access_persons/019b6f54-145f-4883-9f25-679cd9efb735",
        "accessible": "http://api.remotelock.dev/locations/059fa33f-30eb-46c2-aa13-837e1a3fbd91"
      }
    },
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "lock",
        "created_at": "2021-11-04T18:08:46Z",
        "updated_at": "2021-11-04T18:08:46Z",
        "access_person_id": "9aa9dcf2-0366-48c0-bcf3-bec404051f95",
        "access_person_type": "access_user",
        "accessible_id": "28a5c6f7-4ffb-4883-9f3c-cefbcdb392c8"
      },
      "id": "99ea9bf0-7e6f-435a-8b79-f65bf1a72dbd",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/9aa9dcf2-0366-48c0-bcf3-bec404051f95/accesses/99ea9bf0-7e6f-435a-8b79-f65bf1a72dbd",
        "access_person": "http://api.remotelock.dev/access_persons/9aa9dcf2-0366-48c0-bcf3-bec404051f95",
        "accessible": "http://api.remotelock.dev/devices/28a5c6f7-4ffb-4883-9f3c-cefbcdb392c8"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Accesses of a lock

Request

Endpoint

GET /devices/:id/accesses

GET /devices/b3ca05f2-a9e6-41b2-8f4a-deb2791c5488/accesses

Parameters

Name Description
attributes[access_person_type] Filter by type(s). Supported types: access_user and access_guest

Response


200 OK
{
  "data": [
    {
      "type": "kore_ready_pin",
      "attributes": {
        "uuid": "4ffbd39a-3bd3-4aa2-9e00-04ad2460259b",
        "name": "Ivana Wolff",
        "email": "karen@sporer.org",
        "starts_at": "2021-11-04T00:00:00",
        "ends_at": "2021-11-06T00:00:00",
        "status": "current",
        "source": null,
        "created_at": "2021-11-04T18:08:47Z",
        "updated_at": "2021-11-04T18:08:47Z",
        "pin": "8422753515",
        "associated_lock_has_connectivity_enabled": true,
        "lock_id": "b3ca05f2-a9e6-41b2-8f4a-deb2791c5488"
      },
      "id": "4ffbd39a-3bd3-4aa2-9e00-04ad2460259b",
      "links": {
        "self": "http://api.remotelock.dev/kore_ready_pins/4ffbd39a-3bd3-4aa2-9e00-04ad2460259b",
        "lock": "http://api.remotelock.dev/devices/b3ca05f2-a9e6-41b2-8f4a-deb2791c5488"
      }
    },
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "lock",
        "created_at": "2021-11-04T18:08:47Z",
        "updated_at": "2021-11-04T18:08:47Z",
        "accessible_name": "OEMAIN - AC000W004898996",
        "access_schedule_name": null,
        "access_person_id": "c33c44e7-fdd7-45a8-91b1-33da352f2ccb",
        "access_person_type": "access_guest",
        "accessible_id": "b3ca05f2-a9e6-41b2-8f4a-deb2791c5488"
      },
      "id": "f227d193-7205-4edd-84b6-cedcb5f76e07",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/c33c44e7-fdd7-45a8-91b1-33da352f2ccb/accesses/f227d193-7205-4edd-84b6-cedcb5f76e07",
        "access_person": "http://api.remotelock.dev/access_persons/c33c44e7-fdd7-45a8-91b1-33da352f2ccb",
        "accessible": "http://api.remotelock.dev/devices/b3ca05f2-a9e6-41b2-8f4a-deb2791c5488"
      }
    },
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "lock",
        "created_at": "2021-11-04T18:08:47Z",
        "updated_at": "2021-11-04T18:08:47Z",
        "accessible_name": "OEMAIN - AC000W004898996",
        "access_schedule_name": null,
        "access_person_id": "cd4149d9-76f4-4281-9c64-091f529ad0d3",
        "access_person_type": "access_user",
        "accessible_id": "b3ca05f2-a9e6-41b2-8f4a-deb2791c5488"
      },
      "id": "ba6cef3c-73ba-4192-bd26-99a1df728be2",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/cd4149d9-76f4-4281-9c64-091f529ad0d3/accesses/ba6cef3c-73ba-4192-bd26-99a1df728be2",
        "access_person": "http://api.remotelock.dev/access_persons/cd4149d9-76f4-4281-9c64-091f529ad0d3",
        "accessible": "http://api.remotelock.dev/devices/b3ca05f2-a9e6-41b2-8f4a-deb2791c5488"
      }
    },
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "location",
        "created_at": "2021-11-04T18:08:47Z",
        "updated_at": "2021-11-04T18:08:47Z",
        "accessible_name": "Enterprise-wide client-server complexity",
        "access_schedule_name": null,
        "access_person_id": "eb28b3f5-b0dc-416c-a1c8-40648f8602ec",
        "access_person_type": "access_user",
        "accessible_id": "c912fb95-b930-4b84-bf8c-08d8d1c072a4"
      },
      "id": "a9d7f99d-ad31-4520-b18a-3008d742f671",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/eb28b3f5-b0dc-416c-a1c8-40648f8602ec/accesses/a9d7f99d-ad31-4520-b18a-3008d742f671",
        "access_person": "http://api.remotelock.dev/access_persons/eb28b3f5-b0dc-416c-a1c8-40648f8602ec",
        "accessible": "http://api.remotelock.dev/locations/c912fb95-b930-4b84-bf8c-08d8d1c072a4"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 4,
    "total_pages": 1
  }
}

Update a Schlage Home lock

Request

Endpoint

PUT /devices/:id

PUT /devices/80ada2d0-59ce-4c10-a49e-f33c639f0115

Parameters

{
  "attributes": {
    "name": "East door",
    "location_id": "c53c4f0e-c954-48da-bcad-189efed5e8ef"
  }
}
Name Description
attributes[name] Name
attributes[location_id] Location ID

Response


200 OK
{
  "data": {
    "type": "schlage_home_lock",
    "attributes": {
      "connectivity_enabled": true,
      "name": "East door",
      "state": "locked",
      "alive": true,
      "connected": true,
      "connected_at": "2021-11-04T18:06:52Z",
      "power_level": 90,
      "integration_status": "connected",
      "integration_id": "d00fd02f-5ac9-471a-89ec-11bbc7eaa9d9",
      "created_at": "2021-11-04T18:08:51Z",
      "updated_at": "2021-11-04T18:08:52Z",
      "serial_number": "3100003251782951",
      "location_id": "c53c4f0e-c954-48da-bcad-189efed5e8ef",
      "model_id": "b35fccc0-f511-49ae-8955-c6694e28b420"
    },
    "id": "80ada2d0-59ce-4c10-a49e-f33c639f0115",
    "links": {
      "self": "http://api.remotelock.dev/devices/80ada2d0-59ce-4c10-a49e-f33c639f0115",
      "location": "http://api.remotelock.dev/locations/c53c4f0e-c954-48da-bcad-189efed5e8ef",
      "model": "http://api.remotelock.dev/models/b35fccc0-f511-49ae-8955-c6694e28b420"
    }
  }
}

Lock a Schlage Home lock

Request

Endpoint

PUT /devices/:id/lock

PUT /devices/fddef8eb-f73e-44f5-aff6-f082650bb18c/lock

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "schlage_home_lock",
    "attributes": {
      "connectivity_enabled": true,
      "name": "loft",
      "state": "locked",
      "alive": true,
      "connected": true,
      "connected_at": "2021-11-04T18:04:52Z",
      "power_level": 90,
      "integration_status": "connected",
      "integration_id": "4c71acb7-0585-44c5-a65e-0b963f14d62f",
      "created_at": "2021-11-04T18:08:52Z",
      "updated_at": "2021-11-04T18:08:52Z",
      "serial_number": "3100003251782951",
      "location_id": "8d6f4b21-486e-4de7-8455-19ada5a66ea9",
      "model_id": "53e151ba-a7fa-417d-9a44-9ccb091cca60"
    },
    "id": "fddef8eb-f73e-44f5-aff6-f082650bb18c",
    "links": {
      "self": "http://api.remotelock.dev/devices/fddef8eb-f73e-44f5-aff6-f082650bb18c",
      "location": "http://api.remotelock.dev/locations/8d6f4b21-486e-4de7-8455-19ada5a66ea9",
      "model": "http://api.remotelock.dev/models/53e151ba-a7fa-417d-9a44-9ccb091cca60"
    }
  }
}

Unlock a Schlage Home lock

Request

Endpoint

PUT /devices/:id/unlock

PUT /devices/d9d3c4d7-988f-4f3d-8539-b311cba2954c/unlock

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "schlage_home_lock",
    "attributes": {
      "connectivity_enabled": true,
      "name": "ensuite bathroom",
      "state": "locked",
      "alive": true,
      "connected": true,
      "connected_at": "2021-11-04T17:58:53Z",
      "power_level": 90,
      "integration_status": "connected",
      "integration_id": "ee564aec-99c4-429f-ab2a-d66325bbc332",
      "created_at": "2021-11-04T18:08:53Z",
      "updated_at": "2021-11-04T18:08:53Z",
      "serial_number": "3100003251782951",
      "location_id": "abc4534c-53be-4f14-8aa7-ba161bbe6696",
      "model_id": "53214f54-24f5-4ad2-8c38-e72fe6178a9d"
    },
    "id": "d9d3c4d7-988f-4f3d-8539-b311cba2954c",
    "links": {
      "self": "http://api.remotelock.dev/devices/d9d3c4d7-988f-4f3d-8539-b311cba2954c",
      "location": "http://api.remotelock.dev/locations/abc4534c-53be-4f14-8aa7-ba161bbe6696",
      "model": "http://api.remotelock.dev/models/53214f54-24f5-4ad2-8c38-e72fe6178a9d"
    }
  }
}

Access person accesses of a Schlage Home lock

Request

Endpoint

GET /devices/:id/access_person_accesses

GET /devices/9bdbeb01-9d4c-48e9-aedb-5e6efa2e2a7a/access_person_accesses?attributes[access_person_type]=access_user

Parameters

attributes: {"access_person_type"=>"access_user"}
Name Description
attributes[access_person_type] Filter by type(s). Supported types: access_user and access_guest

Response


200 OK
{
  "data": [
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "location",
        "created_at": "2021-11-04T18:08:53Z",
        "updated_at": "2021-11-04T18:08:53Z",
        "access_person_id": "a94b4795-d570-4dca-8657-b2e317a3e640",
        "access_person_type": "access_user",
        "accessible_id": "37a4e707-786f-44ec-a71d-908bfdfc744d"
      },
      "id": "1bb6ba71-c12e-4641-8790-5ff0e77fb218",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/a94b4795-d570-4dca-8657-b2e317a3e640/accesses/1bb6ba71-c12e-4641-8790-5ff0e77fb218",
        "access_person": "http://api.remotelock.dev/access_persons/a94b4795-d570-4dca-8657-b2e317a3e640",
        "accessible": "http://api.remotelock.dev/locations/37a4e707-786f-44ec-a71d-908bfdfc744d"
      }
    },
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "schlage_home_lock",
        "created_at": "2021-11-04T18:08:53Z",
        "updated_at": "2021-11-04T18:08:53Z",
        "access_person_id": "01dce4d4-bf88-4f8f-896e-eed0b669a306",
        "access_person_type": "access_user",
        "accessible_id": "9bdbeb01-9d4c-48e9-aedb-5e6efa2e2a7a"
      },
      "id": "604967d0-6ce5-4550-b8ef-08ebbbe48b1c",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/01dce4d4-bf88-4f8f-896e-eed0b669a306/accesses/604967d0-6ce5-4550-b8ef-08ebbbe48b1c",
        "access_person": "http://api.remotelock.dev/access_persons/01dce4d4-bf88-4f8f-896e-eed0b669a306",
        "accessible": "http://api.remotelock.dev/devices/9bdbeb01-9d4c-48e9-aedb-5e6efa2e2a7a"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Update a ZWave lock

Request

Endpoint

PUT /devices/:id

PUT /devices/b0be5cbb-d8ed-4454-8938-7b02e90ad5a2

Parameters

{
  "attributes": {
    "name": "East door"
  }
}
Name Description
attributes[name] Name

Response


200 OK
{
  "data": {
    "type": "zwave_lock",
    "attributes": {
      "connectivity_enabled": true,
      "name": "East door",
      "state": "locked",
      "connected": false,
      "power_level": 0,
      "protocol": "",
      "created_at": "2021-11-04T18:08:55Z",
      "updated_at": "2021-11-04T18:08:55Z",
      "location_id": "bcc63577-f3cb-4238-9a85-4fc3c8defe52",
      "model_id": "f9d3d817-0ab0-46ce-a7e2-40a364037a26"
    },
    "id": "b0be5cbb-d8ed-4454-8938-7b02e90ad5a2",
    "links": {
      "self": "http://api.remotelock.dev/devices/b0be5cbb-d8ed-4454-8938-7b02e90ad5a2",
      "location": "http://api.remotelock.dev/locations/bcc63577-f3cb-4238-9a85-4fc3c8defe52",
      "model": "http://api.remotelock.dev/models/f9d3d817-0ab0-46ce-a7e2-40a364037a26"
    }
  }
}

Lock a ZWave lock

Request

Endpoint

PUT /devices/:id/lock

PUT /devices/0cb7ba35-32d7-4ecc-978a-d87b4ed7db52/lock

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "zwave_lock",
    "attributes": {
      "connectivity_enabled": true,
      "name": "GFM",
      "state": "locked",
      "connected": false,
      "power_level": 0,
      "protocol": "",
      "created_at": "2021-11-04T18:08:56Z",
      "updated_at": "2021-11-04T18:08:56Z",
      "location_id": "9c10347a-ceb3-4633-80de-62803962c258",
      "model_id": "a015631c-7bab-4064-ba93-a9de7aa75086"
    },
    "id": "0cb7ba35-32d7-4ecc-978a-d87b4ed7db52",
    "links": {
      "self": "http://api.remotelock.dev/devices/0cb7ba35-32d7-4ecc-978a-d87b4ed7db52",
      "location": "http://api.remotelock.dev/locations/9c10347a-ceb3-4633-80de-62803962c258",
      "model": "http://api.remotelock.dev/models/a015631c-7bab-4064-ba93-a9de7aa75086"
    }
  }
}

Unlock a ZWave lock

Request

Endpoint

PUT /devices/:id/unlock

PUT /devices/4595a005-b68e-4537-aa87-d088c75b5753/unlock

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "zwave_lock",
    "attributes": {
      "connectivity_enabled": true,
      "name": "GEI",
      "state": "unlocked",
      "connected": false,
      "power_level": 0,
      "protocol": "",
      "created_at": "2021-11-04T18:08:56Z",
      "updated_at": "2021-11-04T18:08:56Z",
      "location_id": "96c36286-fc2b-46c7-bc0e-7fb0cb3512d2",
      "model_id": "d5cf4dab-953d-49b9-b39d-a0170c2414d5"
    },
    "id": "4595a005-b68e-4537-aa87-d088c75b5753",
    "links": {
      "self": "http://api.remotelock.dev/devices/4595a005-b68e-4537-aa87-d088c75b5753",
      "location": "http://api.remotelock.dev/locations/96c36286-fc2b-46c7-bc0e-7fb0cb3512d2",
      "model": "http://api.remotelock.dev/models/d5cf4dab-953d-49b9-b39d-a0170c2414d5"
    }
  }
}

Access person accesses of a ZWave lock

Request

Endpoint

GET /devices/:id/access_person_accesses

GET /devices/d6571644-4631-4084-8ff4-00fd7847a21b/access_person_accesses?attributes[access_person_type]=access_user

Parameters

attributes: {"access_person_type"=>"access_user"}
Name Description
attributes[access_person_type] Filter by type(s). Supported types: access_user and access_guest

Response


200 OK
{
  "data": [
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "location",
        "created_at": "2021-11-04T18:08:57Z",
        "updated_at": "2021-11-04T18:08:57Z",
        "access_person_id": "c9d6b9e9-f8d8-4ca5-9c0b-35b462fc3404",
        "access_person_type": "access_user",
        "accessible_id": "bb0c7a42-552f-4573-9868-3272f1bdd7e9"
      },
      "id": "75a2fa10-fc63-45da-a35b-736f71dfb300",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/c9d6b9e9-f8d8-4ca5-9c0b-35b462fc3404/accesses/75a2fa10-fc63-45da-a35b-736f71dfb300",
        "access_person": "http://api.remotelock.dev/access_persons/c9d6b9e9-f8d8-4ca5-9c0b-35b462fc3404",
        "accessible": "http://api.remotelock.dev/locations/bb0c7a42-552f-4573-9868-3272f1bdd7e9"
      }
    },
    {
      "type": "access_person_access",
      "attributes": {
        "guest_start_time": null,
        "guest_end_time": null,
        "devices_count": 0,
        "devices_synced_count": 0,
        "devices_pending_sync_count": 0,
        "devices_failed_sync_count": 0,
        "accessible_type": "zwave_lock",
        "created_at": "2021-11-04T18:08:57Z",
        "updated_at": "2021-11-04T18:08:57Z",
        "access_person_id": "9740f989-92b1-4b9a-86ae-a9a9ed7644cd",
        "access_person_type": "access_user",
        "accessible_id": "d6571644-4631-4084-8ff4-00fd7847a21b"
      },
      "id": "57ad5b41-62c7-4b3e-a18c-2d740cb3b0a4",
      "links": {
        "self": "http://api.remotelock.dev/access_persons/9740f989-92b1-4b9a-86ae-a9a9ed7644cd/accesses/57ad5b41-62c7-4b3e-a18c-2d740cb3b0a4",
        "access_person": "http://api.remotelock.dev/access_persons/9740f989-92b1-4b9a-86ae-a9a9ed7644cd",
        "accessible": "http://api.remotelock.dev/devices/d6571644-4631-4084-8ff4-00fd7847a21b"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Get all devices

Returns all device types (homogeneous).

Request

Endpoint

GET /devices

GET /devices

Parameters

Name Description
sort Sortable attributes: created_at and name, default: created_at ascending
[type] Filter by type(s). Supported types: acs_door, acs_elevator_floor, lock, thermostat, power_plug, zwave_lock, schlage_home_lock, acs_elevator, resort_lock, and igloo_lock

Response


200 OK
{
  "data": [
    {
      "type": "lock",
      "attributes": {
        "name": "LS-6i - AC000W006817824",
        "heartbeat_interval": 1200,
        "wifi_level": 0,
        "signal_quality": 2,
        "connected": true,
        "alive": true,
        "power_source": "alkaline_battery",
        "connected_at": "2021-11-04T18:03:59Z",
        "serial_number": "AC000W006817824",
        "connectivity_enabled": true,
        "algorithmic_pin_enabled": true,
        "auto_lock": true,
        "auto_lock_timeout": 20,
        "created_at": "2021-11-04T18:08:58Z",
        "default_guest_end_time": null,
        "default_guest_start_time": null,
        "local_pins": [
          "1234"
        ],
        "mac_address": "c2:72:54:95:76:e2",
        "manual_auto_lock_timeout": 0,
        "muted": false,
        "nfc": "no_nfc",
        "no_enter_code": false,
        "online_auto_lock": false,
        "power_level": 15,
        "programming_code": "123456",
        "ready_pin_seed": "",
        "state": "unlocked",
        "updated_at": "2021-11-04T18:08:58Z",
        "wake_wifi": "user_action",
        "wifi_enabled": true,
        "model_id": "36512374-e6ee-4518-a58c-413800319ccd",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711",
        "lock_action_schedule_id": "5236893c-7924-4265-91e1-0e5f7ddbeaa9"
      },
      "id": "20582de2-393f-4bd4-946a-eabda8ba178b",
      "links": {
        "self": "http://api.remotelock.dev/devices/20582de2-393f-4bd4-946a-eabda8ba178b",
        "model": "http://api.remotelock.dev/models/36512374-e6ee-4518-a58c-413800319ccd",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711",
        "lock_action_schedule": "http://api.remotelock.dev/schedules/5236893c-7924-4265-91e1-0e5f7ddbeaa9"
      }
    },
    {
      "type": "thermostat",
      "attributes": {
        "name": "LS-60i - 001DC9A04XNQ",
        "heartbeat_interval": 1200,
        "wifi_level": 0,
        "signal_quality": 1,
        "connected": false,
        "alive": true,
        "power_source": "hardwire",
        "connected_at": "2021-11-04T18:04:59Z",
        "serial_number": "001DC9A04XNQ",
        "connectivity_enabled": true,
        "current_mode": "cool",
        "target_mode": "auto",
        "fan_mode": "auto",
        "hold": false,
        "temperature": 77.0,
        "target_temperature": 75.5,
        "unit": "F",
        "humidity": 45,
        "energy_saver": true,
        "scheduled_target_temperature": 80.0,
        "desired_target_temperature": 75.5,
        "created_at": "2021-11-04T18:08:58Z",
        "updated_at": "2021-11-04T18:08:58Z",
        "model_id": "a8e9c5bc-7161-48d9-911b-6eabbc16893b",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711",
        "thermostat_schedule_id": "39cd3c69-dc59-4b72-ae52-784216a2f25f"
      },
      "id": "91be5bf6-1a07-4928-9aa1-0e3f4a795567",
      "links": {
        "self": "http://api.remotelock.dev/devices/91be5bf6-1a07-4928-9aa1-0e3f4a795567",
        "model": "http://api.remotelock.dev/models/a8e9c5bc-7161-48d9-911b-6eabbc16893b",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711",
        "thermostat_schedule": "http://api.remotelock.dev/schedules/39cd3c69-dc59-4b72-ae52-784216a2f25f"
      },
      "meta": {
        "restricted_actions": [
          "replace"
        ]
      }
    },
    {
      "type": "lock",
      "attributes": {
        "connectivity_enabled": true,
        "name": "August - L2FQ5908CC",
        "serial_number": "L2FQ5908CC",
        "state": "locked",
        "alive": true,
        "connected": true,
        "connected_at": "2021-11-04T18:08:59.000Z",
        "power_level": 90,
        "signal_quality": 3,
        "default_guest_start_time": null,
        "default_guest_end_time": null,
        "created_at": "2021-11-04T18:08:58Z",
        "updated_at": "2021-11-04T18:08:58Z",
        "model_id": "0858fc87-e93c-4f8d-afca-23ae39fc220e",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711"
      },
      "id": "497d54ad-979c-40a1-baed-f915f85c4262",
      "links": {
        "self": "http://api.remotelock.dev/devices/497d54ad-979c-40a1-baed-f915f85c4262",
        "model": "http://api.remotelock.dev/models/0858fc87-e93c-4f8d-afca-23ae39fc220e",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711"
      }
    },
    {
      "type": "lock",
      "attributes": {
        "name": "LS-DB500i - 20F85E00NIOH",
        "heartbeat_interval": 1200,
        "wifi_level": 0,
        "signal_quality": 2,
        "connected": true,
        "alive": true,
        "power_source": "alkaline_battery",
        "connected_at": "2021-11-04T18:03:59Z",
        "serial_number": "20F85E00NIOH",
        "connectivity_enabled": true,
        "algorithmic_pin_enabled": true,
        "auto_lock": true,
        "auto_lock_timeout": 20,
        "created_at": "2021-11-04T18:08:58Z",
        "default_guest_end_time": null,
        "default_guest_start_time": null,
        "local_pins": [
          "1234"
        ],
        "mac_address": "03:11:ee:37:6e:6d",
        "manual_auto_lock_timeout": 0,
        "muted": false,
        "nfc": "no_nfc",
        "no_enter_code": false,
        "online_auto_lock": false,
        "power_level": 5,
        "programming_code": "123456",
        "ready_pin_seed": "",
        "state": "unlocked",
        "updated_at": "2021-11-04T18:08:58Z",
        "wake_wifi": "user_action",
        "wifi_enabled": true,
        "model_id": "9d0c24b6-d0fe-47ab-a056-c6e754c66308",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711"
      },
      "id": "3c8594ab-f0a9-44c3-b3ec-8e33f89780f2",
      "links": {
        "self": "http://api.remotelock.dev/devices/3c8594ab-f0a9-44c3-b3ec-8e33f89780f2",
        "model": "http://api.remotelock.dev/models/9d0c24b6-d0fe-47ab-a056-c6e754c66308",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711"
      },
      "meta": {
        "restricted_actions": [
          "replace"
        ]
      }
    },
    {
      "type": "resort_lock",
      "attributes": {
        "name": "RL-4000 - SCTUHQTH0B4FBE01",
        "default_guest_start_time": null,
        "default_guest_end_time": null,
        "created_at": "2021-11-04T18:08:58Z",
        "updated_at": "2021-11-04T18:08:58Z",
        "serial_number": "SCTUHQTH0B4FBE01",
        "model_id": "6a034a87-c04e-45bc-95c8-1a4979907f7d",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711"
      },
      "id": "659a9d56-6248-480c-93e7-f37c2fb540dc",
      "links": {
        "self": "http://api.remotelock.dev/devices/659a9d56-6248-480c-93e7-f37c2fb540dc",
        "model": "http://api.remotelock.dev/models/6a034a87-c04e-45bc-95c8-1a4979907f7d",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711"
      }
    },
    {
      "type": "power_plug",
      "attributes": {
        "name": "LS-P50i - 20F85EAY078D",
        "heartbeat_interval": 1200,
        "wifi_level": 0,
        "signal_quality": 3,
        "connected": true,
        "alive": true,
        "power_source": "hardwire",
        "connected_at": "2021-11-04T18:04:59Z",
        "serial_number": "20F85EAY078D",
        "connectivity_enabled": true,
        "on": true,
        "voltage": 120.0,
        "power": 4.5,
        "power_factor": 0.57,
        "current": 0.06,
        "frequency": 59.95,
        "total_power": 8.75,
        "occupied": true,
        "model_id": "1bc04a33-6188-41a4-9ec0-ce9ebf232a1e",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711",
        "power_plug_schedule_id": "99daf5db-9dd1-47f7-a59a-93a8f21ffd3b"
      },
      "id": "1faf3718-b34e-4b1b-a724-07cf5e48614d",
      "links": {
        "self": "http://api.remotelock.dev/devices/1faf3718-b34e-4b1b-a724-07cf5e48614d",
        "model": "http://api.remotelock.dev/models/1bc04a33-6188-41a4-9ec0-ce9ebf232a1e",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711",
        "power_plug_schedule": "http://api.remotelock.dev/schedules/99daf5db-9dd1-47f7-a59a-93a8f21ffd3b"
      },
      "meta": {
        "restricted_actions": [
          "replace"
        ]
      }
    },
    {
      "type": "acs_door",
      "attributes": {
        "connectivity_enabled": true,
        "name": "Beauty",
        "state": "locked",
        "connected": true,
        "created_at": "2021-11-04T18:08:58Z",
        "updated_at": "2021-11-04T18:08:58Z",
        "model_id": "88c7102b-5cde-4d97-8309-32531e1aa6f9",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711"
      },
      "id": "cac58b10-70fb-4a11-9a4f-73e5ea94235c",
      "links": {
        "self": "http://api.remotelock.dev/devices/cac58b10-70fb-4a11-9a4f-73e5ea94235c",
        "model": "http://api.remotelock.dev/models/88c7102b-5cde-4d97-8309-32531e1aa6f9",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711"
      }
    },
    {
      "type": "zwave_lock",
      "attributes": {
        "connectivity_enabled": true,
        "name": "XDY",
        "state": "locked",
        "connected": true,
        "power_level": 50,
        "protocol": "",
        "created_at": "2021-11-04T18:08:58Z",
        "updated_at": "2021-11-04T18:08:58Z",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711",
        "model_id": "ad4946c2-f610-4439-ba07-105ceac0c75b"
      },
      "id": "8f1d722f-5956-46e3-a9ba-2825941e3d08",
      "links": {
        "self": "http://api.remotelock.dev/devices/8f1d722f-5956-46e3-a9ba-2825941e3d08",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711",
        "model": "http://api.remotelock.dev/models/ad4946c2-f610-4439-ba07-105ceac0c75b"
      }
    },
    {
      "type": "igloo_lock",
      "attributes": {
        "name": "hallway",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711",
        "model_id": "652771a5-8479-4869-b43a-f96634bbe8c5"
      },
      "id": "86e66654-a0bb-4e41-9e20-4f3f74146e70",
      "links": {
        "self": "http://api.remotelock.dev/devices/86e66654-a0bb-4e41-9e20-4f3f74146e70",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711",
        "model": "http://api.remotelock.dev/models/652771a5-8479-4869-b43a-f96634bbe8c5"
      }
    },
    {
      "type": "schlage_home_lock",
      "attributes": {
        "connectivity_enabled": true,
        "name": "kitchen",
        "state": "locked",
        "alive": true,
        "connected": true,
        "connected_at": "2021-11-04T17:59:59Z",
        "power_level": 90,
        "integration_status": "connected",
        "integration_id": "56fbfc66-65db-43b0-9a7c-004737c3a228",
        "created_at": "2021-11-04T18:08:59Z",
        "updated_at": "2021-11-04T18:08:59Z",
        "serial_number": "3100003251782951",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711",
        "model_id": "f2a00d4c-b348-42f9-8b2c-efca7f029370"
      },
      "id": "0cd30d61-19af-4fa3-a662-db298080a6c2",
      "links": {
        "self": "http://api.remotelock.dev/devices/0cd30d61-19af-4fa3-a662-db298080a6c2",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711",
        "model": "http://api.remotelock.dev/models/f2a00d4c-b348-42f9-8b2c-efca7f029370"
      }
    },
    {
      "type": "acs_elevator_floor",
      "attributes": {
        "connectivity_enabled": true,
        "name": "Games",
        "state": "locked",
        "number": 17,
        "created_at": "2021-11-04T18:08:59Z",
        "updated_at": "2021-11-04T18:08:59Z",
        "connected": true,
        "model_id": "e06cc766-f062-4e9e-bee0-5d7a29160b8f",
        "location_id": "de94f12f-7f17-4066-8a21-19dd6718e711",
        "elevator_id": "3d190000-ad68-47c4-9171-0d26b79e6111"
      },
      "id": "2e19fa6e-490f-4616-9644-67d5cfd04733",
      "links": {
        "self": "http://api.remotelock.dev/devices/2e19fa6e-490f-4616-9644-67d5cfd04733",
        "model": "http://api.remotelock.dev/models/e06cc766-f062-4e9e-bee0-5d7a29160b8f",
        "location": "http://api.remotelock.dev/locations/de94f12f-7f17-4066-8a21-19dd6718e711",
        "elevator": "http://api.remotelock.dev/devices/3d190000-ad68-47c4-9171-0d26b79e6111"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 11,
    "total_pages": 1
  }
}

Get a device

Request

Endpoint

GET /devices/:id

GET /devices/d369257b-b3c1-4375-a537-f17f8c7620bd

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "lock",
    "attributes": {
      "name": "LS-6i - AC000W008666132",
      "heartbeat_interval": 1200,
      "wifi_level": 0,
      "signal_quality": 0,
      "connected": true,
      "alive": true,
      "power_source": "alkaline_battery",
      "connected_at": "2021-11-04T18:09:16Z",
      "serial_number": "AC000W008666132",
      "connectivity_enabled": true,
      "algorithmic_pin_enabled": true,
      "auto_lock": true,
      "auto_lock_timeout": 20,
      "created_at": "2021-11-04T18:09:16Z",
      "default_guest_end_time": null,
      "default_guest_start_time": null,
      "local_pins": [
        "1234"
      ],
      "mac_address": "b6:8c:24:b5:04:e7",
      "manual_auto_lock_timeout": 0,
      "muted": false,
      "nfc": "no_nfc",
      "no_enter_code": false,
      "online_auto_lock": false,
      "power_level": 50,
      "programming_code": "123456",
      "ready_pin_seed": "",
      "state": "unlocked",
      "updated_at": "2021-11-04T18:09:16Z",
      "wake_wifi": "user_action",
      "wifi_enabled": true,
      "model_id": "ae8c57b3-d44b-4d36-94a2-f60aaabee966",
      "location_id": "588537f7-1e6f-4d7d-a7bf-c86ee2d7a61c",
      "lock_action_schedule_id": "3abd069d-7736-41f7-b7ac-6494098f6570"
    },
    "id": "d369257b-b3c1-4375-a537-f17f8c7620bd",
    "links": {
      "self": "http://api.remotelock.dev/devices/d369257b-b3c1-4375-a537-f17f8c7620bd",
      "model": "http://api.remotelock.dev/models/ae8c57b3-d44b-4d36-94a2-f60aaabee966",
      "location": "http://api.remotelock.dev/locations/588537f7-1e6f-4d7d-a7bf-c86ee2d7a61c",
      "lock_action_schedule": "http://api.remotelock.dev/schedules/3abd069d-7736-41f7-b7ac-6494098f6570"
    }
  }
}

Temporarily unlock a Device

Temporarily unlocks a lock. Supported device API types: acs_door.

Request

Endpoint

PUT /devices/:id/temporary_unlock

PUT /devices/60715638-8c30-48be-ad39-dbbb09a671b2/temporary_unlock

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "acs_door",
    "attributes": {
      "connectivity_enabled": true,
      "name": "Industrial & Health",
      "state": "unlocked",
      "connected": false,
      "created_at": "2021-11-04T18:09:17Z",
      "updated_at": "2021-11-04T18:09:17Z",
      "model_id": "ec8e4854-c003-4d24-93f5-519677b9e5e6",
      "location_id": "966d6856-0a86-4601-ba52-66d1b45c5f8e"
    },
    "id": "60715638-8c30-48be-ad39-dbbb09a671b2",
    "links": {
      "self": "http://api.remotelock.dev/devices/60715638-8c30-48be-ad39-dbbb09a671b2",
      "model": "http://api.remotelock.dev/models/ec8e4854-c003-4d24-93f5-519677b9e5e6",
      "location": "http://api.remotelock.dev/locations/966d6856-0a86-4601-ba52-66d1b45c5f8e"
    }
  }
}

Replace the device

Request

Endpoint

PUT /devices/:id/replace

PUT /devices/6085fc07-f519-4e6f-ba18-65c29a390d37/replace

Parameters

{
  "attributes": {
    "serial_number": "20F85E123456"
  }
}
Name Description
attributes[serial_number] required New serial number
attributes[model_id] New model of same type as the current device

Response


200 OK
{
  "data": {
    "type": "lock",
    "attributes": {
      "name": "LS-6i - AC000W009955532",
      "heartbeat_interval": 1200,
      "wifi_level": 0,
      "signal_quality": 4,
      "connected": true,
      "alive": true,
      "power_source": "alkaline_battery",
      "connected_at": "2021-11-04T18:08:19Z",
      "serial_number": "20F85E123456",
      "connectivity_enabled": true,
      "algorithmic_pin_enabled": true,
      "auto_lock": true,
      "auto_lock_timeout": 20,
      "created_at": "2021-11-04T18:09:19Z",
      "default_guest_end_time": null,
      "default_guest_start_time": null,
      "local_pins": [
        "1234"
      ],
      "mac_address": "c8:24:86:59:7f:6a",
      "manual_auto_lock_timeout": 0,
      "muted": false,
      "nfc": "no_nfc",
      "no_enter_code": false,
      "online_auto_lock": false,
      "power_level": 5,
      "programming_code": "123456",
      "ready_pin_seed": "",
      "state": "unlocked",
      "updated_at": "2021-11-04T18:09:19Z",
      "wake_wifi": "user_action",
      "wifi_enabled": true,
      "model_id": "ae6a362a-ba04-42bc-8fd6-a518c1bf193f",
      "location_id": "115b87ad-b401-42dc-a527-7c77e3c2d51d",
      "lock_action_schedule_id": "f14b7976-34f6-4ac3-af4e-8183ca2a0ae4"
    },
    "id": "6085fc07-f519-4e6f-ba18-65c29a390d37",
    "links": {
      "self": "http://api.remotelock.dev/devices/6085fc07-f519-4e6f-ba18-65c29a390d37",
      "model": "http://api.remotelock.dev/models/ae6a362a-ba04-42bc-8fd6-a518c1bf193f",
      "location": "http://api.remotelock.dev/locations/115b87ad-b401-42dc-a527-7c77e3c2d51d",
      "lock_action_schedule": "http://api.remotelock.dev/schedules/f14b7976-34f6-4ac3-af4e-8183ca2a0ae4"
    },
    "meta": {
      "restricted_actions": [
        "replace"
      ]
    }
  }
}

Deregister a device

Request

Endpoint

DELETE /devices/:id

DELETE /devices/60ebc747-8c3a-46d1-873c-8a472936b7ca

Parameters

None.

Response


204 No Content

Register a ResortLock

Request

Endpoint

POST /devices

POST /devices

Parameters

{
  "attributes": {
    "name": "My Resort Lock",
    "serial_number": "AB57EF010F4FBE01",
    "location_id": "6faa1764-0fd6-4ee2-a2af-bdf920222fd4",
    "model_id": "2cf6072a-1049-41f2-9561-2190bb2a4974",
    "default_guest_start_time": "11:30:00",
    "default_guest_end_time": "14:15:00"
  }
}
Name Description
attributes[name] required Name
attributes[serial_number] required Device serial number
attributes[location_id] required Location
attributes[model_id] Model
attributes[default_guest_start_time] Default Access Guest start time, ISO 8601 24 hour time format
attributes[default_guest_end_time] Default Access Guest end time, ISO 8601 24 hour time format

Response


201 Created
{
  "data": {
    "type": "resort_lock",
    "attributes": {
      "name": "My Resort Lock",
      "default_guest_start_time": "11:30:00",
      "default_guest_end_time": "14:15:00",
      "created_at": "2021-11-04T18:13:39Z",
      "updated_at": "2021-11-04T18:13:39Z",
      "serial_number": "AB57EF010F4FBE01",
      "model_id": "2cf6072a-1049-41f2-9561-2190bb2a4974",
      "location_id": "6faa1764-0fd6-4ee2-a2af-bdf920222fd4"
    },
    "id": "406c4b42-b858-40e9-b9b1-317acb1a2396",
    "links": {
      "self": "http://api.remotelock.dev/devices/406c4b42-b858-40e9-b9b1-317acb1a2396",
      "model": "http://api.remotelock.dev/models/2cf6072a-1049-41f2-9561-2190bb2a4974",
      "location": "http://api.remotelock.dev/locations/6faa1764-0fd6-4ee2-a2af-bdf920222fd4"
    }
  }
}

Update a ResortLock

Request

Endpoint

PUT /devices/:id

PUT /devices/00f49edb-50ce-4332-82de-867a6fac9983

Parameters

{
  "attributes": {
    "name": "Backdoor Resort Lock",
    "default_guest_start_time": "10:00:00"
  }
}
Name Description
attributes[name] Name
attributes[location_id] Location
attributes[serial_number] Device serial number
attributes[default_guest_start_time] Default Access Guest start time, ISO 8601 24 hour time format
attributes[default_guest_end_time] Default Access Guest end time, ISO 8601 24 hour time format

Response


200 OK
{
  "data": {
    "type": "resort_lock",
    "attributes": {
      "name": "Backdoor Resort Lock",
      "default_guest_start_time": "10:00:00",
      "default_guest_end_time": null,
      "created_at": "2021-11-04T18:13:42Z",
      "updated_at": "2021-11-04T18:13:42Z",
      "serial_number": "5LZCGPZQ0B4FBE01",
      "model_id": "19b166bd-0d64-41f6-8552-ccb0917e2c27",
      "location_id": "e46419da-3dc0-4a4b-b961-5da223e18504"
    },
    "id": "00f49edb-50ce-4332-82de-867a6fac9983",
    "links": {
      "self": "http://api.remotelock.dev/devices/00f49edb-50ce-4332-82de-867a6fac9983",
      "model": "http://api.remotelock.dev/models/19b166bd-0d64-41f6-8552-ccb0917e2c27",
      "location": "http://api.remotelock.dev/locations/e46419da-3dc0-4a4b-b961-5da223e18504"
    }
  }
}

Events

Get all events

Request

Endpoint

GET /events

GET /events

Parameters

Name Description
sort Sortable attributes: created_at and occurred_at, default: occurred_at descending

Response


200 OK
{
  "data": [
    {
      "type": "access_person_used_event",
      "attributes": {
        "source": "user",
        "status": "failed",
        "time_zone": "America/Denver",
        "occurred_at": "2021-11-04T15:33:43Z",
        "created_at": "2021-11-04T18:09:43Z",
        "updated_at": "2021-11-04T18:09:43Z",
        "associated_resource_name": null,
        "status_info": null,
        "method": null,
        "pin": null,
        "card": null,
        "publisher_id": "c420935f-74a9-43ea-a2e4-50e0b6b23bea",
        "publisher_type": "access_guest",
        "associated_resource_id": "beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "associated_resource_type": "lock"
      },
      "id": "01b0c15d-be7f-4799-909e-94afc3e5963f",
      "links": {
        "self": "http://api.remotelock.dev/events/01b0c15d-be7f-4799-909e-94afc3e5963f",
        "publisher": "http://api.remotelock.dev/access_persons/c420935f-74a9-43ea-a2e4-50e0b6b23bea",
        "associated_resource": "http://api.remotelock.dev/devices/beac36af-6f69-4b2c-b9e9-8a90918666d4"
      }
    },
    {
      "type": "unlocked_event",
      "attributes": {
        "source": "user",
        "status": "succeeded",
        "time_zone": "America/Denver",
        "occurred_at": "2021-11-04T12:11:43Z",
        "created_at": "2021-11-04T18:09:43Z",
        "updated_at": "2021-11-04T18:09:43Z",
        "associated_resource_name": null,
        "status_info": null,
        "method": "pin",
        "pin": "1234",
        "card": null,
        "publisher_id": "beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "publisher_type": "lock",
        "associated_resource_id": "a8c8d1ef-777e-46d8-a320-dfddd0930c60",
        "associated_resource_type": "access_user"
      },
      "id": "849c2634-16b6-4fdc-bc88-7fe9ed77b2ee",
      "links": {
        "self": "http://api.remotelock.dev/events/849c2634-16b6-4fdc-bc88-7fe9ed77b2ee",
        "publisher": "http://api.remotelock.dev/devices/beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "associated_resource": "http://api.remotelock.dev/access_persons/a8c8d1ef-777e-46d8-a320-dfddd0930c60"
      }
    },
    {
      "type": "connectivity_event",
      "attributes": {
        "source": "user",
        "status": "succeeded",
        "time_zone": "America/Denver",
        "occurred_at": "2021-11-04T09:29:43Z",
        "created_at": "2021-11-04T18:09:43Z",
        "updated_at": "2021-11-04T18:09:43Z",
        "connected_at": "2021-11-03T07:38:43Z",
        "publisher_id": "beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "publisher_type": "lock"
      },
      "id": "3d856874-67a5-4d31-b9bc-af33839296c5",
      "links": {
        "self": "http://api.remotelock.dev/events/3d856874-67a5-4d31-b9bc-af33839296c5",
        "publisher": "http://api.remotelock.dev/devices/beac36af-6f69-4b2c-b9e9-8a90918666d4"
      }
    },
    {
      "type": "access_person_sync_failed_event",
      "attributes": {
        "source": "user",
        "status": "succeeded",
        "time_zone": "America/Denver",
        "occurred_at": "2021-11-04T06:36:44Z",
        "created_at": "2021-11-04T18:09:44Z",
        "updated_at": "2021-11-04T18:09:44Z",
        "associated_resource_name": null,
        "status_info": "timeout",
        "publisher_id": "beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "publisher_type": "lock",
        "associated_resource_id": "26e174f1-791a-46ff-b531-4234415ed85e",
        "associated_resource_type": "access_user"
      },
      "id": "2539acdf-db2d-472b-9345-abd5b3e766d0",
      "links": {
        "self": "http://api.remotelock.dev/events/2539acdf-db2d-472b-9345-abd5b3e766d0",
        "publisher": "http://api.remotelock.dev/devices/beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "associated_resource": "http://api.remotelock.dev/access_persons/26e174f1-791a-46ff-b531-4234415ed85e"
      }
    },
    {
      "type": "access_guest_late_sync_event",
      "attributes": {
        "source": "user",
        "status": "succeeded",
        "time_zone": "America/Denver",
        "occurred_at": "2021-11-04T04:54:43Z",
        "created_at": "2021-11-04T18:09:43Z",
        "updated_at": "2021-11-04T18:09:43Z",
        "associated_resource_name": null,
        "publisher_id": "beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "publisher_type": "lock",
        "associated_resource_id": "5ac02f7a-42bd-4b72-ad1e-ea4ae6f41dbc",
        "associated_resource_type": "access_guest"
      },
      "id": "945821f4-c71a-46cc-86ef-5de514c4f08d",
      "links": {
        "self": "http://api.remotelock.dev/events/945821f4-c71a-46cc-86ef-5de514c4f08d",
        "publisher": "http://api.remotelock.dev/devices/beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "associated_resource": "http://api.remotelock.dev/access_persons/5ac02f7a-42bd-4b72-ad1e-ea4ae6f41dbc"
      }
    },
    {
      "type": "access_person_synced_event",
      "attributes": {
        "source": "user",
        "status": "succeeded",
        "time_zone": "America/Denver",
        "occurred_at": "2021-11-04T02:06:44Z",
        "created_at": "2021-11-04T18:09:44Z",
        "updated_at": "2021-11-04T18:09:44Z",
        "associated_resource_name": null,
        "publisher_id": "beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "publisher_type": "lock",
        "associated_resource_id": "98d8f6a5-9090-4dce-84dc-2a2cbb81ab12",
        "associated_resource_type": "access_user"
      },
      "id": "1c10693c-7d85-4871-9077-041b1d0e2fc9",
      "links": {
        "self": "http://api.remotelock.dev/events/1c10693c-7d85-4871-9077-041b1d0e2fc9",
        "publisher": "http://api.remotelock.dev/devices/beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "associated_resource": "http://api.remotelock.dev/access_persons/98d8f6a5-9090-4dce-84dc-2a2cbb81ab12"
      }
    },
    {
      "type": "access_person_used_event",
      "attributes": {
        "source": "user",
        "status": "succeeded",
        "time_zone": "America/Denver",
        "occurred_at": "2021-11-04T01:52:43Z",
        "created_at": "2021-11-04T18:09:43Z",
        "updated_at": "2021-11-04T18:09:43Z",
        "associated_resource_name": null,
        "status_info": null,
        "method": null,
        "pin": null,
        "card": null,
        "publisher_id": "2c9de746-2915-4dda-95f1-f44ff1f122d6",
        "publisher_type": "access_user",
        "associated_resource_id": "beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "associated_resource_type": "lock"
      },
      "id": "1249b3ce-13e6-49ff-a924-580aae6c7068",
      "links": {
        "self": "http://api.remotelock.dev/events/1249b3ce-13e6-49ff-a924-580aae6c7068",
        "publisher": "http://api.remotelock.dev/access_persons/2c9de746-2915-4dda-95f1-f44ff1f122d6",
        "associated_resource": "http://api.remotelock.dev/devices/beac36af-6f69-4b2c-b9e9-8a90918666d4"
      }
    },
    {
      "type": "power_level_low_event",
      "attributes": {
        "source": "user",
        "status": "succeeded",
        "time_zone": "America/Denver",
        "occurred_at": "2021-11-04T01:29:43Z",
        "created_at": "2021-11-04T18:09:43Z",
        "updated_at": "2021-11-04T18:09:43Z",
        "power_level": 26,
        "publisher_id": "beac36af-6f69-4b2c-b9e9-8a90918666d4",
        "publisher_type": "lock"
      },
      "id": "d4202e02-0936-4c21-8ace-5d6054ee5319",
      "links": {
        "self": "http://api.remotelock.dev/events/d4202e02-0936-4c21-8ace-5d6054ee5319",
        "publisher": "http://api.remotelock.dev/devices/beac36af-6f69-4b2c-b9e9-8a90918666d4"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 8,
    "total_pages": 1
  }
}

Fields

Name Description
type access_person_used, acs_door_opened, acs_door_closed, acs_door_held_open, access_person_synced, access_person_sync_failed, access_guest_late_sync, reset, unlocked, locked, access_denied, jammed, connectivity, power_level_low, battery_replaced, temperature_changed, humidity_changed, relay_enabled, relay_disabled, kore_ready_pin_used or unlockedlocked
source user, network or device
status succeeded and failed
associated_resource_name If associated_resource is deleted, this field is populated with associated_resource name

Get an event

Request

Endpoint

GET /events/:id

GET /events/cc72ade3-4e11-4f66-9ef3-fdda4d8060a9

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "unlocked_event",
    "attributes": {
      "source": "user",
      "status": "succeeded",
      "time_zone": "America/Denver",
      "occurred_at": "2021-11-04T05:20:49Z",
      "created_at": "2021-11-04T18:09:49Z",
      "updated_at": "2021-11-04T18:09:49Z",
      "associated_resource_name": null,
      "status_info": null,
      "method": "pin",
      "pin": "1234",
      "card": null,
      "publisher_id": "b1d9598c-6a75-4f61-af8d-734c0242ae92",
      "publisher_type": "lock",
      "associated_resource_id": "1ecb7f92-e071-4314-a37d-391b6332923a",
      "associated_resource_type": "access_user"
    },
    "id": "cc72ade3-4e11-4f66-9ef3-fdda4d8060a9",
    "links": {
      "self": "http://api.remotelock.dev/events/cc72ade3-4e11-4f66-9ef3-fdda4d8060a9",
      "publisher": "http://api.remotelock.dev/devices/b1d9598c-6a75-4f61-af8d-734c0242ae92",
      "associated_resource": "http://api.remotelock.dev/access_persons/1ecb7f92-e071-4314-a37d-391b6332923a"
    }
  }
}

Fields

Name Description
type access_person_used, acs_door_opened, acs_door_closed, acs_door_held_open, access_person_synced, access_person_sync_failed, access_guest_late_sync, reset, unlocked, locked, access_denied, jammed, connectivity, power_level_low, battery_replaced, temperature_changed, humidity_changed, relay_enabled, relay_disabled, kore_ready_pin_used or unlockedlocked
source user, network or device
status succeeded and failed
associated_resource_name If associated_resource is deleted, this field is populated with associated_resource name

Groups

Get all items in a door group

Request

Endpoint

GET /groups/:group_id/items

GET /groups/d3069df8-9c25-44cf-83a6-4e96ee5e127c/items?attributes[item_type]=lock

Parameters

attributes: {"item_type"=>"lock"}
Name Description
attributes[item_type] Filter by type(s). Supported types: door_group, acs_door, acs_elevator_floor, lock, zwave_lock, and schlage_home_lock
sort Sortable attributes: created_at, default: created_at ascending

Response


200 OK
{
  "data": [
    {
      "type": "door_group_item",
      "attributes": {
        "created_at": "2021-11-04T18:10:05Z",
        "updated_at": "2021-11-04T18:10:05Z",
        "item_id": "66f7bcca-3ddb-402b-b947-5d83f13b3b38",
        "item_type": "lock",
        "door_group_id": "d3069df8-9c25-44cf-83a6-4e96ee5e127c"
      },
      "id": "8ca428b4-58d3-4b5b-8179-3c2066aa9973",
      "links": {
        "self": "http://api.remotelock.dev/groups/d3069df8-9c25-44cf-83a6-4e96ee5e127c/items/8ca428b4-58d3-4b5b-8179-3c2066aa9973",
        "item": "http://api.remotelock.dev/devices/66f7bcca-3ddb-402b-b947-5d83f13b3b38",
        "door_group": "http://api.remotelock.dev/groups/d3069df8-9c25-44cf-83a6-4e96ee5e127c"
      }
    },
    {
      "type": "door_group_item",
      "attributes": {
        "created_at": "2021-11-04T18:10:05Z",
        "updated_at": "2021-11-04T18:10:05Z",
        "item_id": "cd8d1334-d9d0-40d1-b5e9-41a0792e669c",
        "item_type": "lock",
        "door_group_id": "d3069df8-9c25-44cf-83a6-4e96ee5e127c"
      },
      "id": "ddb0f07f-4d7f-4359-9dd6-6af215122b24",
      "links": {
        "self": "http://api.remotelock.dev/groups/d3069df8-9c25-44cf-83a6-4e96ee5e127c/items/ddb0f07f-4d7f-4359-9dd6-6af215122b24",
        "item": "http://api.remotelock.dev/devices/cd8d1334-d9d0-40d1-b5e9-41a0792e669c",
        "door_group": "http://api.remotelock.dev/groups/d3069df8-9c25-44cf-83a6-4e96ee5e127c"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Get an item in a door group

Request

Endpoint

GET /groups/:group_id/items/:id

GET /groups/9db07cae-6e73-423b-8e1e-e47ac74ebcd5/items/b01298cf-9121-4bd1-a141-e78a590659de

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "door_group_item",
    "attributes": {
      "created_at": "2021-11-04T18:10:08Z",
      "updated_at": "2021-11-04T18:10:08Z",
      "item_id": "ed39fd79-f800-4b34-bf81-14016d599088",
      "item_type": "lock",
      "door_group_id": "9db07cae-6e73-423b-8e1e-e47ac74ebcd5"
    },
    "id": "b01298cf-9121-4bd1-a141-e78a590659de",
    "links": {
      "self": "http://api.remotelock.dev/groups/9db07cae-6e73-423b-8e1e-e47ac74ebcd5/items/b01298cf-9121-4bd1-a141-e78a590659de",
      "item": "http://api.remotelock.dev/devices/ed39fd79-f800-4b34-bf81-14016d599088",
      "door_group": "http://api.remotelock.dev/groups/9db07cae-6e73-423b-8e1e-e47ac74ebcd5"
    }
  }
}

Add an item to a door group

Request

Endpoint

POST /groups/:group_id/items

POST /groups/1c268eeb-5d9f-4e3a-be86-581713adbe84/items

Parameters

{
  "attributes": {
    "item_id": "7c0492d3-f728-4591-b64a-5357b5ddcb0d",
    "item_type": "lock"
  }
}
Name Description
attributes[item_id] required Item id
attributes[item_type] required Item type: door_group, acs_door, acs_elevator_floor, lock, zwave_lock or schlage_home_lock

Response


201 Created
{
  "data": {
    "type": "door_group_item",
    "attributes": {
      "created_at": "2021-11-04T18:10:09Z",
      "updated_at": "2021-11-04T18:10:09Z",
      "item_id": "7c0492d3-f728-4591-b64a-5357b5ddcb0d",
      "item_type": "lock",
      "door_group_id": "1c268eeb-5d9f-4e3a-be86-581713adbe84"
    },
    "id": "c19309f9-a238-48c7-962e-3514fb97b881",
    "links": {
      "self": "http://api.remotelock.dev/groups/1c268eeb-5d9f-4e3a-be86-581713adbe84/items/c19309f9-a238-48c7-962e-3514fb97b881",
      "item": "http://api.remotelock.dev/devices/7c0492d3-f728-4591-b64a-5357b5ddcb0d",
      "door_group": "http://api.remotelock.dev/groups/1c268eeb-5d9f-4e3a-be86-581713adbe84"
    }
  }
}

Remove an item from a door group

Request

Endpoint

DELETE /groups/:group_id/items/:id

DELETE /groups/8da6fc96-7f61-41c6-a23b-99d975c6773e/items/419b8652-aed4-4fe5-9943-01f3599afcf7

Parameters

None.

Response


204 No Content

Get all groups

Returns all group types (homogeneous).

Request

Endpoint

GET /groups

GET /groups

Parameters

Name Description
[type] Filter by type(s). Supported types: door_group
sort Sortable attributes: created_at and name, default: created_at ascending

Response


200 OK
{
  "data": [
    {
      "type": "door_group",
      "attributes": {
        "name": "Indoor Locks",
        "created_at": "2021-11-04T18:10:34Z",
        "updated_at": "2021-11-04T18:10:34Z"
      },
      "id": "c9c889ea-1187-445c-bd41-270c29097080",
      "links": {
        "self": "http://api.remotelock.dev/groups/c9c889ea-1187-445c-bd41-270c29097080"
      }
    },
    {
      "type": "door_group",
      "attributes": {
        "name": "Sports & Garden",
        "created_at": "2021-11-04T18:10:34Z",
        "updated_at": "2021-11-04T18:10:34Z"
      },
      "id": "0834ed7e-1489-4eab-8178-b6eb8951dcbe",
      "links": {
        "self": "http://api.remotelock.dev/groups/0834ed7e-1489-4eab-8178-b6eb8951dcbe"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Get a group

Request

Endpoint

GET /groups/:id

GET /groups/9f577b0a-e82d-4693-8b90-74fe53905e78

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "door_group",
    "attributes": {
      "name": "Indoor Locks",
      "created_at": "2021-11-04T18:10:36Z",
      "updated_at": "2021-11-04T18:10:36Z"
    },
    "id": "9f577b0a-e82d-4693-8b90-74fe53905e78",
    "links": {
      "self": "http://api.remotelock.dev/groups/9f577b0a-e82d-4693-8b90-74fe53905e78"
    }
  }
}

Create a door group

Request

Endpoint

POST /groups

POST /groups

Parameters

{
  "type": "door_group",
  "attributes": {
    "name": "Warehouse doors"
  }
}
Name Description
type required door_group
attributes[name] required Door group name

Response


201 Created
{
  "data": {
    "type": "door_group",
    "attributes": {
      "name": "Warehouse doors",
      "created_at": "2021-11-04T18:10:37Z",
      "updated_at": "2021-11-04T18:10:37Z"
    },
    "id": "7372176f-a394-4fea-bd22-95be44d50323",
    "links": {
      "self": "http://api.remotelock.dev/groups/7372176f-a394-4fea-bd22-95be44d50323"
    }
  }
}

Update a group

Request

Endpoint

PUT /groups/:id

PUT /groups/15e8a181-b885-4efe-9a95-fa09bfe39b83

Parameters

{
  "attributes": {
    "name": "Inner doors"
  }
}
Name Description
attributes[name] Group name

Response


200 OK
{
  "data": {
    "type": "door_group",
    "attributes": {
      "name": "Inner doors",
      "created_at": "2021-11-04T18:10:39Z",
      "updated_at": "2021-11-04T18:10:39Z"
    },
    "id": "15e8a181-b885-4efe-9a95-fa09bfe39b83",
    "links": {
      "self": "http://api.remotelock.dev/groups/15e8a181-b885-4efe-9a95-fa09bfe39b83"
    }
  }
}

Delete a group

Request

Endpoint

DELETE /groups/:id

DELETE /groups/0d6b7128-2c2f-4a24-876a-7c42e81f0677

Parameters

None.

Response


204 No Content

Igloo Guests

Get all igloo lock guests

Request

Endpoint

GET /igloo_guests

GET /igloo_guests

Parameters

None.

Response


200 OK
{
  "data": [
    {
      "type": "igloo_guest",
      "attributes": {
        "name": "Cedrick Schmeler",
        "email": "babara@nader.net",
        "starts_at": "2021-11-09T00:00:00",
        "ends_at": "2021-12-06T00:00:00",
        "created_at": "2021-11-04T18:12:29Z",
        "updated_at": "2021-11-04T18:12:29Z",
        "code": "1234567",
        "igloo_lock_id": "2033648c-b995-4f18-9809-f538b3bb4b1f"
      },
      "id": "bfa64786-3017-4b5d-97de-c90531584395",
      "links": {
        "self": "http://api.remotelock.dev/igloo_guests/bfa64786-3017-4b5d-97de-c90531584395",
        "igloo_lock": "http://api.remotelock.dev/devices/2033648c-b995-4f18-9809-f538b3bb4b1f"
      }
    },
    {
      "type": "igloo_guest",
      "attributes": {
        "name": "Lesley Wolf",
        "email": "danial@mann.biz",
        "starts_at": "2021-11-10T00:00:00",
        "ends_at": "2021-12-06T00:00:00",
        "created_at": "2021-11-04T18:12:29Z",
        "updated_at": "2021-11-04T18:12:29Z",
        "code": "1234567",
        "igloo_lock_id": "2033648c-b995-4f18-9809-f538b3bb4b1f"
      },
      "id": "49d49a3e-f2de-4091-a6f2-ef5d9ce6c721",
      "links": {
        "self": "http://api.remotelock.dev/igloo_guests/49d49a3e-f2de-4091-a6f2-ef5d9ce6c721",
        "igloo_lock": "http://api.remotelock.dev/devices/2033648c-b995-4f18-9809-f538b3bb4b1f"
      }
    },
    {
      "type": "igloo_guest",
      "attributes": {
        "name": "Patria Dickinson V",
        "email": "josef@goyette.name",
        "starts_at": "2021-11-19T00:00:00",
        "ends_at": "2021-12-17T00:00:00",
        "created_at": "2021-11-04T18:12:30Z",
        "updated_at": "2021-11-04T18:12:30Z",
        "code": "1234567",
        "igloo_lock_id": "f74bc8a3-0c17-4518-8ba0-808c7b4085cc"
      },
      "id": "e8c2a02e-edd8-4652-aa19-1c62d5ee70e1",
      "links": {
        "self": "http://api.remotelock.dev/igloo_guests/e8c2a02e-edd8-4652-aa19-1c62d5ee70e1",
        "igloo_lock": "http://api.remotelock.dev/devices/f74bc8a3-0c17-4518-8ba0-808c7b4085cc"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 3,
    "total_pages": 1
  }
}

Get an igloo guest

Request

Endpoint

GET /igloo_guests/:id

GET /igloo_guests/972c97af-fff2-4bdd-95e5-cf7c118d8d36

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "igloo_guest",
    "attributes": {
      "name": "Randell Parisian Sr.",
      "email": "antoine_feil@auer-franecki.io",
      "starts_at": "2021-11-06T00:00:00",
      "ends_at": "2021-11-28T00:00:00",
      "created_at": "2021-11-04T18:12:31Z",
      "updated_at": "2021-11-04T18:12:31Z",
      "code": "1234567",
      "igloo_lock_id": "c646a372-b037-4e71-84da-c85a9c119539"
    },
    "id": "972c97af-fff2-4bdd-95e5-cf7c118d8d36",
    "links": {
      "self": "http://api.remotelock.dev/igloo_guests/972c97af-fff2-4bdd-95e5-cf7c118d8d36",
      "igloo_lock": "http://api.remotelock.dev/devices/c646a372-b037-4e71-84da-c85a9c119539"
    }
  }
}

Create an igloo guest

Request

Endpoint

POST /igloo_guests

POST /igloo_guests

Parameters

{
  "attributes": {
    "igloo_lock_id": "5b786a60-7a30-40e9-80d7-6b944c6fc5b6",
    "name": "Ann Smith",
    "starts_at": "2020-01-02T13:00:00",
    "ends_at": "2020-02-02T16:00:00",
    "email": "temeka.altenwerth@botsford.name"
  }
}
Name Description
attributes[igloo_lock_id] required Igloo Lock
attributes[name] required Name
attributes[starts_at] required Starts at ISO 8601 timestamp without time zone. Only hours are supported (minutes and seconds will be converted to zeros).
attributes[ends_at] required Ends at ISO 8601 timestamp without time zone. Only hours are supported (minutes and seconds will be converted to zeros).
attributes[email] E-mail address of the guest

Response


201 Created
{
  "data": {
    "type": "igloo_guest",
    "attributes": {
      "name": "Ann Smith",
      "email": "temeka.altenwerth@botsford.name",
      "starts_at": "2020-01-02T13:00:00",
      "ends_at": "2020-02-02T16:00:00",
      "created_at": "2021-11-04T18:12:32Z",
      "updated_at": "2021-11-04T18:12:32Z",
      "code": "1234567",
      "igloo_lock_id": "5b786a60-7a30-40e9-80d7-6b944c6fc5b6"
    },
    "id": "b8807d84-fbc1-4915-a2b7-635fda0d69ec",
    "links": {
      "self": "http://api.remotelock.dev/igloo_guests/b8807d84-fbc1-4915-a2b7-635fda0d69ec",
      "igloo_lock": "http://api.remotelock.dev/devices/5b786a60-7a30-40e9-80d7-6b944c6fc5b6"
    }
  }
}

Update an igloo guest

Request

Endpoint

PUT /igloo_guests/:id

PUT /igloo_guests/fa902077-3044-4eb1-b02e-af17da63049b

Parameters

{
  "attributes": {
    "name": "Jonatan Doery"
  }
}
Name Description
attributes[name] Name
attributes[email] Email

Response


200 OK
{
  "data": {
    "type": "igloo_guest",
    "attributes": {
      "name": "Jonatan Doery",
      "email": "long@gorczany-schimmel.com",
      "starts_at": "2021-11-08T00:00:00",
      "ends_at": "2021-12-05T00:00:00",
      "created_at": "2021-11-04T18:12:33Z",
      "updated_at": "2021-11-04T18:12:33Z",
      "code": "1234567",
      "igloo_lock_id": "ecfb2259-517a-4e2e-808e-7bbc4714ed60"
    },
    "id": "fa902077-3044-4eb1-b02e-af17da63049b",
    "links": {
      "self": "http://api.remotelock.dev/igloo_guests/fa902077-3044-4eb1-b02e-af17da63049b",
      "igloo_lock": "http://api.remotelock.dev/devices/ecfb2259-517a-4e2e-808e-7bbc4714ed60"
    }
  }
}

Discard an igloo guest

Request

Endpoint

DELETE /igloo_guests/:id

DELETE /igloo_guests/e2a2d8f0-f4fa-425e-9403-92ddcfa780dc

Parameters

None.

Response


204 No Content

Kore ReadyPINs

Get all ReadyPINs

ReadyPINs are ideal for providing date/time based temporary guest access to locks without a network. Instead of relying on a network connection to the lock, the access information is actually carried within the PIN code itself.

Status

Request

Endpoint

GET /kore_ready_pins

GET /kore_ready_pins

Parameters

None.

Response


200 OK
{
  "data": [
    {
      "type": "kore_ready_pin",
      "attributes": {
        "uuid": "6c76e018-3b61-4aad-b599-508ef3c5b9ca",
        "name": "Dr. Margy Spinka",
        "email": "roscoe@wyman.name",
        "starts_at": "2021-11-04T00:00:00",
        "ends_at": "2021-11-06T00:00:00",
        "status": "current",
        "source": null,
        "created_at": "2021-11-04T18:12:44Z",
        "updated_at": "2021-11-04T18:12:44Z",
        "pin": "8858482790",
        "lock_id": "615e2c92-8797-4ab4-8611-349bccf64e28"
      },
      "id": "6c76e018-3b61-4aad-b599-508ef3c5b9ca",
      "links": {
        "self": "http://api.remotelock.dev/kore_ready_pins/6c76e018-3b61-4aad-b599-508ef3c5b9ca",
        "lock": "http://api.remotelock.dev/devices/615e2c92-8797-4ab4-8611-349bccf64e28"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 1,
    "total_pages": 1
  }
}

Get a ReadyPIN

Request

Endpoint

GET /kore_ready_pins/:id

GET /kore_ready_pins/ccc165d7-5a3b-4fc9-8798-022e1ac21a4c

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "kore_ready_pin",
    "attributes": {
      "uuid": "ccc165d7-5a3b-4fc9-8798-022e1ac21a4c",
      "name": "Denisse Terry",
      "email": "matt.lueilwitz@beahan.co",
      "starts_at": "2021-11-04T00:00:00",
      "ends_at": "2021-11-06T00:00:00",
      "status": "current",
      "source": null,
      "created_at": "2021-11-04T18:12:44Z",
      "updated_at": "2021-11-04T18:12:44Z",
      "pin": "1024338118",
      "lock_id": "f17489d0-227f-48f1-af8c-c9e8b36dea05"
    },
    "id": "ccc165d7-5a3b-4fc9-8798-022e1ac21a4c",
    "links": {
      "self": "http://api.remotelock.dev/kore_ready_pins/ccc165d7-5a3b-4fc9-8798-022e1ac21a4c",
      "lock": "http://api.remotelock.dev/devices/f17489d0-227f-48f1-af8c-c9e8b36dea05"
    }
  }
}

Create a ReadyPIN

Request

Endpoint

POST /kore_ready_pins

POST /kore_ready_pins

Parameters

{
  "attributes": {
    "name": "Ann Smith",
    "lock_id": "5aeacc3b-8f0f-4418-858b-4e29a8523a2e",
    "starts_at": "2021-03-20T09:00:00",
    "ends_at": "2021-03-27T17:00:00",
    "email": "ann@smith.com"
  }
}
Name Description
attributes[name] required Name
attributes[lock_id] required Lock
attributes[starts_at] required Starts at ISO 8601 timestamp without time zone (only hours are supported).
attributes[ends_at] required Ends at ISO 8601 timestamp without time zone (only hours are supported).
attributes[email] Email

Response


201 Created
{
  "data": {
    "type": "kore_ready_pin",
    "attributes": {
      "uuid": "ceb15559-493a-435e-9b64-f76d3a6e408e",
      "name": "Ann Smith",
      "email": "ann@smith.com",
      "starts_at": "2021-03-20T09:00:00",
      "ends_at": "2021-03-27T17:00:00",
      "status": "current",
      "source": null,
      "created_at": "2021-03-22T00:00:00Z",
      "updated_at": "2021-03-22T00:00:00Z",
      "pin": "1234512345",
      "lock_id": "5aeacc3b-8f0f-4418-858b-4e29a8523a2e"
    },
    "id": "ceb15559-493a-435e-9b64-f76d3a6e408e",
    "links": {
      "self": "http://api.remotelock.dev/kore_ready_pins/ceb15559-493a-435e-9b64-f76d3a6e408e",
      "lock": "http://api.remotelock.dev/devices/5aeacc3b-8f0f-4418-858b-4e29a8523a2e"
    }
  }
}

Update a ReadyPIN

Updating of starts_at or ends_at is not allowed.

Request

Endpoint

PUT /kore_ready_pins/:id

PUT /kore_ready_pins/eee34512-f037-4734-99f7-bac19c7469be

Parameters

{
  "attributes": {
    "name": "Mike Smith",
    "email": "mike@smith.com"
  }
}
Name Description
attributes[name] Name
attributes[email] Email

Response


200 OK
{
  "data": {
    "type": "kore_ready_pin",
    "attributes": {
      "uuid": "eee34512-f037-4734-99f7-bac19c7469be",
      "name": "Mike Smith",
      "email": "mike@smith.com",
      "starts_at": "2021-11-04T00:00:00",
      "ends_at": "2021-11-06T00:00:00",
      "status": "current",
      "source": null,
      "created_at": "2021-11-04T18:12:46Z",
      "updated_at": "2021-11-04T18:12:46Z",
      "pin": "2376994914",
      "lock_id": "b3d303d2-160f-48c2-9773-510d06139c00"
    },
    "id": "eee34512-f037-4734-99f7-bac19c7469be",
    "links": {
      "self": "http://api.remotelock.dev/kore_ready_pins/eee34512-f037-4734-99f7-bac19c7469be",
      "lock": "http://api.remotelock.dev/devices/b3d303d2-160f-48c2-9773-510d06139c00"
    }
  }
}

Delete an expired ReadyPIN

Trying to delete a ReadyPIN will result in a 422 HTTP error if it's not expired.

Request

Endpoint

DELETE /kore_ready_pins/:id

DELETE /kore_ready_pins/baeb9280-dc53-4248-97c7-1553079087b6

Parameters

None.

Response


204 No Content

Locations

Get all locations

Request

Endpoint

GET /locations

GET /locations

Parameters

Name Description
sort Sortable attributes: created_at and name, default: name ascending

Response


200 OK
{
  "data": [
    {
      "type": "location",
      "attributes": {
        "name": "RemoteLock Headquarters",
        "phone": "(877) 254-5625",
        "address": "1325 S. Colorado Blvd",
        "address2": "Suite B400",
        "city": "Denver",
        "state": "CO",
        "postal_code": "80222",
        "country": "US",
        "time_zone": "America/Denver",
        "created_at": "2021-11-04T18:12:47Z",
        "updated_at": "2021-11-04T18:12:47Z"
      },
      "id": "5e77cec7-272b-4b2b-b8dc-e400cc21d7db",
      "links": {
        "self": "http://api.remotelock.dev/locations/5e77cec7-272b-4b2b-b8dc-e400cc21d7db"
      }
    },
    {
      "type": "location",
      "attributes": {
        "name": "Streamlined modular superstructure",
        "phone": null,
        "address": "9992 Shavonda Valley",
        "address2": null,
        "city": null,
        "state": null,
        "postal_code": null,
        "country": null,
        "time_zone": "America/Denver",
        "created_at": "2021-11-04T18:12:47Z",
        "updated_at": "2021-11-04T18:12:47Z"
      },
      "id": "2760a5ed-3f69-4fc4-a9d7-e7c1864195c2",
      "links": {
        "self": "http://api.remotelock.dev/locations/2760a5ed-3f69-4fc4-a9d7-e7c1864195c2"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Get a location

Request

Endpoint

GET /locations/:id

GET /locations/81babaab-709e-4370-98a4-7f2b4b4a4e0e

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "location",
    "attributes": {
      "name": "RemoteLock Headquarters",
      "phone": "(877) 254-5625",
      "address": "1325 S. Colorado Blvd",
      "address2": "Suite B400",
      "city": "Denver",
      "state": "CO",
      "postal_code": "80222",
      "country": "US",
      "time_zone": "America/Denver",
      "created_at": "2021-11-04T18:12:48Z",
      "updated_at": "2021-11-04T18:12:48Z"
    },
    "id": "81babaab-709e-4370-98a4-7f2b4b4a4e0e",
    "links": {
      "self": "http://api.remotelock.dev/locations/81babaab-709e-4370-98a4-7f2b4b4a4e0e"
    }
  }
}

Create a location

Request

Endpoint

POST /locations

POST /locations

Parameters

{
  "attributes": {
    "name": "RemoteLock HQ",
    "phone": "(877) 254-5625",
    "address": "1325 S. Colorado Blvd",
    "address2": "Suite B400",
    "city": "Denver",
    "state": "CO",
    "postal_code": "80222",
    "country": "US",
    "time_zone": "America/Denver"
  }
}
Name Description
attributes[name] required Attributes name
attributes[phone] Attributes phone
attributes[address] Attributes address
attributes[address_2] Attributes address 2
attributes[city] Attributes city
attributes[state] Attributes state
attributes[postal_code] Attributes postal code
attributes[country] https://en.wikipedia.org/wiki/ISO_3166-1
attributes[time_zone] required https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Response


201 Created
{
  "data": {
    "type": "location",
    "attributes": {
      "name": "RemoteLock HQ",
      "phone": "(877) 254-5625",
      "address": "1325 S. Colorado Blvd",
      "address2": "Suite B400",
      "city": "Denver",
      "state": "CO",
      "postal_code": "80222",
      "country": "US",
      "time_zone": "America/Denver",
      "created_at": "2021-11-04T18:12:49Z",
      "updated_at": "2021-11-04T18:12:49Z"
    },
    "id": "da2dff72-9acf-40c9-8643-af682795737f",
    "links": {
      "self": "http://api.remotelock.dev/locations/da2dff72-9acf-40c9-8643-af682795737f"
    }
  }
}

Update a location

Request

Endpoint

PUT /locations/:id

PUT /locations/8671c5be-ef0d-4688-9703-d6605abfca79

Parameters

{
  "attributes": {
    "name": "RemoteLock HQ"
  }
}

None.

Response


200 OK
{
  "data": {
    "type": "location",
    "attributes": {
      "name": "RemoteLock HQ",
      "phone": "(877) 254-5625",
      "address": "1325 S. Colorado Blvd",
      "address2": "Suite B400",
      "city": "Denver",
      "state": "CO",
      "postal_code": "80222",
      "country": "US",
      "time_zone": "America/Denver",
      "created_at": "2021-11-04T18:12:50Z",
      "updated_at": "2021-11-04T18:12:50Z"
    },
    "id": "8671c5be-ef0d-4688-9703-d6605abfca79",
    "links": {
      "self": "http://api.remotelock.dev/locations/8671c5be-ef0d-4688-9703-d6605abfca79"
    }
  }
}

Delete a location

Request

Endpoint

DELETE /locations/:id

DELETE /locations/d0effea7-289a-493f-8174-b4ce6cab2bfb

Parameters

None.

Response


204 No Content

Models

Get all models

Request

Endpoint

GET /models

GET /models

Parameters

Name Description
sort Sortable attributes: number, default: none

Response


200 OK
{
  "data": [
    {
      "type": "model",
      "attributes": {
        "name": "RL-4000",
        "number": "RL-4000",
        "type": "resort_lock",
        "capabilities": {
          "connected": false,
          "guest_deferrable": false,
          "phone_credential": false,
          "pin_credential": false,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": false,
          "smart_card_credential": false
        }
      },
      "id": "bdf2eb49-3453-476f-9f4c-607916de0661",
      "links": {
        "self": "http://api.remotelock.dev/models/bdf2eb49-3453-476f-9f4c-607916de0661"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "ZWaveLock",
        "number": "ZWaveLock",
        "type": "zwave_lock",
        "capabilities": {
          "connected": true,
          "guest_deferrable": true,
          "phone_credential": false,
          "pin_credential": true,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": false,
          "replaceable": false,
          "smart_card_credential": false
        }
      },
      "id": "f6c271f7-2db7-4261-b3bc-1a721754c15d",
      "links": {
        "self": "http://api.remotelock.dev/models/f6c271f7-2db7-4261-b3bc-1a721754c15d"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "LS-P50i",
        "number": "LS-P50i",
        "type": "power_plug",
        "capabilities": {
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            10,
            60,
            300,
            600,
            900,
            1200,
            1800,
            3600,
            7200,
            10800,
            14400
          ],
          "power_sources": [
            "hardwire"
          ],
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": false
        }
      },
      "id": "8c856eda-c202-4791-b96b-7f2f09dd1d95",
      "links": {
        "self": "http://api.remotelock.dev/models/8c856eda-c202-4791-b96b-7f2f09dd1d95"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "BG (LS-3i)",
        "number": "LS-3i",
        "type": "lock",
        "capabilities": {
          "access_exception": true,
          "auto_lock_enable": true,
          "auto_lock_schedule": true,
          "auto_lock_timeouts": [
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            30,
            60,
            300,
            600,
            900,
            1200,
            1500,
            1800
          ],
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            300,
            900,
            1200,
            1800,
            3600,
            7200,
            14400,
            28800,
            43200
          ],
          "local_pins": true,
          "lock_action_schedule": true,
          "manual_auto_lock_timeout": false,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": true,
          "no_enter_code": true,
          "online_auto_lock": true,
          "phone_credential": false,
          "pin_credential": true,
          "power_sources": [
            "hardwire",
            "alkaline_battery",
            "lithium_battery"
          ],
          "programming_code": true,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": true,
          "smart_card_credential": false,
          "wake_wifi": [
            "user_action",
            "heartbeat_interval"
          ]
        }
      },
      "id": "8427d51a-6bda-44f9-b64e-9c63de19d4f1",
      "links": {
        "self": "http://api.remotelock.dev/models/8427d51a-6bda-44f9-b64e-9c63de19d4f1"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "OpenEdge Series",
        "number": "OEMAIN",
        "type": "lock",
        "capabilities": {
          "access_exception": true,
          "auto_lock_enable": true,
          "auto_lock_schedule": true,
          "auto_lock_timeouts": [
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            30,
            60,
            300,
            600,
            900,
            1200,
            1500,
            1800
          ],
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            300,
            900,
            1200,
            1800,
            3600,
            7200,
            14400,
            28800,
            43200
          ],
          "local_pins": true,
          "lock_action_schedule": true,
          "manual_auto_lock_timeout": false,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": true,
          "no_enter_code": true,
          "online_auto_lock": true,
          "phone_credential": false,
          "pin_credential": true,
          "power_sources": [
            "hardwire",
            "alkaline_battery",
            "lithium_battery"
          ],
          "programming_code": true,
          "prox_card_credential": false,
          "ready_pin_credential": true,
          "registrable": true,
          "replaceable": true,
          "smart_card_credential": true,
          "wake_wifi": [
            "user_action",
            "heartbeat_interval"
          ]
        }
      },
      "id": "d887bc55-b46f-4e8d-a742-81abae6afeaa",
      "links": {
        "self": "http://api.remotelock.dev/models/d887bc55-b46f-4e8d-a742-81abae6afeaa"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "LS-P100mi",
        "number": "LS-P100mi",
        "type": "power_plug",
        "capabilities": {
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            10,
            60,
            300,
            600,
            900,
            1200,
            1800,
            3600,
            7200,
            10800,
            14400
          ],
          "power_sources": [
            "hardwire"
          ],
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": false
        }
      },
      "id": "bab757ac-4747-4798-91cf-2bd578cdde88",
      "links": {
        "self": "http://api.remotelock.dev/models/bab757ac-4747-4798-91cf-2bd578cdde88"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "RG (LS-5i)",
        "number": "LS-5i",
        "type": "lock",
        "capabilities": {
          "access_exception": true,
          "auto_lock_enable": true,
          "auto_lock_schedule": true,
          "auto_lock_timeouts": [
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            30,
            60,
            300,
            600,
            900,
            1200,
            1500,
            1800
          ],
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            300,
            900,
            1200,
            1800,
            3600,
            7200,
            14400,
            28800,
            43200
          ],
          "local_pins": true,
          "lock_action_schedule": true,
          "manual_auto_lock_timeout": true,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": true,
          "no_enter_code": true,
          "online_auto_lock": true,
          "phone_credential": false,
          "pin_credential": true,
          "power_sources": [
            "alkaline_battery",
            "lithium_battery"
          ],
          "programming_code": true,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": true,
          "smart_card_credential": false,
          "wake_wifi": [
            "user_action",
            "heartbeat_interval",
            "user_action_except_manual"
          ]
        }
      },
      "id": "3a1bfbf9-4ee4-4e95-a298-bfd735deaac0",
      "links": {
        "self": "http://api.remotelock.dev/models/3a1bfbf9-4ee4-4e95-a298-bfd735deaac0"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "LS-DB500i",
        "number": "LS-DB500i",
        "type": "lock",
        "capabilities": {
          "access_exception": false,
          "auto_lock_enable": false,
          "auto_lock_schedule": false,
          "auto_lock_timeouts": [

          ],
          "connected": true,
          "guest_deferrable": true,
          "heartbeat_intervals": [
            0,
            10,
            60,
            300,
            600,
            900,
            1200,
            1800,
            3600,
            7200,
            10800,
            14400
          ],
          "local_pins": true,
          "lock_action_schedule": false,
          "manual_auto_lock_timeout": false,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": false,
          "no_enter_code": false,
          "online_auto_lock": false,
          "phone_credential": false,
          "pin_credential": true,
          "power_sources": [

          ],
          "programming_code": true,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": false,
          "smart_card_credential": false,
          "wake_wifi": [

          ]
        }
      },
      "id": "60e97297-0f0f-414d-9785-6aca757da6a5",
      "links": {
        "self": "http://api.remotelock.dev/models/60e97297-0f0f-414d-9785-6aca757da6a5"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "LS-L500i",
        "number": "LS-L500i",
        "type": "lock",
        "capabilities": {
          "access_exception": false,
          "auto_lock_enable": false,
          "auto_lock_schedule": true,
          "auto_lock_timeouts": [

          ],
          "connected": true,
          "guest_deferrable": true,
          "heartbeat_intervals": [
            0,
            10,
            60,
            300,
            600,
            900,
            1200,
            1800,
            3600,
            7200,
            10800,
            14400
          ],
          "local_pins": true,
          "lock_action_schedule": false,
          "manual_auto_lock_timeout": false,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": false,
          "no_enter_code": false,
          "online_auto_lock": false,
          "phone_credential": false,
          "pin_credential": true,
          "power_sources": [

          ],
          "programming_code": true,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": false,
          "smart_card_credential": false,
          "wake_wifi": [

          ]
        }
      },
      "id": "06d99160-77d7-4d48-9e03-97bd507d8adb",
      "links": {
        "self": "http://api.remotelock.dev/models/06d99160-77d7-4d48-9e03-97bd507d8adb"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "E06",
        "number": "WEST-E06",
        "type": "lock",
        "capabilities": {
          "access_exception": true,
          "auto_lock_enable": true,
          "auto_lock_schedule": true,
          "auto_lock_timeouts": [
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            30,
            60,
            300,
            600,
            900,
            1200,
            1500,
            1800
          ],
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            300,
            900,
            1200,
            1800,
            3600,
            7200,
            14400,
            28800,
            43200
          ],
          "local_pins": true,
          "lock_action_schedule": true,
          "manual_auto_lock_timeout": true,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": true,
          "no_enter_code": true,
          "online_auto_lock": true,
          "phone_credential": false,
          "pin_credential": true,
          "power_sources": [
            "alkaline_battery",
            "lithium_battery"
          ],
          "programming_code": true,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": true,
          "smart_card_credential": false,
          "wake_wifi": [
            "user_action",
            "heartbeat_interval",
            "user_action_except_manual"
          ]
        }
      },
      "id": "3378f224-d8db-495d-9182-dbbbf333a394",
      "links": {
        "self": "http://api.remotelock.dev/models/3378f224-d8db-495d-9182-dbbbf333a394"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "MercuryElevator",
        "number": "MercuryElevator",
        "type": "acs_elevator",
        "capabilities": {
          "access_exception": true,
          "connected": true,
          "guest_deferrable": false,
          "phone_credential": false,
          "pin_credential": true,
          "prox_card_credential": true,
          "ready_pin_credential": false,
          "registrable": false,
          "replaceable": false,
          "smart_card_credential": true
        }
      },
      "id": "16886e9e-968b-44ef-98dd-14c933bd057b",
      "links": {
        "self": "http://api.remotelock.dev/models/16886e9e-968b-44ef-98dd-14c933bd057b"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "MercuryElevatorFloor",
        "number": "MercuryElevatorFloor",
        "type": "acs_elevator_floor",
        "capabilities": {
          "access_exception": true,
          "connected": true,
          "guest_deferrable": false,
          "phone_credential": false,
          "pin_credential": true,
          "prox_card_credential": true,
          "ready_pin_credential": false,
          "registrable": false,
          "replaceable": false,
          "smart_card_credential": true
        }
      },
      "id": "a4497a22-f066-40de-a10b-507ad98d5e75",
      "links": {
        "self": "http://api.remotelock.dev/models/a4497a22-f066-40de-a10b-507ad98d5e75"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "710 (CG / LS-7i)",
        "number": "LS-7i",
        "type": "lock",
        "capabilities": {
          "access_exception": true,
          "auto_lock_enable": true,
          "auto_lock_schedule": true,
          "auto_lock_timeouts": [
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            30,
            60,
            300,
            600,
            900,
            1200,
            1500,
            1800
          ],
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            300,
            900,
            1200,
            1800,
            3600,
            7200,
            14400,
            28800,
            43200
          ],
          "local_pins": true,
          "lock_action_schedule": true,
          "manual_auto_lock_timeout": false,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": true,
          "no_enter_code": true,
          "online_auto_lock": true,
          "phone_credential": false,
          "pin_credential": true,
          "power_sources": [
            "hardwire",
            "alkaline_battery",
            "lithium_battery"
          ],
          "programming_code": true,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": true,
          "smart_card_credential": false,
          "wake_wifi": [
            "user_action",
            "heartbeat_interval"
          ]
        }
      },
      "id": "4f46a7d1-6018-4314-9714-9e3fa7dc00e4",
      "links": {
        "self": "http://api.remotelock.dev/models/4f46a7d1-6018-4314-9714-9e3fa7dc00e4"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "Mercury",
        "number": "Mercury",
        "type": "acs_door",
        "capabilities": {
          "access_exception": true,
          "connected": true,
          "guest_deferrable": false,
          "phone_credential": false,
          "pin_credential": true,
          "prox_card_credential": true,
          "ready_pin_credential": false,
          "registrable": false,
          "replaceable": false,
          "smart_card_credential": true
        }
      },
      "id": "2316579e-c0dc-4386-842f-5a79179e51f0",
      "links": {
        "self": "http://api.remotelock.dev/models/2316579e-c0dc-4386-842f-5a79179e51f0"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "LS-90i",
        "number": "LS-90i",
        "type": "thermostat",
        "capabilities": {
          "connected": true,
          "fan_modes": [
            "on",
            "auto",
            "auto_circulate"
          ],
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            10,
            60,
            300,
            600,
            900,
            1200,
            1800,
            3600,
            7200,
            10800,
            14400
          ],
          "modes": [
            "heat",
            "cool",
            "auto",
            "off"
          ],
          "power_sources": [
            "hardwire"
          ],
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": false
        }
      },
      "id": "29d4af4c-054a-4023-8441-4dc60eef50f1",
      "links": {
        "self": "http://api.remotelock.dev/models/29d4af4c-054a-4023-8441-4dc60eef50f1"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "Schlage Encode Lock",
        "number": "SchlageEncode",
        "type": "schlage_home_lock",
        "capabilities": {
          "connected": true,
          "guest_deferrable": true,
          "phone_credential": false,
          "pin_credential": true,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": false,
          "replaceable": false,
          "smart_card_credential": false
        }
      },
      "id": "30bcb93a-a568-4ad7-9121-32bce83c227f",
      "links": {
        "self": "http://api.remotelock.dev/models/30bcb93a-a568-4ad7-9121-32bce83c227f"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "RL-2000",
        "number": "RL-2000",
        "type": "resort_lock",
        "capabilities": {
          "connected": false,
          "guest_deferrable": false,
          "phone_credential": false,
          "pin_credential": false,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": false,
          "smart_card_credential": false
        }
      },
      "id": "3bec7511-2835-4ec3-8f97-ad20888a31b7",
      "links": {
        "self": "http://api.remotelock.dev/models/3bec7511-2835-4ec3-8f97-ad20888a31b7"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "August",
        "number": "August",
        "type": "lock",
        "capabilities": {
          "access_exception": false,
          "auto_lock_enable": false,
          "auto_lock_schedule": false,
          "auto_lock_timeouts": [

          ],
          "connected": true,
          "guest_deferrable": true,
          "heartbeat_intervals": [

          ],
          "local_pins": false,
          "lock_action_schedule": false,
          "manual_auto_lock_timeout": false,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": false,
          "no_enter_code": false,
          "online_auto_lock": false,
          "phone_credential": true,
          "pin_credential": true,
          "power_sources": [

          ],
          "programming_code": false,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": false,
          "replaceable": false,
          "smart_card_credential": false,
          "wake_wifi": [

          ]
        }
      },
      "id": "acf06526-1e0f-4efd-9b56-c02a4f99fc8d",
      "links": {
        "self": "http://api.remotelock.dev/models/acf06526-1e0f-4efd-9b56-c02a4f99fc8d"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "LS-8i",
        "number": "LS-8i",
        "type": "lock",
        "capabilities": {
          "access_exception": true,
          "auto_lock_enable": true,
          "auto_lock_schedule": true,
          "auto_lock_timeouts": [
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            30,
            60,
            300,
            600,
            900,
            1200,
            1500,
            1800
          ],
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            300,
            900,
            1200,
            1800,
            3600,
            7200,
            14400,
            28800,
            43200
          ],
          "local_pins": false,
          "lock_action_schedule": true,
          "manual_auto_lock_timeout": false,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": true,
          "no_enter_code": true,
          "online_auto_lock": true,
          "phone_credential": false,
          "pin_credential": false,
          "power_sources": [
            "hardwire",
            "alkaline_battery",
            "lithium_battery"
          ],
          "programming_code": false,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": false,
          "replaceable": true,
          "smart_card_credential": true,
          "wake_wifi": [
            "user_action",
            "heartbeat_interval"
          ]
        }
      },
      "id": "cbb0226c-11bb-419d-9512-fb0ab8357fbf",
      "links": {
        "self": "http://api.remotelock.dev/models/cbb0226c-11bb-419d-9512-fb0ab8357fbf"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "LS-60i",
        "number": "LS-60i",
        "type": "thermostat",
        "capabilities": {
          "connected": true,
          "fan_modes": [
            "on",
            "auto"
          ],
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            10,
            60,
            300,
            600,
            900,
            1200,
            1800,
            3600,
            7200,
            10800,
            14400
          ],
          "modes": [
            "heat",
            "cool",
            "off"
          ],
          "power_sources": [
            "battery",
            "hardwire"
          ],
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": false
        }
      },
      "id": "464b2f87-e3fd-4328-9c4f-e8a6b0e0f38e",
      "links": {
        "self": "http://api.remotelock.dev/models/464b2f87-e3fd-4328-9c4f-e8a6b0e0f38e"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "IglooLock",
        "number": "IglooLock",
        "type": "igloo_lock",
        "capabilities": {
          "connected": true,
          "guest_deferrable": false,
          "phone_credential": false,
          "pin_credential": false,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": false,
          "replaceable": false,
          "smart_card_credential": false
        }
      },
      "id": "19340410-9191-4de0-964e-a3df4ce89fa5",
      "links": {
        "self": "http://api.remotelock.dev/models/19340410-9191-4de0-964e-a3df4ce89fa5"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "LS-6i",
        "number": "LS-6i",
        "type": "lock",
        "capabilities": {
          "access_exception": true,
          "auto_lock_enable": true,
          "auto_lock_schedule": true,
          "auto_lock_timeouts": [
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            30,
            60,
            300,
            600,
            900,
            1200,
            1500,
            1800
          ],
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            300,
            900,
            1200,
            1800,
            3600,
            7200,
            14400,
            28800,
            43200
          ],
          "local_pins": true,
          "lock_action_schedule": true,
          "manual_auto_lock_timeout": false,
          "manual_auto_lock_timeout_intervals": [
            5,
            10,
            20,
            30,
            60,
            120,
            300,
            600,
            1200,
            1800,
            3600
          ],
          "mute": true,
          "no_enter_code": false,
          "online_auto_lock": false,
          "phone_credential": false,
          "pin_credential": true,
          "power_sources": [
            "alkaline_battery",
            "lithium_battery"
          ],
          "programming_code": true,
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": true,
          "smart_card_credential": false,
          "wake_wifi": [
            "user_action",
            "heartbeat_interval"
          ]
        }
      },
      "id": "df3324be-e825-43fd-b06b-18c34fe0a094",
      "links": {
        "self": "http://api.remotelock.dev/models/df3324be-e825-43fd-b06b-18c34fe0a094"
      }
    },
    {
      "type": "model",
      "attributes": {
        "name": "LS-P100i",
        "number": "LS-P100i",
        "type": "power_plug",
        "capabilities": {
          "connected": true,
          "guest_deferrable": false,
          "heartbeat_intervals": [
            0,
            10,
            60,
            300,
            600,
            900,
            1200,
            1800,
            3600,
            7200,
            10800,
            14400
          ],
          "power_sources": [
            "hardwire"
          ],
          "prox_card_credential": false,
          "ready_pin_credential": false,
          "registrable": true,
          "replaceable": false
        }
      },
      "id": "458f4014-b506-44ce-b7ad-19748c27dc17",
      "links": {
        "self": "http://api.remotelock.dev/models/458f4014-b506-44ce-b7ad-19748c27dc17"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 23,
    "total_pages": 1
  }
}

Get a model

Request

Endpoint

GET /models/:id

GET /models/f48365c3-6c10-4945-a33f-dc69e912ffdc

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "model",
    "attributes": {
      "name": "RL-4000",
      "number": "RL-4000",
      "type": "resort_lock",
      "capabilities": {
        "connected": false,
        "guest_deferrable": false,
        "phone_credential": false,
        "pin_credential": false,
        "prox_card_credential": false,
        "ready_pin_credential": false,
        "registrable": true,
        "replaceable": false,
        "smart_card_credential": false
      }
    },
    "id": "f48365c3-6c10-4945-a33f-dc69e912ffdc",
    "links": {
      "self": "http://api.remotelock.dev/models/f48365c3-6c10-4945-a33f-dc69e912ffdc"
    }
  }
}

Notification Subscribers

Get all notification subscribers

Returns all notification subscriber types (homogeneous).

Request

Endpoint

GET /notification_subscribers

GET /notification_subscribers

Parameters

Name Description
[type] Filter by type(s). Supported types: email_notification_subscriber, text_notification_subscriber, and webhook_notification_subscriber
sort Sortable attributes: created_at and name, default: created_at ascending

Response


200 OK
{
  "data": [
    {
      "type": "text_notification_subscriber",
      "attributes": {
        "name": "Duncan Grady",
        "phone": "1-240-921-0021",
        "carrier": "xfinity",
        "active": true,
        "created_at": "2021-11-04T18:13:08Z",
        "updated_at": "2021-11-04T18:13:08Z"
      },
      "id": "60c5041f-810b-4b26-9bcc-6de3d6e6d637",
      "links": {
        "self": "http://api.remotelock.dev/notification_subscribers/60c5041f-810b-4b26-9bcc-6de3d6e6d637"
      }
    },
    {
      "type": "webhook_notification_subscriber",
      "attributes": {
        "name": "Alejandro Kovacek",
        "url": "https://www.google.com",
        "content_type": "form",
        "secret": "125637a485314fc348f5c739cf00fe72",
        "active": true,
        "created_at": "2021-11-04T18:13:08Z",
        "updated_at": "2021-11-04T18:13:08Z"
      },
      "id": "1a24fe75-497f-4b92-b544-31d6b27f1319",
      "links": {
        "self": "http://api.remotelock.dev/notification_subscribers/1a24fe75-497f-4b92-b544-31d6b27f1319"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Get a notification subscriber

Request

Endpoint

GET /notification_subscribers/:id

GET /notification_subscribers/4766a9c6-1c5f-4ec2-947e-356cf291233f

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "text_notification_subscriber",
    "attributes": {
      "name": "Sen. Rashida Towne",
      "phone": "218-220-5512 x7348",
      "carrier": "metropcs",
      "active": true,
      "created_at": "2021-11-04T18:13:08Z",
      "updated_at": "2021-11-04T18:13:08Z"
    },
    "id": "4766a9c6-1c5f-4ec2-947e-356cf291233f",
    "links": {
      "self": "http://api.remotelock.dev/notification_subscribers/4766a9c6-1c5f-4ec2-947e-356cf291233f"
    }
  }
}

Update a notification subscriber

Parameters accepted: all used for create

Request

Endpoint

PUT /notification_subscribers/:id

PUT /notification_subscribers/36eff854-5dab-4a97-bd68-60978f1ee272

Parameters

{
  "attributes": {
    "active": false
  }
}

None.

Response


200 OK
{
  "data": {
    "type": "text_notification_subscriber",
    "attributes": {
      "name": "Terrie Turcotte",
      "phone": "1-155-934-7117 x861",
      "carrier": "bell",
      "active": false,
      "created_at": "2021-11-04T18:13:09Z",
      "updated_at": "2021-11-04T18:13:09Z"
    },
    "id": "36eff854-5dab-4a97-bd68-60978f1ee272",
    "links": {
      "self": "http://api.remotelock.dev/notification_subscribers/36eff854-5dab-4a97-bd68-60978f1ee272"
    }
  }
}

Delete a notification subscriber

Request

Endpoint

DELETE /notification_subscribers/:id

DELETE /notification_subscribers/b298e621-3b84-4168-a273-bd0b1933e93f

Parameters

None.

Response


204 No Content

Create an email notification subscriber

Request

Endpoint

POST /notification_subscribers

POST /notification_subscribers

Parameters

{
  "type": "email_notification_subscriber",
  "attributes": {
    "active": true,
    "name": "John Doe",
    "email": "john@doe.com"
  }
}
Name Description
type required email_notification_subscriber
attributes[active] Whether the subscriber is active or not. The subscriber will not receive notifications if set to false. Default: true
attributes[name] required Name
attributes[email] required Email

Response


201 Created
{
  "data": {
    "type": "email_notification_subscriber",
    "attributes": {
      "name": "John Doe",
      "email": "john@doe.com",
      "active": true,
      "created_at": "2021-11-04T18:13:10Z",
      "updated_at": "2021-11-04T18:13:10Z"
    },
    "id": "2cca6efc-ab7e-4635-9472-26d0c1018d78",
    "links": {
      "self": "http://api.remotelock.dev/notification_subscribers/2cca6efc-ab7e-4635-9472-26d0c1018d78"
    }
  }
}

Create a text notification subscriber

Request

Endpoint

POST /notification_subscribers

POST /notification_subscribers

Parameters

{
  "type": "text_notification_subscriber",
  "attributes": {
    "active": true,
    "name": "John Doe",
    "phone": "303-317-3422",
    "carrier": "att"
  }
}
Name Description
type required text_notification_subscriber
attributes[active] Whether the subscriber is active or not. The subscriber will not receive notifications if set to false. Default: true
attributes[name] required Name
attributes[phone] required Phone Number
attributes[carrier] required Carrier

Response


201 Created
{
  "data": {
    "type": "text_notification_subscriber",
    "attributes": {
      "name": "John Doe",
      "phone": "303-317-3422",
      "carrier": "att",
      "active": true,
      "created_at": "2021-11-04T18:13:11Z",
      "updated_at": "2021-11-04T18:13:11Z"
    },
    "id": "f74ffd75-3b45-4e21-ad5b-18fde654b34b",
    "links": {
      "self": "http://api.remotelock.dev/notification_subscribers/f74ffd75-3b45-4e21-ad5b-18fde654b34b"
    }
  }
}

Create a webhook notification subscriber

Webhooks are HTTP callbacks that you can create to receive events as they happen to avoid polling from the events API endpoint.

Webhook endpoint requirements

  1. Must be secured with HTTPS
  2. Validate request from us using the X-Secret header provided when webhook was created
  3. Process the request within 3 seconds, otherwise the request will timeout and our server will schedule it for retry. To avoid exceeding this deadline, we recommend processing webhook requests outside of the request/response lifecycle
  4. Always respond with 200 range status code, otherwise our server will schedule the request for retry

Retry logic

Whenever your webhook endpoint responds with a non-200 range status code or exceeds the deadline, our server will timeout the request and schedule for retry.

Our server will retry failed requests according to the mapping below:

Most of the time, this is enough to fix an issue on the webhook target server.

Webhook deactivation

If any message cannot be acknowledged by the webhook endpoint after the retries, our server will automatically deactivate the webhook. When this happens, we send an email notifying about the deactivated webhook.

Recover missed data

The best way to recover data from a deactivated webhook is to fetch from the /events endpoint. A sort by created_at is available for that endpoint and your application can use data from the last received messages via webhook to find the stop point.

A webhook payload has a similar structure to the response of events endpoint. The important difference is that the root JSON key, data, is a single object on a webhook payload, whereas data is an array of objects on the events response.

Make sure the webhook handler is decoupled enough so that it's easy to use for a data recover scenario from /events.

Request

Endpoint

POST /notification_subscribers

POST /notification_subscribers

Parameters

{
  "type": "webhook_notification_subscriber",
  "attributes": {
    "active": true,
    "name": "John's webhook",
    "url": "https://google.com",
    "content_type": "form",
    "secret": "5f7c5b9ccedea8832a46cfca516da134"
  }
}
Name Description
type required webhook_notification_subscriber
attributes[active] Whether the subscriber is active or not. The subscriber will not receive notifications if set to false. Default: true
attributes[name] required Name
attributes[url] required Secure (HTTPS) URL
attributes[content_type] required Content-Type ("form" or "json"). Default is "form".
attributes[secret] "X-Secret" request header to verify it came from us

Response


201 Created
{
  "data": {
    "type": "webhook_notification_subscriber",
    "attributes": {
      "name": "John's webhook",
      "url": "https://google.com",
      "content_type": "form",
      "secret": "5f7c5b9ccedea8832a46cfca516da134",
      "active": true,
      "created_at": "2021-11-04T18:13:11Z",
      "updated_at": "2021-11-04T18:13:11Z"
    },
    "id": "dc4d2e95-2692-4e1a-bd0a-62a041239fc8",
    "links": {
      "self": "http://api.remotelock.dev/notification_subscribers/dc4d2e95-2692-4e1a-bd0a-62a041239fc8"
    }
  }
}

Notification Subscriptions

Get all notification subscriptions

Request

Endpoint

GET /notification_subscriptions

GET /notification_subscriptions

Parameters

Name Description
sort Sortable attributes: created_at, default: created_at ascending

Response


200 OK
{
  "data": [
    {
      "type": "notification_subscription",
      "attributes": {
        "events": [
          {
            "event_type": "access_person_used"
          }
        ],
        "created_at": "2021-11-04T18:13:12Z",
        "updated_at": "2021-11-04T18:13:12Z",
        "subscriber_id": "d9649044-4e10-4b63-80ed-fbb9498e4ebd",
        "subscriber_type": "text_notification_subscriber",
        "publisher_id": "a5ebd0f6-7a28-4a23-a294-65f8ce96f1ac",
        "publisher_type": "account"
      },
      "id": "1c4a863e-8800-450e-a0a4-4ee8f655a886",
      "links": {
        "self": "http://api.remotelock.dev/notification_subscriptions/1c4a863e-8800-450e-a0a4-4ee8f655a886",
        "subscriber": "http://api.remotelock.dev/notification_subscribers/d9649044-4e10-4b63-80ed-fbb9498e4ebd",
        "publisher": "http://api.remotelock.dev/accounts/a5ebd0f6-7a28-4a23-a294-65f8ce96f1ac"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 1,
    "total_pages": 1
  }
}

Get a notification subscription

Request

Endpoint

GET /notification_subscriptions/:id

GET /notification_subscriptions/42bd7a66-48c0-4537-9123-ed4561af5169

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "notification_subscription",
    "attributes": {
      "events": [
        {
          "event_type": "access_person_used"
        }
      ],
      "created_at": "2021-11-04T18:13:13Z",
      "updated_at": "2021-11-04T18:13:13Z",
      "subscriber_id": "82dd5ef3-f406-496e-9618-f1b7d7aabcc7",
      "subscriber_type": "text_notification_subscriber",
      "publisher_id": "3c3fc3c1-4d55-430e-b342-5e68f027b029",
      "publisher_type": "account"
    },
    "id": "42bd7a66-48c0-4537-9123-ed4561af5169",
    "links": {
      "self": "http://api.remotelock.dev/notification_subscriptions/42bd7a66-48c0-4537-9123-ed4561af5169",
      "subscriber": "http://api.remotelock.dev/notification_subscribers/82dd5ef3-f406-496e-9618-f1b7d7aabcc7",
      "publisher": "http://api.remotelock.dev/accounts/3c3fc3c1-4d55-430e-b342-5e68f027b029"
    }
  }
}

Create a notification subscription

Notification Subscription is the combination of a Publisher, a Subscriber and the events to listen.

The event types contained in events must be compatible with the publisher type. Accounts and Locations can be combined with any event_type, but the others only work with their compatible event JSON Schemas:

{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "access_person_used"
      ]
    },
    "first_access": {
      "type": "boolean"
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "acs_door_opened",
        "acs_door_closed",
        "acs_door_held_open",
        "access_person_synced",
        "access_person_sync_failed",
        "access_guest_late_sync",
        "reset",
        "unlocked",
        "locked",
        "access_denied",
        "jammed"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "connectivity",
        "power_level_low",
        "battery_replaced",
        "access_person_synced",
        "access_person_sync_failed",
        "access_guest_late_sync",
        "reset",
        "unlocked",
        "locked",
        "access_denied",
        "jammed"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "connectivity",
        "power_level_low",
        "temperature_changed",
        "humidity_changed"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "connectivity",
        "relay_enabled",
        "relay_disabled"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "connectivity"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "connectivity",
        "power_level_low",
        "access_person_synced",
        "access_person_sync_failed",
        "access_guest_late_sync",
        "reset",
        "unlocked",
        "locked",
        "access_denied",
        "jammed"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "connectivity",
        "power_level_low",
        "access_person_synced",
        "access_person_sync_failed",
        "access_guest_late_sync",
        "reset",
        "unlocked",
        "locked",
        "access_denied",
        "jammed"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "kore_ready_pin_used"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "unlocked",
        "locked",
        "access_denied",
        "jammed"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "event_type": {
      "enum": [
        "access_person_synced",
        "access_person_sync_failed",
        "access_guest_late_sync",
        "reset",
        "unlockedlocked"
      ]
    }
  },
  "required": [
    "event_type"
  ],
  "additionalProperties": false
}

Request

Endpoint

POST /notification_subscriptions

POST /notification_subscriptions

Parameters

{
  "attributes": {
    "events": [
      {
        "event_type": "access_person_used"
      },
      {
        "event_type": "acs_door_opened"
      },
      {
        "event_type": "acs_door_closed"
      },
      {
        "event_type": "acs_door_held_open"
      },
      {
        "event_type": "access_person_synced"
      },
      {
        "event_type": "access_person_sync_failed"
      },
      {
        "event_type": "access_guest_late_sync"
      },
      {
        "event_type": "reset"
      },
      {
        "event_type": "unlocked"
      },
      {
        "event_type": "locked"
      },
      {
        "event_type": "access_denied"
      },
      {
        "event_type": "jammed"
      },
      {
        "event_type": "connectivity"
      },
      {
        "event_type": "power_level_low"
      },
      {
        "event_type": "battery_replaced"
      },
      {
        "event_type": "temperature_changed"
      },
      {
        "event_type": "humidity_changed"
      },
      {
        "event_type": "relay_enabled"
      },
      {
        "event_type": "relay_disabled"
      },
      {
        "event_type": "kore_ready_pin_used"
      },
      {
        "event_type": "unlockedlocked"
      }
    ],
    "publisher_type": "account",
    "publisher_id": "e50b64ee-1863-486e-9822-ee927d2cfdeb",
    "subscriber_type": "text_notification_subscriber",
    "subscriber_id": "98bc324c-fdba-46ac-a804-71a98a2480ef"
  }
}
Name Description
attributes[events] required [{ "event_type": "a supported event type" }, ...]
attributes[publisher_type] required Publisher type: account, location, access_user, access_guest, kore_ready_pin, lock, thermostat, power_plug, acs_door, acs_controller, acs_elevator, acs_elevator_floor, zwave_lock or schlage_home_lock
attributes[publisher_id] required Publisher id
attributes[subscriber_type] required Subscriber type: text_notification_subscriber, email_notification_subscriber or webhook_notification_subscriber
attributes[subscriber_id] required Subscriber id

Response


201 Created
{
  "data": {
    "type": "notification_subscription",
    "attributes": {
      "events": [
        {
          "event_type": "access_person_used"
        },
        {
          "event_type": "acs_door_opened"
        },
        {
          "event_type": "acs_door_closed"
        },
        {
          "event_type": "acs_door_held_open"
        },
        {
          "event_type": "access_person_synced"
        },
        {
          "event_type": "access_person_sync_failed"
        },
        {
          "event_type": "access_guest_late_sync"
        },
        {
          "event_type": "reset"
        },
        {
          "event_type": "unlocked"
        },
        {
          "event_type": "locked"
        },
        {
          "event_type": "access_denied"
        },
        {
          "event_type": "jammed"
        },
        {
          "event_type": "connectivity"
        },
        {
          "event_type": "power_level_low"
        },
        {
          "event_type": "battery_replaced"
        },
        {
          "event_type": "temperature_changed"
        },
        {
          "event_type": "humidity_changed"
        },
        {
          "event_type": "relay_enabled"
        },
        {
          "event_type": "relay_disabled"
        },
        {
          "event_type": "kore_ready_pin_used"
        },
        {
          "event_type": "unlockedlocked"
        }
      ],
      "created_at": "2021-11-04T18:13:14Z",
      "updated_at": "2021-11-04T18:13:14Z",
      "subscriber_id": "98bc324c-fdba-46ac-a804-71a98a2480ef",
      "subscriber_type": "text_notification_subscriber",
      "publisher_id": "e50b64ee-1863-486e-9822-ee927d2cfdeb",
      "publisher_type": "account"
    },
    "id": "0c55b066-fe2e-438b-861c-16bbb33043a1",
    "links": {
      "self": "http://api.remotelock.dev/notification_subscriptions/0c55b066-fe2e-438b-861c-16bbb33043a1",
      "subscriber": "http://api.remotelock.dev/notification_subscribers/98bc324c-fdba-46ac-a804-71a98a2480ef",
      "publisher": "http://api.remotelock.dev/account"
    }
  }
}

Update a notification subscription

Request

Endpoint

PUT /notification_subscriptions/:id

PUT /notification_subscriptions/6e92884c-8edd-4f40-a11f-8b95fa9f139b

Parameters

{
  "attributes": {
    "events": [
      {
        "event_type": "access_person_used"
      },
      {
        "event_type": "acs_door_held_open"
      }
    ]
  }
}
Name Description
attributes[events] [{ "event_type": "a supported event type" }, ...]
attributes[publisher_type] Publisher type: account, location, access_user, access_guest, kore_ready_pin, lock, thermostat, power_plug, acs_door, acs_controller, acs_elevator, acs_elevator_floor, zwave_lock or schlage_home_lock
attributes[publisher_id] Publisher id
attributes[subscriber_type] Subscriber type: text_notification_subscriber, email_notification_subscriber or webhook_notification_subscriber
attributes[subscriber_id] Subscriber id

Response


200 OK
{
  "data": {
    "type": "notification_subscription",
    "attributes": {
      "events": [
        {
          "event_type": "access_person_used"
        },
        {
          "event_type": "acs_door_held_open"
        }
      ],
      "created_at": "2021-11-04T18:13:15Z",
      "updated_at": "2021-11-04T18:13:15Z",
      "subscriber_id": "66985d8d-db57-4276-b208-34e3bf295032",
      "subscriber_type": "text_notification_subscriber",
      "publisher_id": "87fdb337-1717-467f-9a4a-f5a4b4ee68e7",
      "publisher_type": "account"
    },
    "id": "6e92884c-8edd-4f40-a11f-8b95fa9f139b",
    "links": {
      "self": "http://api.remotelock.dev/notification_subscriptions/6e92884c-8edd-4f40-a11f-8b95fa9f139b",
      "subscriber": "http://api.remotelock.dev/notification_subscribers/66985d8d-db57-4276-b208-34e3bf295032",
      "publisher": "http://api.remotelock.dev/accounts/87fdb337-1717-467f-9a4a-f5a4b4ee68e7"
    }
  }
}

Delete a notification subscription

Request

Endpoint

DELETE /notification_subscriptions/:id

DELETE /notification_subscriptions/6c0f8b54-fd8e-461b-a9d6-3e2b9e731393

Parameters

None.

Response


204 No Content

Notifications

Get all notifications

Request

Endpoint

GET /notifications

GET /notifications

Parameters

None.

Response


200 OK
{
  "data": [
    {
      "type": "notification",
      "attributes": {
        "created_at": "2021-11-04T18:13:16Z",
        "updated_at": "2021-11-04T18:13:16Z",
        "subscriber_id": "08aed5d9-6663-4970-a2a0-aa234d23bf3b",
        "subscriber_type": "text_notification_subscriber",
        "publisher_id": "351e8d2f-b970-4847-9b9b-9420feef1b14",
        "publisher_type": "lock",
        "event_id": "b88fcc0b-83d6-4b8d-a604-c544ea1afa88",
        "event_type": "unlocked_event"
      },
      "id": "aeaf81cf-6ee8-453e-ba67-1fc35abe3037",
      "links": {
        "self": "http://api.remotelock.dev/notifications/aeaf81cf-6ee8-453e-ba67-1fc35abe3037",
        "subscriber": "http://api.remotelock.dev/notification_subscribers/08aed5d9-6663-4970-a2a0-aa234d23bf3b",
        "publisher": "http://api.remotelock.dev/devices/351e8d2f-b970-4847-9b9b-9420feef1b14",
        "event": "http://api.remotelock.dev/events/b88fcc0b-83d6-4b8d-a604-c544ea1afa88"
      }
    },
    {
      "type": "notification",
      "attributes": {
        "created_at": "2021-11-04T18:13:16Z",
        "updated_at": "2021-11-04T18:13:16Z",
        "subscriber_id": "85600db0-cbe4-44bb-9260-9060cac3280d",
        "subscriber_type": "email_notification_subscriber",
        "publisher_id": "351e8d2f-b970-4847-9b9b-9420feef1b14",
        "publisher_type": "lock",
        "event_id": "b88fcc0b-83d6-4b8d-a604-c544ea1afa88",
        "event_type": "unlocked_event"
      },
      "id": "1529c9f4-622c-4073-8a5a-8f048a4cf157",
      "links": {
        "self": "http://api.remotelock.dev/notifications/1529c9f4-622c-4073-8a5a-8f048a4cf157",
        "subscriber": "http://api.remotelock.dev/notification_subscribers/85600db0-cbe4-44bb-9260-9060cac3280d",
        "publisher": "http://api.remotelock.dev/devices/351e8d2f-b970-4847-9b9b-9420feef1b14",
        "event": "http://api.remotelock.dev/events/b88fcc0b-83d6-4b8d-a604-c544ea1afa88"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Resort Lock Guests

Get all resort lock guests

Request

Endpoint

GET /resort_lock_guests

GET /resort_lock_guests

Parameters

Name Description
sort Sortable attributes: created_at, name, starts_at, and ends_at, default: created_at ascending

Response


200 OK
{
  "data": [
    {
      "type": "resort_lock_guest",
      "attributes": {
        "name": "John Doe",
        "email": "john.doe@email.com",
        "starts_at": "2021-11-14T18:00:00",
        "ends_at": "2021-11-18T18:00:00",
        "one_time_access": false,
        "status": "upcoming",
        "source": null,
        "guest_source": null,
        "created_at": "2021-11-04T18:13:29Z",
        "updated_at": "2021-11-04T18:13:29Z",
        "pin": "1234567890",
        "resort_lock_id": "816c5aa3-b669-4bfe-a44f-7532b2cc4632"
      },
      "id": "db73ff68-64e4-4b96-8dac-c32adb6a58b5",
      "links": {
        "self": "http://api.remotelock.dev/resort_lock_guests/db73ff68-64e4-4b96-8dac-c32adb6a58b5",
        "resort_lock": "http://api.remotelock.dev/devices/816c5aa3-b669-4bfe-a44f-7532b2cc4632"
      }
    },
    {
      "type": "resort_lock_guest",
      "attributes": {
        "name": "Mrs. Lance Sporer",
        "email": "douglas.wintheiser@nienow.com",
        "starts_at": "2021-11-04T18:00:00",
        "ends_at": "2021-11-06T18:00:00",
        "one_time_access": false,
        "status": "current",
        "source": null,
        "guest_source": null,
        "created_at": "2021-11-04T18:13:29Z",
        "updated_at": "2021-11-04T18:13:29Z",
        "pin": "1104860990",
        "resort_lock_id": "816c5aa3-b669-4bfe-a44f-7532b2cc4632"
      },
      "id": "1f7f8be6-f463-4b73-8e33-846a10d29b25",
      "links": {
        "self": "http://api.remotelock.dev/resort_lock_guests/1f7f8be6-f463-4b73-8e33-846a10d29b25",
        "resort_lock": "http://api.remotelock.dev/devices/816c5aa3-b669-4bfe-a44f-7532b2cc4632"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Get a resort lock guest

Request

Endpoint

GET /resort_lock_guests/:id

GET /resort_lock_guests/73b26ce5-be9c-467e-a468-2efca3b20dd2

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "resort_lock_guest",
    "attributes": {
      "name": "John Doe",
      "email": "john.doe@email.com",
      "starts_at": "2021-11-14T18:00:00",
      "ends_at": "2021-11-18T18:00:00",
      "one_time_access": false,
      "status": "upcoming",
      "source": null,
      "guest_source": null,
      "created_at": "2021-11-04T18:13:30Z",
      "updated_at": "2021-11-04T18:13:30Z",
      "pin": "1234567890",
      "resort_lock_id": "8388f8ac-c629-4911-9cf3-d4b9e1bd3087"
    },
    "id": "73b26ce5-be9c-467e-a468-2efca3b20dd2",
    "links": {
      "self": "http://api.remotelock.dev/resort_lock_guests/73b26ce5-be9c-467e-a468-2efca3b20dd2",
      "resort_lock": "http://api.remotelock.dev/devices/8388f8ac-c629-4911-9cf3-d4b9e1bd3087"
    }
  }
}

Create a resort lock guest

'Resort lock guest' has temporary location access limited by 'starts_at' and 'ends_at' parameters.

Request

Endpoint

POST /resort_lock_guests

POST /resort_lock_guests

Parameters

{
  "attributes": {
    "resort_lock_id": "a775747a-c214-4193-b44b-a4c88793864a",
    "name": "Ann Smith",
    "starts_at": "2020-01-02T13:00:00",
    "ends_at": "2021-01-02T16:00:00",
    "email": "darrell@veum.org"
  }
}
Name Description
attributes[resort_lock_id] required Resort Lock
attributes[name] required Name
attributes[starts_at] required Starts at ISO 8601 timestamp without time zone. Only hours are supported (minutes and seconds will be converted to zeros).
attributes[ends_at] required Ends at ISO 8601 timestamp without time zone. Only hours are supported (minutes and seconds will be converted to zeros).
attributes[email] Email
attributes[one_time_access] This PIN is only valid for a single entry between starts_at and ends_at. Default is false.

Response


201 Created
{
  "data": {
    "type": "resort_lock_guest",
    "attributes": {
      "name": "Ann Smith",
      "email": "darrell@veum.org",
      "starts_at": "2020-01-02T13:00:00",
      "ends_at": "2021-01-02T16:00:00",
      "one_time_access": false,
      "status": "expired",
      "source": null,
      "guest_source": null,
      "created_at": "2021-11-04T18:13:31Z",
      "updated_at": "2021-11-04T18:13:31Z",
      "pin": "619543987809",
      "resort_lock_id": "a775747a-c214-4193-b44b-a4c88793864a"
    },
    "id": "31590403-4901-4999-a789-240ea2f19307",
    "links": {
      "self": "http://api.remotelock.dev/resort_lock_guests/31590403-4901-4999-a789-240ea2f19307",
      "resort_lock": "http://api.remotelock.dev/devices/a775747a-c214-4193-b44b-a4c88793864a"
    }
  }
}

Update a resort lock guest

Request

Endpoint

PUT /resort_lock_guests/:id

PUT /resort_lock_guests/8edd05da-b93a-494d-a261-5772dbecd2bf

Parameters

{
  "attributes": {
    "name": "Jonatan Doery"
  }
}
Name Description
attributes[name] Name
attributes[email] Email

Response


200 OK
{
  "data": {
    "type": "resort_lock_guest",
    "attributes": {
      "name": "Jonatan Doery",
      "email": "john.doe@email.com",
      "starts_at": "2021-11-14T18:00:00",
      "ends_at": "2021-11-18T18:00:00",
      "one_time_access": false,
      "status": "upcoming",
      "source": null,
      "guest_source": null,
      "created_at": "2021-11-04T18:13:35Z",
      "updated_at": "2021-11-04T18:13:35Z",
      "pin": "1234567890",
      "resort_lock_id": "e2acda7b-4f34-48d6-9eb3-a1496057dcbc"
    },
    "id": "8edd05da-b93a-494d-a261-5772dbecd2bf",
    "links": {
      "self": "http://api.remotelock.dev/resort_lock_guests/8edd05da-b93a-494d-a261-5772dbecd2bf",
      "resort_lock": "http://api.remotelock.dev/devices/e2acda7b-4f34-48d6-9eb3-a1496057dcbc"
    }
  }
}

Delete a resort lock guest

Request

Endpoint

DELETE /resort_lock_guests/:id

DELETE /resort_lock_guests/d23d3b51-6465-4c34-acdc-c1b7a0cf541e

Parameters

None.

Response


204 No Content

Send access instructions email to resort lock guest

Request

Endpoint

POST /resort_lock_guests/:id/email/notify

POST /resort_lock_guests/129cac79-0bbb-4878-bffc-89ba7270114c/email/notify

Parameters

None.

Response


200 OK

Preview resort lock guest access instructions email

Request

Endpoint

GET /resort_lock_guests/:id/email/preview

GET /resort_lock_guests/799e63df-c70c-47e1-ab9d-02537dbff7bd/email/preview

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "access_instruction_guest_email_template",
    "attributes": {
      "subject": "Access instructions",
      "body": "<p>Dear John Doe,</p>\n\n<p>Here is your access code for your upcoming stay with us. Our property is equipped with a keyless entry door lock for your convenience.</p>\n\n<p>Access Code: 123-456-7890</p>\n\n<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" id=\"access-instructions\">\n  \n    <tr>\n      <td colspan=\"3\" width=\"100%\" align=\"left\" valign=\"top\">\n        Polarised zero administration application\n        (1638 Kathie Plains)\n      </td>\n    </tr>\n\n    \n      <tr>\n        <td width=\"3%\" align=\"left\" valign=\"top\"></td>\n        <td colspan=\"2\" width=\"97%\" align=\"left\" valign=\"top\">\n          <b>RL-4000 - 5NMCKCG30B4FBE01</b>\n        </td>\n      </tr>\n      <tr>\n        <td width=\"3%\" align=\"left\" valign=\"top\"></td>\n        <td width=\"3%\" align=\"left\" valign=\"top\"></td>\n        <td width=\"94%\" align=\"left\" valign=\"top\">\n          \n            Access times:\n            November 14, 2021  6:00 PM to November 18, 2021  6:00 PM\n            <br/>\n          \n          Access instruction:\n          <p><strong>Lock Instructions:</strong><br>\nThere are two methods to opening the lock on your vacation rental. One is to simply enter the 10 (or 12 if provided) digit Access Code above, followed by the &#39;#&#39; key. The other is to create your own shorter code for use during your stay.</p>\n\n<p>Method 1: Use Default Access Code Enter the following on the lock’s keypad: Access Code, # (Door will unlock)</p>\n\n<p>Method 2: Create Your Own Code (Can be 3 – 5 Digits)<br>\nStep 1: Hold the * key until green light is solid (About 2 seconds), then release.<br>\nStep 2: While green light is lit, enter Access Code, #, Your Own Code, #<br>\nNow you have programmed your own code into the lock. Next step is to unlock the door using the code you just created.<br>\nStep 3: Enter Your Code, # (Door will unlock)</p>\n\n        </td>\n      </tr>\n    \n  \n</table>\n\n<p>If you have any questions, please feel free to call us at (Phone not provided) or email at <a href=\"mailto:shirly@cummerata.io\">shirly@cummerata.io</a>.</p>\n\n<p>Regards,</p>\n\n<p>Rev. Joesph Krajcik</p>\n",
      "from_name": "Rev. Joesph Krajcik",
      "reply_to": "shirly@cummerata.io",
      "cc": null,
      "bcc": null
    },
    "links": {
      "self": "http://api.remotelock.dev/access_instruction_guest_email_template/preview"
    }
  }
}

Schedules

Get all schedule types (homogeneous)

Request

Endpoint

GET /schedules

GET /schedules

Parameters

Name Description
[type] Filter by type(s). Supported types: auto_lock_schedule, lock_action_schedule, access_schedule, power_plug_schedule, and thermostat_schedule
sort Sortable attributes: created_at and name, default: created_at ascending

Response


200 OK
{
  "data": [
    {
      "type": "access_schedule",
      "attributes": {
        "name": "Voluptas vero qui numquam.",
        "mon": [
          {
            "start_time": "09:00",
            "end_time": "17:00"
          }
        ],
        "tue": [
          {
            "start_time": "09:00",
            "end_time": "17:00"
          }
        ],
        "wed": [
          {
            "start_time": "09:00",
            "end_time": "17:00"
          }
        ],
        "thu": [
          {
            "start_time": "09:00",
            "end_time": "17:00"
          }
        ],
        "fri": [
          {
            "start_time": "09:00",
            "end_time": "15:00"
          }
        ],
        "sat": [
          {
            "start_time": "09:00",
            "end_time": "15:00"
          }
        ],
        "sun": [
          {
            "start_time": "09:00",
            "end_time": "15:00"
          }
        ],
        "created_at": "2021-11-04T18:13:48Z",
        "updated_at": "2021-11-04T18:13:48Z"
      },
      "id": "910ce416-c5f5-4dbc-8c08-e6e4b2f257d3",
      "links": {
        "self": "http://api.remotelock.dev/schedules/910ce416-c5f5-4dbc-8c08-e6e4b2f257d3"
      }
    },
    {
      "type": "auto_lock_schedule",
      "attributes": {
        "name": "At sit accusamus ut.",
        "mon": [
          {
            "time": "09:00",
            "enable": false
          },
          {
            "time": "17:00",
            "enable": true
          }
        ],
        "tue": [
          {
            "time": "09:00",
            "enable": false
          },
          {
            "time": "17:00",
            "enable": true
          }
        ],
        "wed": [
          {
            "time": "09:00",
            "enable": false
          },
          {
            "time": "17:00",
            "enable": true
          }
        ],
        "thu": [
          {
            "time": "09:00",
            "enable": false
          },
          {
            "time": "17:00",
            "enable": true
          }
        ],
        "fri": [
          {
            "time": "09:00",
            "enable": false
          },
          {
            "time": "15:00",
            "enable": true
          }
        ],
        "sat": [
          {
            "time": "09:00",
            "enable": false
          },
          {
            "time": "15:00",
            "enable": true
          }
        ],
        "sun": [
          {
            "time": "09:00",
            "enable": false
          },
          {
            "time": "15:00",
            "enable": true
          }
        ],
        "created_at": "2021-11-04T18:13:48Z",
        "updated_at": "2021-11-04T18:13:48Z"
      },
      "id": "e008dd1e-3496-4c6c-b50b-dc1736a72784",
      "links": {
        "self": "http://api.remotelock.dev/schedules/e008dd1e-3496-4c6c-b50b-dc1736a72784"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_count": 2,
    "total_pages": 1
  }
}

Get a schedule

Request

Endpoint

GET /schedules/:id

GET /schedules/b8f32266-6369-44a0-9ce6-ab20cbabe2b8

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "access_schedule",
    "attributes": {
      "name": "Est id enim nobis.",
      "mon": [
        {
          "start_time": "09:00",
          "end_time": "17:00"
        }
      ],
      "tue": [
        {
          "start_time": "09:00",
          "end_time": "17:00"
        }
      ],
      "wed": [
        {
          "start_time": "09:00",
          "end_time": "17:00"
        }
      ],
      "thu": [
        {
          "start_time": "09:00",
          "end_time": "17:00"
        }
      ],
      "fri": [
        {
          "start_time": "09:00",
          "end_time": "15:00"
        }
      ],
      "sat": [
        {
          "start_time": "09:00",
          "end_time": "15:00"
        }
      ],
      "sun": [
        {
          "start_time": "09:00",
          "end_time": "15:00"
        }
      ],
      "created_at": "2021-11-04T18:13:48Z",
      "updated_at": "2021-11-04T18:13:48Z"
    },
    "id": "b8f32266-6369-44a0-9ce6-ab20cbabe2b8",
    "links": {
      "self": "http://api.remotelock.dev/schedules/b8f32266-6369-44a0-9ce6-ab20cbabe2b8"
    }
  }
}

Update a schedule

Parameters accepted: all used for create

Request

Endpoint

PUT /schedules/:id

PUT /schedules/ec4b9b0d-7d19-49f1-ae06-b28760f4415c

Parameters

{
  "attributes": {
    "name": "New schedule name"
  }
}

None.

Response


200 OK
{
  "data": {
    "type": "access_schedule",
    "attributes": {
      "name": "New schedule name",
      "mon": [
        {
          "start_time": "09:00",
          "end_time": "17:00"
        }
      ],
      "tue": [
        {
          "start_time": "09:00",
          "end_time": "17:00"
        }
      ],
      "wed": [
        {
          "start_time": "09:00",
          "end_time": "17:00"
        }
      ],
      "thu": [
        {
          "start_time": "09:00",
          "end_time": "17:00"
        }
      ],
      "fri": [
        {
          "start_time": "09:00",
          "end_time": "15:00"
        }
      ],
      "sat": [
        {
          "start_time": "09:00",
          "end_time": "15:00"
        }
      ],
      "sun": [
        {
          "start_time": "09:00",
          "end_time": "15:00"
        }
      ],
      "created_at": "2021-11-04T18:13:49Z",
      "updated_at": "2021-11-04T18:13:49Z"
    },
    "id": "ec4b9b0d-7d19-49f1-ae06-b28760f4415c",
    "links": {
      "self": "http://api.remotelock.dev/schedules/ec4b9b0d-7d19-49f1-ae06-b28760f4415c"
    }
  }
}

Delete a schedule

Request

Endpoint

DELETE /schedules/:id

DELETE /schedules/56025465-e365-4ac5-8ecd-610fb6379f90

Parameters

None.

Response


204 No Content

Create an access schedule

Request

Endpoint

POST /schedules

POST /schedules

Parameters

{
  "type": "access_schedule",
  "attributes": {
    "name": "Work access schedule",
    "mon": [
      {
        "start_time": "08:00",
        "end_time": "12:00"
      },
      {
        "start_time": "13:00",
        "end_time": "18:00"
      }
    ],
    "wed": [
      {
        "start_time": "08:00",
        "end_time": "12:00"
      },
      {
        "start_time": "13:00",
        "end_time": "18:00"
      }
    ],
    "fri": [
      {
        "start_time": "08:00",
        "end_time": "12:00"
      },
      {
        "start_time": "13:00",
        "end_time": "18:00"
      }
    ],
    "access_exception_id": "2db8c972-2ad5-496c-98f8-d02477f4a169"
  }
}
Name Description
type required access_schedule
attributes[name] required Schedule name
attributes[mon] [{ "start_time": "08:00", "end_time": "12:00" }, ...] or []
attributes[tue] [{ "start_time": "08:00", "end_time": "12:00" }, ...] or []
attributes[wed] [{ "start_time": "08:00", "end_time": "12:00" }, ...] or []
attributes[thu] [{ "start_time": "08:00", "end_time": "12:00" }, ...] or []
attributes[fri] [{ "start_time": "08:00", "end_time": "12:00" }, ...] or []
attributes[sat] [{ "start_time": "08:00", "end_time": "12:00" }, ...] or []
attributes[sun] [{ "start_time": "08:00", "end_time": "12:00" }, ...] or []
attributes[access_exception_id] Access Exception

Response


201 Created
{
  "data": {
    "type": "access_schedule",
    "attributes": {
      "name": "Work access schedule",
      "mon": [
        {
          "start_time": "08:00",
          "end_time": "12:00"
        },
        {
          "start_time": "13:00",
          "end_time": "18:00"
        }
      ],
      "tue": [

      ],
      "wed": [
        {
          "start_time": "08:00",
          "end_time": "12:00"
        },
        {
          "start_time": "13:00",
          "end_time": "18:00"
        }
      ],
      "thu": [

      ],
      "fri": [
        {
          "start_time": "08:00",
          "end_time": "12:00"
        },
        {
          "start_time": "13:00",
          "end_time": "18:00"
        }
      ],
      "sat": [

      ],
      "sun": [

      ],
      "created_at": "2021-11-04T18:13:50Z",
      "updated_at": "2021-11-04T18:13:50Z",
      "access_exception_id": "2db8c972-2ad5-496c-98f8-d02477f4a169"
    },
    "id": "1c4465a1-ce0f-41aa-90da-a2c56be4c7e8",
    "links": {
      "self": "http://api.remotelock.dev/schedules/1c4465a1-ce0f-41aa-90da-a2c56be4c7e8",
      "access_exception": "http://api.remotelock.dev/access_exceptions/2db8c972-2ad5-496c-98f8-d02477f4a169"
    }
  }
}

Create an auto lock schedule

Request

Endpoint

POST /schedules

POST /schedules

Parameters

{
  "type": "auto_lock_schedule",
  "attributes": {
    "name": "Switch auto-lock mode in working period",
    "mon": [
      {
        "time": "08:00",
        "enable": false
      },
      {
        "time": "18:00",
        "enable": true
      }
    ],
    "wed": [
      {
        "time": "08:00",
        "enable": false
      },
      {
        "time": "18:00",
        "enable": true
      }
    ],
    "fri": [
      {
        "time": "08:00",
        "enable": false
      },
      {
        "time": "18:00",
        "enable": true
      }
    ]
  }
}
Name Description
type required auto_lock_schedule
attributes[name] required Schedule name
attributes[mon] [{ "time": "08:00", enable: false }, { "time": "18:00", enable: true }, ...] or []
attributes[tue] [{ "time": "08:00", enable: false }, { "time": "18:00", enable: true }, ...] or []
attributes[wed] [{ "time": "08:00", enable: false }, { "time": "18:00", enable: true }, ...] or []
attributes[thu] [{ "time": "08:00", enable: false }, { "time": "18:00", enable: true }, ...] or []
attributes[fri] [{ "time": "08:00", enable: false }, { "time": "18:00", enable: true }, ...] or []
attributes[sat] [{ "time": "08:00", enable: false }, { "time": "18:00", enable: true }, ...] or []
attributes[sun] [{ "time": "08:00", enable: false }, { "time": "18:00", enable: true }, ...] or []

Response


201 Created
{
  "data": {
    "type": "auto_lock_schedule",
    "attributes": {
      "name": "Switch auto-lock mode in working period",
      "mon": [
        {
          "time": "08:00",
          "enable": false
        },
        {
          "time": "18:00",
          "enable": true
        }
      ],
      "tue": [

      ],
      "wed": [
        {
          "time": "08:00",
          "enable": false
        },
        {
          "time": "18:00",
          "enable": true
        }
      ],
      "thu": [

      ],
      "fri": [
        {
          "time": "08:00",
          "enable": false
        },
        {
          "time": "18:00",
          "enable": true
        }
      ],
      "sat": [

      ],
      "sun": [

      ],
      "created_at": "2021-11-04T18:13:51Z",
      "updated_at": "2021-11-04T18:13:51Z"
    },
    "id": "622c13cb-b693-4d23-81ce-8210f4e60094",
    "links": {
      "self": "http://api.remotelock.dev/schedules/622c13cb-b693-4d23-81ce-8210f4e60094"
    }
  }
}

Create a lock action schedule

Request

Endpoint

POST /schedules

POST /schedules

Parameters

{
  "type": "lock_action_schedule",
  "attributes": {
    "name": "Automatically unlock and lock",
    "mon": [
      {
        "time": "08:00",
        "action": "unlock"
      },
      {
        "time": "18:00",
        "action": "lock"
      }
    ],
    "wed": [
      {
        "time": "08:00",
        "action": "unlock"
      },
      {
        "time": "18:00",
        "action": "lock"
      }
    ],
    "fri": [
      {
        "time": "08:00",
        "action": "unlock"
      },
      {
        "time": "18:00",
        "action": "lock"
      }
    ]
  }
}
Name Description
type required lock_action_schedule
attributes[name] required Schedule name
attributes[mon] [{ "time": "08:00", action: "unlock" }, { "time": "18:00", action: "lock" }, ...] or []
attributes[tue] [{ "time": "08:00", action: "unlock" }, { "time": "18:00", action: "lock" }, ...] or []
attributes[wed] [{ "time": "08:00", action: "unlock" }, { "time": "18:00", action: "lock" }, ...] or []
attributes[thu] [{ "time": "08:00", action: "unlock" }, { "time": "18:00", action: "lock" }, ...] or []
attributes[fri] [{ "time": "08:00", action: "unlock" }, { "time": "18:00", action: "lock" }, ...] or []
attributes[sat] [{ "time": "08:00", action: "unlock" }, { "time": "18:00", action: "lock" }, ...] or []
attributes[sun] [{ "time": "08:00", action: "unlock" }, { "time": "18:00", action: "lock" }, ...] or []

Response


201 Created
{
  "data": {
    "type": "lock_action_schedule",
    "attributes": {
      "name": "Automatically unlock and lock",
      "mon": [
        {
          "time": "08:00",
          "action": "unlock"
        },
        {
          "time": "18:00",
          "action": "lock"
        }
      ],
      "tue": [

      ],
      "wed": [
        {
          "time": "08:00",
          "action": "unlock"
        },
        {
          "time": "18:00",
          "action": "lock"
        }
      ],
      "thu": [

      ],
      "fri": [
        {
          "time": "08:00",
          "action": "unlock"
        },
        {
          "time": "18:00",
          "action": "lock"
        }
      ],
      "sat": [

      ],
      "sun": [

      ],
      "created_at": "2021-11-04T18:13:51Z",
      "updated_at": "2021-11-04T18:13:51Z"
    },
    "id": "857aa3df-8beb-43e0-b8a6-357ec3ddba27",
    "links": {
      "self": "http://api.remotelock.dev/schedules/857aa3df-8beb-43e0-b8a6-357ec3ddba27"
    }
  }
}

Create a power plug schedule

Request

Endpoint

POST /schedules

POST /schedules

Parameters

{
  "type": "power_plug_schedule",
  "attributes": {
    "name": "Automatically turn on and off",
    "mon": [
      {
        "time": "08:00",
        "action": "on"
      },
      {
        "time": "18:00",
        "action": "off"
      }
    ],
    "wed": [
      {
        "time": "08:00",
        "action": "on"
      },
      {
        "time": "18:00",
        "action": "off"
      }
    ],
    "fri": [
      {
        "time": "08:00",
        "action": "on"
      },
      {
        "time": "18:00",
        "action": "off"
      }
    ]
  }
}
Name Description
type required power_plug_schedule
attributes[name] required Schedule name
attributes[mon] [{ "time": "08:00", action: "on" }, { "time": "18:00", action: "off" }, ...] or []
attributes[tue] [{ "time": "08:00", action: "on" }, { "time": "18:00", action: "off" }, ...] or []
attributes[wed] [{ "time": "08:00", action: "on" }, { "time": "18:00", action: "off" }, ...] or []
attributes[thu] [{ "time": "08:00", action: "on" }, { "time": "18:00", action: "off" }, ...] or []
attributes[fri] [{ "time": "08:00", action: "on" }, { "time": "18:00", action: "off" }, ...] or []
attributes[sat] [{ "time": "08:00", action: "on" }, { "time": "18:00", action: "off" }, ...] or []
attributes[sun] [{ "time": "08:00", action: "on" }, { "time": "18:00", action: "off" }, ...] or []

Response


201 Created
{
  "data": {
    "type": "power_plug_schedule",
    "attributes": {
      "name": "Automatically turn on and off",
      "mon": [
        {
          "time": "08:00",
          "action": "on"
        },
        {
          "time": "18:00",
          "action": "off"
        }
      ],
      "tue": [

      ],
      "wed": [
        {
          "time": "08:00",
          "action": "on"
        },
        {
          "time": "18:00",
          "action": "off"
        }
      ],
      "thu": [

      ],
      "fri": [
        {
          "time": "08:00",
          "action": "on"
        },
        {
          "time": "18:00",
          "action": "off"
        }
      ],
      "sat": [

      ],
      "sun": [

      ],
      "created_at": "2021-11-04T18:13:52Z",
      "updated_at": "2021-11-04T18:13:52Z"
    },
    "id": "6f80ccd9-8cc0-4f90-b363-36a42254406d",
    "links": {
      "self": "http://api.remotelock.dev/schedules/6f80ccd9-8cc0-4f90-b363-36a42254406d"
    }
  }
}

Create a thermostat schedule

Request

Endpoint

POST /schedules

POST /schedules

Parameters

{
  "type": "thermostat_schedule",
  "attributes": {
    "name": "Changes thermostat cool/heat temperatures",
    "mon": [
      {
        "time": "08:00",
        "cool": 60,
        "heat": 70
      },
      {
        "time": "18:00",
        "cool": 40,
        "heat": 80
      }
    ],
    "tue": [
      {
        "time": "08:00",
        "cool": 60,
        "heat": 70
      },
      {
        "time": "18:00",
        "cool": 40,
        "heat": 80
      }
    ],
    "wed": [
      {
        "time": "08:00",
        "cool": 60,
        "heat": 70
      },
      {
        "time": "18:00",
        "cool": 40,
        "heat": 80
      }
    ],
    "thu": [
      {
        "time": "08:00",
        "cool": 60,
        "heat": 70
      },
      {
        "time": "18:00",
        "cool": 40,
        "heat": 80
      }
    ],
    "fri": [
      {
        "time": "08:00",
        "cool": 60,
        "heat": 70
      },
      {
        "time": "18:00",
        "cool": 40,
        "heat": 80
      }
    ],
    "sat": [
      {
        "time": "08:00",
        "cool": 60,
        "heat": 70
      },
      {
        "time": "18:00",
        "cool": 40,
        "heat": 80
      }
    ],
    "sun": [
      {
        "time": "08:00",
        "cool": 60,
        "heat": 70
      },
      {
        "time": "18:00",
        "cool": 40,
        "heat": 80
      }
    ]
  }
}
Name Description
type required thermostat_schedule
attributes[name] required Schedule name
attributes[mon] [{ "time": "08:00", "cool": 40, "heat": 80 }, ...]
attributes[tue] [{ "time": "08:00", "cool": 40, "heat": 80 }, ...]
attributes[wed] [{ "time": "08:00", "cool": 40, "heat": 80 }, ...]
attributes[thu] [{ "time": "08:00", "cool": 40, "heat": 80 }, ...]
attributes[fri] [{ "time": "08:00", "cool": 40, "heat": 80 }, ...]
attributes[sat] [{ "time": "08:00", "cool": 40, "heat": 80 }, ...]
attributes[sun] [{ "time": "08:00", "cool": 40, "heat": 80 }, ...]

Response


201 Created
{
  "data": {
    "type": "thermostat_schedule",
    "attributes": {
      "name": "Changes thermostat cool/heat temperatures",
      "mon": [
        {
          "time": "08:00",
          "cool": 60,
          "heat": 70
        },
        {
          "time": "18:00",
          "cool": 40,
          "heat": 80
        }
      ],
      "tue": [
        {
          "time": "08:00",
          "cool": 60,
          "heat": 70
        },
        {
          "time": "18:00",
          "cool": 40,
          "heat": 80
        }
      ],
      "wed": [
        {
          "time": "08:00",
          "cool": 60,
          "heat": 70
        },
        {
          "time": "18:00",
          "cool": 40,
          "heat": 80
        }
      ],
      "thu": [
        {
          "time": "08:00",
          "cool": 60,
          "heat": 70
        },
        {
          "time": "18:00",
          "cool": 40,
          "heat": 80
        }
      ],
      "fri": [
        {
          "time": "08:00",
          "cool": 60,
          "heat": 70
        },
        {
          "time": "18:00",
          "cool": 40,
          "heat": 80
        }
      ],
      "sat": [
        {
          "time": "08:00",
          "cool": 60,
          "heat": 70
        },
        {
          "time": "18:00",
          "cool": 40,
          "heat": 80
        }
      ],
      "sun": [
        {
          "time": "08:00",
          "cool": 60,
          "heat": 70
        },
        {
          "time": "18:00",
          "cool": 40,
          "heat": 80
        }
      ],
      "created_at": "2021-11-04T18:13:52Z",
      "updated_at": "2021-11-04T18:13:52Z"
    },
    "id": "d8c30fcf-783f-44e6-acac-58ab05962540",
    "links": {
      "self": "http://api.remotelock.dev/schedules/d8c30fcf-783f-44e6-acac-58ab05962540"
    }
  }
}

Users

Get signed in user

Request

Endpoint

GET /user

GET /user

Parameters

None.

Response


200 OK
{
  "data": {
    "type": "user",
    "attributes": {
      "name": "William Gusikowski",
      "email": "rosendo_kub@goldner.biz",
      "handle": "rosendo_kub",
      "created_at": "2021-11-04T18:16:12Z",
      "updated_at": "2021-11-04T18:16:12Z",
      "primary_account_id": "15554f37-d12a-437a-a5a4-29da44397aab",
      "default_account_id": "15554f37-d12a-437a-a5a4-29da44397aab"
    },
    "id": "26e55266-cd18-42a8-b527-3ab9f3c569bb",
    "links": {
      "self": "http://api.remotelock.dev/user",
      "primary_account": "http://api.remotelock.dev/account",
      "default_account": "http://api.remotelock.dev/account"
    }
  }
}