Skip to main content
Version: 2.0

Floor Groups

Introduction

Floor groups are used to define elevator rules, which allow users to access authorized floors by presenting their credentials to a corresponding elevator reader.

The floor group object

{
"id": "a963712f-fda9-4e47-885f-f750e5419f30",
"name": "Test Floor Group",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"readerPort": {
"id": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"name": "Test Device",
"cloudNode": {
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39",
"serialNumber": "1234ABC",
"name": "Test Cloud Node"
}
},
"floors": [
{
"id": "11e21062-30fc-40f3-8309-7103c91d6c45",
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": "99105ab2-0ae2-46ee-a410-3a201c75fa74",
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": "19f664f2-b30a-4898-b4ce-207b05cd19b6",
"name": "Floor 3",
"type": "floorRelay"
}
]
}
PropertyTypeDescription
idStringThe floor group ID.
nameStringThe floor group name.
partitionStringThe partition ID.
readerPortObjectA partial elevator reader device object. Users present their credentials to this reader to activate all authorized floor buttons.
floorsObject[]An array of partial floor relay device objects.

Basic Endpoints

Create a floor group

Request

POST https://systems.pdk.io/{{system_id}}/floor_groups HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"name": "Test Floor Group",
"readerPort": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"floors": [
"11e21062-30fc-40f3-8309-7103c91d6c45",
"99105ab2-0ae2-46ee-a410-3a201c75fa74",
"19f664f2-b30a-4898-b4ce-207b05cd19b6"
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe floor group name. This must be unique within a system. The maximum length is 70 characters.
partitionBodyStringNoThe partition ID. The user's default partition will be used if not specified.
readerPortBodyStringYesThe elevator reader device ID. This device should have a type of elevatorReader or additionalElevatorReader. Users present their credentials to this reader to activate all authorized floor buttons.
floorsBodyString[]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": "a963712f-fda9-4e47-885f-f750e5419f30"
}

Retrieve a floor group

Request

GET https://systems.pdk.io/{{system_id}}/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
floor_group_idPathStringYesThe floor group ID.
system_tokenHeaderStringYesA valid system token.

Response

The response contains a floor group object.

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

{
"id": "a963712f-fda9-4e47-885f-f750e5419f30",
"name": "Test Floor Group",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"readerPort": {
"id": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"name": "Test Device",
"cloudNode": {
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39",
"serialNumber": "1234ABC",
"name": "Test Cloud Node"
}
},
"floors": [
{
"id": "11e21062-30fc-40f3-8309-7103c91d6c45",
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": "99105ab2-0ae2-46ee-a410-3a201c75fa74",
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": "19f664f2-b30a-4898-b4ce-207b05cd19b6",
"name": "Floor 3",
"type": "floorRelay"
}
]
}

Update a floor group

Request

PUT https://systems.pdk.io/{{system_id}}/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"name": "Test Floor Group",
"readerPort": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"floors": [
"11e21062-30fc-40f3-8309-7103c91d6c45",
"99105ab2-0ae2-46ee-a410-3a201c75fa74",
"19f664f2-b30a-4898-b4ce-207b05cd19b6"
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
floor_group_idPathStringYesThe floor group ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe floor group name. This must be unique within a system. The maximum length is 70 characters.
partitionBodyStringNoThe partition ID. The user's default partition will be used if not specified.
readerPortBodyStringYesThe 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.
floorsBodyString[]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://systems.pdk.io/{{system_id}}/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
floor_group_idPathStringYesThe floor group ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 204 No Content

List all floor groups

GET https://systems.pdk.io/{{system_id}}/floor_groups HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
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.
system_tokenHeaderStringYesA valid system token.

Response

The response contains an array of floor group objects.

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

[
{
"id": "a963712f-fda9-4e47-885f-f750e5419f30",
"name": "Test Floor Group",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"readerPort": {
"id": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"name": "Test Device",
"cloudNode": {
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39",
"serialNumber": "1234ABC",
"name": "Test Cloud Node"
}
},
"floors": [
{
"id": "11e21062-30fc-40f3-8309-7103c91d6c45",
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": "99105ab2-0ae2-46ee-a410-3a201c75fa74",
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": "19f664f2-b30a-4898-b4ce-207b05cd19b6",
"name": "Floor 3",
"type": "floorRelay"
}
]
}
]