Hotels
On this page, we’ll dive into the different endpoints specific to hotels. While the other endpoints are still available, these endpoints are specific to hotels and will help you manage your hotel programmatically.
To use the hotel api you will need client_id
and client_secret
specific to your account which can be accessed by contacting your Dusaw representative.
Locks
Locks are a core part of DUSAW — the very reason DUSAW exists is to provide a way to manage locks. On this page, we'll dive into the different lock endpoints you can use to manage locks programmatically. We'll look at how to query, create, update, and delete locks.
The lock model
The lock model contains all the information about your locks. Only the lock's administrator is allowed to access the lock details.
Properties
- Name
lockId
- Type
- integer
- Description
The lock's unique identifier.
- Name
lockName
- Type
- string
- Description
The lock's name.
- Name
lockAlias
- Type
- string
- Description
The lock's alias.
- Name
lockMac
- Type
- string
- Description
The lock's MAC address.
- Name
noKeyPwd
- Type
- string
- Description
The Super Passcode, which belongs to the admin
- Name
electricQuantity
- Type
- integer
- Description
Lock Battery Level
- Name
electricQuantityUpdateDate
- Type
- long
- Description
Lock Battery Level Update Date in milliseconds
- Name
featureValue
- Type
- String
- Description
Indicates the lock's features.
- Name
timezoneRawOffset
- Type
- Long
- Description
The offset between your timezone and UTC, in millisecond
- Name
modelNum
- Type
- String
- Description
The lock's model number.
- Name
hardwareRevision
- Type
- String
- Description
The lock's hardware revision.
- Name
firmwareRevision
- Type
- String
- Description
The lock's firmware revision.
- Name
autoLockTime
- Type
- integer
- Description
Auto Lock Time in seconds
- Name
lockSound
- Type
- integer
- Description
Lock Sound: 0 - unknown, 1 - on, 2 - off
- Name
privacyLock
- Type
- integer
- Description
Privacy lock: 0 - unknown, 1 - on, 2 - off
- Name
tamperAlert
- Type
- integer
- Description
Tamper Alert: 0 - unknown, 1 - on, 2 - off
- Name
resetButton
- Type
- integer
- Description
Reset Button: 0 - unknown, 1 - on, 2 - off
- Name
openDirection
- Type
- integer
- Description
Open Direction: 0 - unknown, 1 - left, 2 - right
- Name
passageMode
- Type
- integer
- Description
Passage Mode: 0 - unknown, 1 - on, 2 - off
- Name
passageModeAutoUnlock
- Type
- integer
- Description
Passage Mode Auto Unlock: 1 - on, 2 - off
- Name
passageModeAutoUnlock
- Type
- integer
- Description
Passage Mode Auto Unlock: 1 - on, 2 - off
- Name
date
- Type
- long
- Description
Lock's initialisation timestamp in milliseconds
- Name
scene
- Type
- integer
- Description
Lock's scene
- Name
groupId
- Type
- integer
- Description
Lock's group ID
- Name
groupName
- Type
- string
- Description
Lock's group name
- Name
lockData
- Type
- string
- Description
Lock's data
- Name
hasGateway
- Type
- integer
- Description
Does the lock have a gateway? 1 - yes, 0 - no
- Name
wirelessKeypadFeatureValue
- Type
- string
- Description
Wireless Keypad Feature Value
- Name
floorId
- Type
- integer
- Description
Lock's floor ID
- Name
floorNumber
- Type
- integer
- Description
Lock's floor number
- Name
floorName
- Type
- string
- Description
Lock's floor name
- Name
buildingId
- Type
- integer
- Description
Lock's building ID
- Name
buildingNumber
- Type
- integer
- Description
Lock's building number
- Name
buildingName
- Type
- string
- Description
Lock's building name
Lock Object
{
"lockId": 865759,
"lockName":"DUS356_c15c7c",
"lockAlias":"Side Door Lock",
"lockMac": "C6:20:E6:9J:8W:Q6",
"electricQuantity": 86,
"electricQuantityUpdateDate": 1672689580361,
"featureValue":"3G0421S4Q5Q3",
"hasGateway": 1,
"lockData": "xxxxxxxxxxxxx",
"groupId": 789,
"groupName": "The Office",
"date": 1672689580361,
"scene": 1,
"floorId": 1,
"wirelessKeypadFeatureValue": "xxxxxxxxxxxxx",
"floorNumber": 1,
"buildingNumber": 1,
"floorName": "1st Floor",
"buildingId": 1,
"buildingName": "The Office",
}
List Hotel locks
This endpoint allows you to retrieve a paginated list of all your locks connected to your hotel account.
Required attributes
- Name
pageNo
- Type
- integer
- Description
Page number
- Name
pageSize
- Type
- integer
- Description
Page size minimum 10, maximum 1000
Optional attributes
- Name
lockAlias
- Type
- string
- Description
Search by lock alias
Request
curl --location --request GET 'https://api.dusaw.com/api/v1/lock/hotel-list?pageNo=1&pageSize=20' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {token}'
Response
{
"list": [
...
{
"date": 1681764758000,
"lockAlias": "202",
"electricQuantityUpdateDate": 1681764758000,
"lockMac": "A9:68:5C:B8:F1:CF",
"scene": 2,
"featureValue": "C2744654CF1F3",
"floorId": 52258,
"hasGateway": 0,
"wirelessKeypadFeatureValue": "0",
"floorNumber": 2,
"buildingNumber": 1,
"floorName": "2",
"lockName": "M102_cff1b",
"sector": "1,2,3,4,5,6,7,8,9,10",
"specialValue": 169954491,
"noKeyPwd": "5412564",
"doorType": 1,
"passageMode": 2,
"timezoneRawOffset": -14400000,
"buildingId": 15972,
"lockId": 7444842,
"electricQuantity": 100,
"buildingName": "SAMPLE",
"bindDate": 1681764758000,
"lockData": "xxxxxxxxxxxxx",
"keyboardPwdVersion": 4
},
...
],
"pageNo":1,
"pageSize":10,
"pages":3,
"total":25
}