Devices

The Devices endpoint manages physical access systems at your properties. Register devices, retrieve details, and update configuration.

List

Retrieve all devices for a property or filtered by status.

GET /devices?property_id=prop_123

Query Parameters

ParameterTypeDescription
property_idstringFilter by property (required)
statusstringFilter by status: online, offline, error
device_typestringFilter by type: smart_lock, door_access, turnstile, barrier
pageintegerPage number (default: 1)
limitintegerResults per page, max 100 (default: 20)

Request

curl -X GET "https://api.passwave.com/v1/devices?property_id=prop_123&status=online" \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxx" \
  -H "X-Partner-ID: prtn_xxxxxxxxxxxxx"

Response

{
  "status": "success",
  "data": {
    "items": [
      {
        "id": "dev_456",
        "property_id": "prop_123",
        "device_type": "smart_lock",
        "location": "Room 301",
        "capabilities": ["ble", "nfc", "pincode"],
        "status": "online",
        "battery_level": 85,
        "last_sync": "2025-01-20T16:45:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "total": 42,
      "pages": 1
    }
  }
}

Register

Add a new device to a property.

POST /devices

Request Body

{
  "property_id": "prop_123",
  "device_type": "smart_lock",
  "device_model": "salto_xsls3",
  "location": "Room 301",
  "oem_device_id": "salto_lock_301",
  "capabilities": ["ble", "nfc", "pincode"]
}

Parameters

ParameterTypeRequiredDescription
property_idstringYesProperty where device is installed
device_typestringYessmart_lock, door_access, turnstile, barrier
device_modelstringYesManufacturer model (e.g., salto_xsls3, yale_nextouch)
locationstringYesHuman-readable location (e.g., "Room 301", "Building A Entrance")
oem_device_idstringYesDevice ID in OEM manufacturer's system
capabilitiesarrayYesSupported capabilities: ble, nfc, pincode, card, mobile

Request

curl -X POST "https://api.passwave.com/v1/devices" \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxx" \
  -H "X-Partner-ID: prtn_xxxxxxxxxxxxx" \
  -d '{
    "property_id": "prop_hotel_xyz",
    "device_type": "smart_lock",
    "device_model": "salto_xsls3",
    "location": "Room 301",
    "oem_device_id": "salto_lock_301",
    "capabilities": ["ble", "nfc", "pincode"]
  }'

Response

{
  "status": "success",
  "data": {
    "id": "dev_456",
    "property_id": "prop_hotel_xyz",
    "device_type": "smart_lock",
    "location": "Room 301",
    "status": "online",
    "created_at": "2025-01-20T10:30:00Z"
  }
}

Passwave automatically syncs with the OEM manufacturer's system after registration.


Get

Retrieve details of a specific device.

GET /devices/{device_id}

Request

curl -X GET "https://api.passwave.com/v1/devices/dev_456" \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxx" \
  -H "X-Partner-ID: prtn_xxxxxxxxxxxxx"

Response

Returns full device object including status, battery level, and last sync timestamp.


Update

Modify device configuration like location or capabilities.

PATCH /devices/{device_id}

Parameters

FieldTypeDescription
locationstringUpdated location description
capabilitiesarrayUpdated capability list

Request

curl -X PATCH "https://api.passwave.com/v1/devices/dev_456" \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxx" \
  -H "X-Partner-ID: prtn_xxxxxxxxxxxxx" \
  -d '{"location": "Room 302"}'

Device Status

Devices report their connectivity status periodically. Understanding device status helps you debug credential provisioning issues.

StatusMeaningAction
onlineDevice connected and responsiveNormal operation
offlineDevice not respondingCheck power, connectivity, or OEM system
errorDevice in error stateReview error logs or contact support

Check the last_sync timestamp to see when the device last communicated with Passwave. If last_sync is old, the device may have connectivity issues.