Skip to main content
Version: 1.0

Floor Groups

Introduction

Floor groups can be used to associate an elevator reader with floor relays, allowing users to activate all authorized floor buttons by presenting their credentials to the reader. These floor groups can then be referenced in rules.

The floor group object

{
"id": 1,
"name": "Test Floor Group",
"partition": 0,
"readerPort": {
"id": 1,
"name": "Test Device"
},
"floors": [
{
"id": 1,
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": 2,
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": 3,
"name": "Floor 3",
"type": "floorRelay"
}
]
}
PropertyTypeDescription
idIntegerThe floor group ID.
nameStringThe floor group name.
partitionIntegerThe partition ID.
readerPortObjectThe elevator reader device object. Users present their credentials to this reader in order to activate all authorized floor buttons.
floorsObject[]An array of floor relay device objects.

Basic Endpoints

Create a floor group

Request

POST https://panel-{{panel_id}}.pdk.io/api/floor_groups HTTP/1.1
Authorization: Bearer {{panel_token}}
Content-Type: application/json

{
"name": "Test Floor Group",
"readerPort": 1,
"floors": [1, 2, 3]
}
ParameterLocationTypeRequiredDescription
panel_idPathStringYesThe cloud node serial number.
panel_tokenHeaderStringYesA valid panel token.
nameBodyStringYesThe floor group name. This must be unique within a cloud node. The maximum length is 70 characters.
partitionBodyIntegerNoThe partition ID. The user's default partition will be used if not specified.
readerPortBodyIntegerYesThe elevator reader device ID. This device should have a type of elevatorReader or additionalElevatorReader. Users present their credentials to this reader in order to activate all authorized floor buttons.
floorsBodyInteger[]YesAn array of floor relay device IDs. The referenced devices should have a type of floorRelay.

Response

The response contains the ID of the newly created floor group object.

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": 1
}

Retrieve a floor group

Request

GET https://panel-{{panel_id}}.pdk.io/api/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{panel_token}}
ParameterLocationTypeRequiredDescription
panel_idPathStringYesThe cloud node serial number.
floor_group_idPathIntegerYesThe floor group ID.
panel_tokenHeaderStringYesA valid panel token.

Response

The response contains a floor group object.

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": 1,
"name": "Test Floor Group",
"partition": 0,
"readerPort": {
"id": 1,
"name": "Test Device"
},
"floors": [
{
"id": 1,
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": 2,
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": 3,
"name": "Floor 3",
"type": "floorRelay"
}
]
}

Update a floor group

Request

PUT https://panel-{{panel_id}}.pdk.io/api/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{panel_token}}
Content-Type: application/json

{
"name": "Test Floor Group",
"readerPort": 1,
"floors": [1, 2, 3]
}
ParameterLocationTypeRequiredDescription
panel_idPathStringYesThe cloud node serial number.
floor_group_idPathIntegerYesThe floor group ID.
panel_tokenHeaderStringYesA valid panel token.
nameBodyStringYesThe floor group name. This must be unique within a cloud node. The maximum length is 70 characters.
partitionBodyIntegerNoThe partition ID. The user's default partition will be used if not specified.
readerPortBodyIntegerYesThe elevator reader device ID. This device should have a type of elevatorReader or additionalElevatorReader. Users present their credentials to this reader in order to activate all authorized floor buttons.
floorsBodyInteger[]YesAn array of floor relay device IDs. The referenced devices should have a type of floorRelay.

Response

HTTP/1.1 204 No Content

Delete a floor group

Request

DELETE https://panel-{{panel_id}}.pdk.io/api/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{panel_token}}
ParameterLocationTypeRequiredDescription
panel_idPathStringYesThe cloud node serial number.
floor_group_idPathIntegerYesThe floor group ID.
panel_tokenHeaderStringYesA valid panel token.

Response

HTTP/1.1 204 No Content

List all floor groups

GET https://panel-{{panel_id}}.pdk.io/api/floor_groups HTTP/1.1
Authorization: Bearer {{panel_token}}
ParameterLocationTypeRequiredDescription
panel_idPathStringYesThe cloud node serial number.
pageQueryIntegerNoThe zero-based page number used for pagination. The default value is 0.
per_pageQueryIntegerNoThe number of items per page used for pagination. The default value is 10 and the maximum value is 100.
panel_tokenHeaderStringYesA valid panel token.

Response

The response contains an array of floor group objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": 1,
"name": "Test Floor Group 1",
"partition": 0,
"readerPort": {
"id": 1,
"name": "Test Device 1"
},
"floors": [
{
"id": 1,
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": 2,
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": 3,
"name": "Floor 3",
"type": "floorRelay"
}
]
},
{
"id": 2,
"name": "Test Floor Group 2",
"partition": 0,
"readerPort": {
"id": 2,
"name": "Test Device 2"
},
"floors": [
{
"id": 2,
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": 3,
"name": "Floor 3",
"type": "floorRelay"
},
{
"id": 4,
"name": "Floor 4",
"type": "floorRelay"
}
]
}
]