Abloy BEAT Administration API (0.9.0)

Download OpenAPI specification:

Abloy BEAT Administrator: info@example.com URL: https://www.assaabloy.com/ License: UNLICENSED

The purpose of this API is to manage users, locks and access permissions to operate locks

Getting Started

The basic workflow to get started is the following:

  1. Invite users in to the system.
  2. Add locks in to the system.
  3. Give a user permissions to operate certain lock in the system.

Also check how to delete users and revoke permissions.

API Version

The API version needs to be passed in the request Accept header using the vendor-specific media type application/vnd.assaabloy.abloybeat.administration-0.9+json.

Migration to version 2.0

This section describes the differences between the 0.9 and 2.0 versions of the Administration API. Use this guide during the migration process. Since there are significant differences between the two versions, it is recommended to manually check every place where the API is directly invoked.

URL changes

The 2.0 version of the API lives under a different URL.

The URL changes for the staging are the following:

  • 0.9 - https://apigw.sampo-staging.aah.assaabloy.net/administration/
  • 2.0 - https://eu-staging-api.keyless.assaabloy.com/administration/

The URL changes for the production are the following:

  • 0.9 - https://eu-apigw.abloybeat.api.assaabloy.com/administration/
  • 2.0 - https://eu-api.keyless.assaabloy.com/administration/

Media Type changes

The API continues to use media types for content negotiation in version 2.0. Every request must provide a specific media type in the Accept header, which is also the Content-Type header of the response on a successful execution. Starting from API 2.0, only the major version is used in content negotiation. Also notice that the "abloybeat" is changed to "keyless" to be aligned with the new domain name of the API.

The Accept header changes are the following:

  • 0.9 - application/vnd.assaabloy.abloybeat.administration-0.9+json
  • 2.0 - application/vnd.assaabloy.keyless.administration-2+json

Introducing API keys and rate limiting

API keys are a new concept, and it is recommended to check out the relevant section of the 2.0 documentation.

In short:

  • It is required to have an API key to access to 2.0 version of the API. This should be provided to you by your ASSA ABLOY contact person.
  • Provide the API key in the X-Api-Key header for every request.
  • If the key is invalid, the request will return 403 Forbidden.
  • If a rate limit is reached, the request will return 429 Too Many Requests. In that case the request should be retried after some delay.

Prepare the integrated applications for reaching the rate limit and make sure it is handled gracefully.

Changes to users and the registration process

In 0.9 the person, who can receive permissions, and his/her device, that can operate locks based on those permissions, are both represented by the User entity.

In 2.0 these two concepts are split into two different entities. User represent the person, who can receive permissions. Operating Device represent the mobile device that can interact with the lock.

This means changes in the registration process.

In 0.9 a user can be invited by the POST /invitation endpoint. This takes care of both creating the user account and registering the mobile device. The user credentials were returned in a callback.

In 2.0 this is a two-step process.

  • First a user needs to be created with POST /user. This will return the user's credentials.
  • Then an operating device needs to be invited for the user with POST /operating-device-invitation.

This process is described in more detail later in this guide.

For admin users who would like to access the API but will not operate the locks, it is enough to create the user. Inviting an operating device is not necessary.

Changes per endpoint

GET /lock

In 2.0 this endpoint maps to GET /locking-device

Notable changes:

  • The paging style has changed to a token based paging. Page, size and sort query parameters are no longer acceptable and the response's paging information is also different. Consult the documentation of the new endpoint for the changes.
  • The claimed query parameter is replaced by claiming-status, and it is not a required parameter anymore. The claiming status also now appears in the response in a field named claimingStatus.
  • lockingDeviceSerialNumber query parameter changes to serial-number.
  • lockingDeviceSerialNumber field in the returned entity changes to serialNumber.

GET /lock/{id}

In 2.0, this endpoint maps to GET /locking-device/{locking-device-id}

POST /lock

In 2.0, this endpoint maps to POST /locking-device

PUT /lock/{id}

In 2.0, this endpoint maps to PATCH /locking-device/{locking-device-id}

The same thing could be achieved in both cases: updating the name of the locking device. However, the PATCH syntax is radically different. Refer to the API 2.0 docs on how to use it.

POST /permission

In 2.0, this endpoint maps to POST /permission

In 2.0 the structure of the request body has been redesigned. Unlike in 0.9, the request content type is always application/json. Every request body contains the fields of userId, lockingDeviceId (lockId in 0.9), operationType (type in 0.9) and the permissionType. Permission type is a new field introduced in 2.0. It determines if the created permission is single interval, recurring or multiple interval. Based on the permission type, there will be additional fields in the request body.

  • On permissionType=SINGLE_INTERVAL start and end fields will be required, which map to the start and end fields of the 0.9 request. However, in 0.9 they were not required.
  • On permissionType=RECURRING start, end, weekday and intervals fields will be available, from which intervals will be required. These map to the fields of the recurrence object in the 0.9 request body.
  • On permissionType=MULTIPLE_INTERVALS the intervals fields will be required. This maps to the interval field of the 0.9 request body with content type application/multiple.intervals+json.

PUT /permission/{id}

In 2.0, this endpoint maps to PUT /permission/{permission-id}

The changes to this endpoint are identical to the changes described under POST /permission

DELETE /permission/{id}

In 2.0, this endpoint maps to DELETE /permission/{permission-id}

POST /invitation

In 2.0, there is no direct mapping for this endpoint. It is required to call two separate endpoints in correct order to achieve the same result.

First call POST /user where the role field maps to the role field of POST /invitation from 0.9.

Then call POST /operating-device-invitation. The userId field maps to the id field from the response of the previous POST /user.

The validityDuration field maps to the validFor field of POST /invitation from 0.9.

The deliveryMechanism field partially maps to the contact/type field of POST /invitation from 0.9. It also introduces new fields to the request body based on its value.

  • The deliveryMechanism=SMS means the same as contact/type=PHONE in POST /invitation in 0.9. In this case, the required phoneNumber field maps to the contact/value of POST /invitation from 0.9.
  • The deliveryMechanism=EMAIL means the same as contact/type=EMAIL in POST /invitation in 0.9. In this case, the required emailAddress field maps to the contact/value of POST /invitation from 0.9.
  • The deliveryMechanism=NONE will map the whole request to the POST /invitation-code from 0.9

The id field in the response of POST /operating-device-invitation maps to the id field in the response of POST /invitation

The expirationDatetime field in the response of POST /operating-device-invitation maps to the expiresAt field in the response of POST /invitation

POST /invitation-code

In 2.0, there is no direct mapping for this endpoint. It is required to call two separate endpoints in correct order to achieve the same result.

First call POST /user where the role field maps to the role field of POST /invitation-code from 0.9.

Then call POST /operating-device-invitation. The userId field maps to the id field from the response of the previous POST /user.

The validityDuration field maps to the validFor field of POST /invitation from 0.9.

The deliveryMechanism filed has to be set to NONE: deliveryMechanism=NONE

In this case, the fields in the response of POST /operating-device-invitation will directly map to the fields in the response of POST /invitation-code from 0.9.

GET /user

In 2.0, this endpoint maps to GET /user

DELETE /user/{id}

In 2.0, this endpoint maps to DELETE /user/{user-id}

POST /login

In 2.0, this endpoint maps to POST /login/

Locks

To add locks to the system one must first create an unclaimed lock. Unclaimed locks are not yet connected to physical locks. To make this connection, you have to register the lock with the Abloy BEAT mobile app. Registering an unclaimed lock claims the lock for the account being used.

Get locks

Returns list of all the locks in the system satisfying the given criteria

Authorizations:
JWT
query Parameters
claimed
required
boolean

Whether to return claimed or unclaimed locks.

lockingDeviceSerialNumber
string

Serial number of the claimed lock. Unclaimed lock does not have a serial number.

page
integer <int32> >= 0
Default: 0

Page number (starts from 0)

size
integer <int32> [ 1 .. 100 ]
Default: 20

Defines the maximum number of items returned

sort
string
Example: sort=name&sort=asc

Sorting property and optional direction

Responses

Response samples

Content type
{
  • "content": [
    ],
  • "page": {
    }
}

Create an unclaimed lock

Creates an unclaimed lock. At this point the lock is not yet connected to a physical lock. The lock must be first registered by a Abloy BEAT mobile device, which will claim the lock for the account being used.

Authorizations:
JWT
Request Body schema: application/json
name
required
string [ 1 .. 255 ] characters

Name of the lock

Responses

Request samples

Content type
application/json
{
  • "name": "Front Gate"
}

Response samples

Content type
application/vnd.assaabloy.abloybeat.administration-0.9+json
{
  • "id": "02828588-2c7f-4847-b011-e489eb01f872",
  • "name": "Front Gate"
}

Update lock

Updates an existing lock

Authorizations:
JWT
path Parameters
id
required
string <uuid>

The lock identifier

Request Body schema: application/json
id
string <uuid>

Identifier of the lock

name
string [ 1 .. 255 ] characters

Name of the lock

Responses

Request samples

Content type
application/json
{
  • "name": "Front Gate"
}

Response samples

Content type
application/problem+json
{
  • "type": "about:blank",
  • "title": "Bad Request",
  • "status": 400,
  • "detail": "Invalid content type",
  • "instance": "about:blank"
}

Get a lock

Returns the requested lock from caller's system.

Authorizations:
JWT
path Parameters
id
required
string <uuid> (ResourceId)
Example: 558aef6a-de33-4e6c-8219-1eab9727ae94

The lock identifier

Responses

Response samples

Content type
application/vnd.assaabloy.abloybeat.administration-0.9+json
{
  • "id": "44663879-9a8f-4cca-b235-587d06ff7ba8",
  • "name": "Gate Lock",
  • "lockingDeviceSerialNumber": "BLAD123456",
  • "operationalCertificate": {
    },
  • "manufacturingCertificate": {
    }
}

Permissions

Permissions are used to manage users' access to locks.

Grant permission to operate a lock

Grants the user a permission to perform a specific operation on a lock.

Operation types

The following operations are supported on the locks:

  • OPEN: Permission to open the lock.
  • UPDATE_FIRMWARE: Permission to update lock firmware. This also includes the permission the open the lock.
  • UPDATE_TIME: Permission to update lock time

Permission types

One time permission

This type of permission has a single start and end date. The end date can be at most eight days into the future.

In order to create a one time permission the request must have application/json in the Content Type header and it must include all required parameters plus the start and end parameters.

Recurring permission

This type of permission contains a list of time intervals that is repeated daily.

The intervals of a recurring permission describe the time of the day during which the permission is active. Weekdays of a recurring permission describe the days on which the rule is repeated. If weekdays are not provided, the rule repeats every day.

Recurring permissions can be valid as long in the future as necessary, but permissions returned to clients will be limited at most eight days in the future.

In order to create a recurring permission the request must have application/json in the Content Type header and it must include all required parameters plus recurrence parameter.

Multiple interval permission

This type of permission can specify multiple time intervals. Those time intervals are not limited to a single day. For every interval, the end time has to be after the start time. The implementation supports only minutes accuracy. Seconds will be ignored.

In order to create a multiple interval permission the request must have application/multiple.intervals+json in the Content Type header and it must include all required parameters.

Check the payload examples for different use cases.

Automatic removal of old permissions

Platform will remove old permissions periodically.

For the removal, a permission is considered old, when its range end time is over 14 days in the past.

Authorizations:
JWT
Request Body schema:
lockId
required
string <uuid>

Identifier of the lock

start
string <date-time>

Start date and time of the permission (ISO 8601). Not needed if recurrence is present.

end
string <date-time>

End date and time of the permission (ISO 8601). Not needed if recurrence is present.

type
required
string (PermissionType)
Enum: "OPEN" "UPDATE_FIRMWARE" "UPDATE_TIME"

Permission type

userId
required
string <uuid>

Identifier of the user

object (Recurrence)

Permission recurrence rule

operatingKeyValidityDuration
string <duration> (OperatingKeyValidityDuration)
Default: "P8D"

Validity duration (ISO 8601) of an operating key generated based on the permission

Operating key validity duration defines how long an operating key downloaded for offline use is valid for. Even if a user would have a permission to open a locking device for a period of 1 year, when they download an operating key based on this permission, that operating key will only be valid for 8 days by default. After that, they need to download operating keys again.

Setting a long validity duration has a downside from security perspective, as revoking a permission does not affect the already downloaded operating key. Setting a short validity duration is most secure, but can be problematic in areas without internet connectivity.

Note: Must be greater than or equal to 1 day and less than or equal to 31 days.

Responses

Request samples

Content type
Example
{
  • "userId": "be2c1dc6-48ca-4b4a-966e-bf46018cbdc7",
  • "lockId": "0a323b61-0497-4865-991c-c1420aa2d829",
  • "type": "OPEN",
  • "start": "2019-09-02T15:00:00Z",
  • "end": "2019-09-02T18:00:00Z",
  • "operatingKeyValidityDuration": "P8D"
}

Response samples

Content type
application/vnd.assaabloy.abloybeat.administration-0.9+json
{
  • "id": "eee5c5cf-8bce-4876-8fab-2197cbb78426"
}

Update an existing permission

This operation replaces a permission between a lock and a user. Every field of the given permission is changed but it will retain its old id.

See the create permission endpoint for more information.

Authorizations:
JWT
path Parameters
id
required
string <uuid>

Identifier of the permission

Request Body schema:
lockId
required
string <uuid>

Identifier of the lock

start
string <date-time>

Start date and time of the permission (ISO 8601). Not needed if recurrence is present.

end
string <date-time>

End date and time of the permission (ISO 8601). Not needed if recurrence is present.

type
required
string (PermissionType)
Enum: "OPEN" "UPDATE_FIRMWARE" "UPDATE_TIME"

Permission type

userId
required
string <uuid>

Identifier of the user

object (Recurrence)

Permission recurrence rule

operatingKeyValidityDuration
string <duration> (OperatingKeyValidityDuration)
Default: "P8D"

Validity duration (ISO 8601) of an operating key generated based on the permission

Operating key validity duration defines how long an operating key downloaded for offline use is valid for. Even if a user would have a permission to open a locking device for a period of 1 year, when they download an operating key based on this permission, that operating key will only be valid for 8 days by default. After that, they need to download operating keys again.

Setting a long validity duration has a downside from security perspective, as revoking a permission does not affect the already downloaded operating key. Setting a short validity duration is most secure, but can be problematic in areas without internet connectivity.

Note: Must be greater than or equal to 1 day and less than or equal to 31 days.

Responses

Request samples

Content type
Example
{
  • "userId": "be2c1dc6-48ca-4b4a-966e-bf46018cbdc7",
  • "lockId": "0a323b61-0497-4865-991c-c1420aa2d829",
  • "type": "OPEN",
  • "start": "2019-09-02T15:00:00Z",
  • "end": "2019-09-02T18:00:00Z",
  • "operatingKeyValidityDuration": "P8D"
}

Response samples

Content type
application/problem+json
{
  • "type": "about:blank",
  • "title": "Bad Request",
  • "status": 400,
  • "detail": "Invalid content type",
  • "instance": "about:blank"
}

Revoke permission to operate a lock

Revokes user's permission to operate a lock.

Authorizations:
JWT
path Parameters
id
required
string <uuid>

Identifier of the permission

Responses

Response samples

Content type
application/problem+json
{
  • "type": "about:blank",
  • "title": "Bad Request",
  • "status": 400,
  • "detail": "Invalid content type",
  • "instance": "about:blank"
}

Users

To add users to the system they always need to be invited. The invited user will receive an invitation code. The invited user then needs to activate his mobile device from the Abloy BEAT mobile app.

An activated user can be also deleted, which will remove all accesses the user has, and prevent further accesses from being granted.

Invite a user

Sends a user an invitation to the application by the selected delivery mechanism.

Returns an invitation identifier that will be used for asynchronous user creation.

Once the user is created in the system, a UserRegistered event is triggered containing the access key of the user.

Once the user accepts the invitation, an UserActivated event is triggered containing the invitation identifier.

Authorizations:
JWT
header Parameters
TENANT-ID
required
string <uuid> (ResourceId)
Example: cf3e43ac-4c35-4de4-98a0-abb41dbe5b11

Tenant id

Request Body schema: application/json
role
required
string
Enum: "USER" "ADMIN"

Role given to the invited contact

required
object

Contact to whom invitation code should be sent.

Type of contact Value
PHONE Phone number must be valid E.164 format
EMAIL Email address of the user
validFor
string <ISO8601 duration>

Invitation code validity in hours in ISO8601 duration format.
For example: 24 hours PT24H, 12 hours PT12H

Note: Must be greater than 0 seconds and less than or equal to 365 days. Defaults to 24 hours.

Responses

Request samples

Content type
application/json
Example
{
  • "contact": {
    },
  • "role": "USER",
  • "validFor": "PT24H"
}

Response samples

Content type
{
  • "id": "ccbe0539-ab8a-4d95-9dd9-2c7d3e4adacd"
}

Generate invitation code

Generates an invitation for the mobile application to the system.

Returns invitation details including an invitation code and an environment url that can be used to invite custom mobile application using mobile SDK.

Once the user is created in the system, a UserRegistered event is triggered containing the access key of the user.

Once the user accepts the invitation, an UserActivated event is triggered containing the invitation identifier.

Authorizations:
JWT
header Parameters
TENANT-ID
required
string <uuid> (ResourceId)
Example: cf3e43ac-4c35-4de4-98a0-abb41dbe5b11

Tenant id

Request Body schema: application/json
role
required
string
Enum: "USER" "ADMIN"

Role given to the invited contact

validFor
string <ISO8601 duration>

Invitation code validity in hours in ISO8601 duration format.
For example: 24 hours PT24H, 12 hours PT12H

Note: Must be greater than 0 seconds and less than or equal to 365 days. Defaults to 24 hours.

Responses

Request samples

Content type
application/json
{
  • "role": "USER",
  • "validFor": "PT24H"
}

Response samples

Content type
{
  • "id": "16c51843-bf7a-481b-947b-3f507111f94d",
  • "environmentUrl": "eu-apigw.abloybeat.api.assaabloy.com",
  • "invitationCode": "LVDK-XTAX-Z6MP-VXCW",
  • "expiresAt": "2030-01-01T13:00:00Z"
}

Get users

Gets all users from caller's system

The returned list is automatically paginated by the backend. It could happen that the client will only receive a fraction of the available users. In that case the response body will also include a nextPageToken. In order to receive the next batch, the client has to call the endpoint again using that token as a query parameter. The client can be sure that all currently available users have been fetched when there is no nextPageToken in the response.

Authorizations:
JWT
query Parameters
next-page-token
string
Example: next-page-token=VHpVZEpDeVg1N2RYNFFoSWk4bkIycGVGWTZWRThqcQ==

The next page token received from the previous request

Responses

Response samples

Content type
application/vnd.assaabloy.abloybeat.administration-0.9+json
{
  • "nextPageToken": "VHpVZEpDeVg1N2RYNFFoSWk4bkIycGVGWTZWRThqcQ==",
  • "items": [
    ]
}

Delete user

Deletes a user

Authorizations:
JWT
path Parameters
id
required
string <uuid>

The user identifier

Responses

Response samples

Content type
application/problem+json
{
  • "type": "about:blank",
  • "title": "Bad Request",
  • "status": 400,
  • "detail": "Invalid content type",
  • "instance": "about:blank"
}

Login

Users need to be authenticated to be able to call most Abloy BEAT APIs. The login will return an authorization token which must be passed as a request header in every request to endpoints that require authorization.

Login

Authenticate to acquire an authorization token represented as a JSON Web Token. The token should be passed in the Authorization request header.

The token is valid for one hour from the time it was created, and can be reused until it expires. On expiration, the client will receive HTTP status 401 Unauthorized when calling an endpoint.

Request Body schema: application/json
accessKey
required
string non-empty

User's secret key value

userId
required
string <uuid>

Identifier of the user

Responses

Request samples

Content type
application/json
{
  • "accessKey": "mA4OKvw59GXsivxQ0TSfg0BISsr94jyYVbNlFVr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