API Reference

Devices Endpoints

GET /locations/id/devices/

Returns list of all devices in specified location.

Request

curl https://api.qminder.com/v1/locations/1142/devices/
-H "X-Qminder-REST-API-Key: SECRET_KEY"

Response

{
  "statusCode": 200,
  "data": [
    {
      "id": 1235,
      "type": "OVERVIEW_MONITOR",
      "name": "Large TV",
      "online": true
    },
    {
      "id": 3418,
      "type": "NAME_DEVICE",
      "name": "iPad name device",
      "needsUpdate": true,
      "battery": {
        "level": 5,
        "charging": false
      },
      "online": false
    }
  ]
}
These fields are wrapped in a data object:
Response field Type Description
id Number Device ID
type String "MONITOR", "OVERVIEW_MONITOR", "PRINTER" or "NAME_DEVICE"
name String Name of a device
online Boolean Indicates if device is online or not
needsUpdate Boolean Is only displayed when the device needs an iOS update, otherwise omitted. Only applicable to "NAME_DEVICE"
battery.level Number Displays the last known value for the battery charge level. Only applicable to "NAME_DEVICE"
battery.charging Boolean Displays the last known value of whether the device is charging or not. Only applicable to "NAME_DEVICE"

TVs

GET /tv/code

Create a pairing code for a TV.

Request

curl https://api.qminder.com/v1/tv/code

Response

{
  "statusCode": 200,
  "code": "PW3R",
  "secret": "75aa16d7923ac707cc302e1ce7c81e8a"
}
Response field Type Description
code String 4-character code for enduser to enter to the Dashboard
secret String Secret to use for checking the status of the pairing process
GET /tv/code/ value

Provides API key for the TV when it's paired.

Request

curl https://api.qminder.com/v1/tv/code/PW3R?secret=75aa16d7923ac707c
Request parameter Description
secret Secret retrieved by creating the pairing code

Response

{
  "statusCode": 200,
  "status": "PAIRED",
  "id": 41078,
  "apiKey": "804ef75ba9b6b5264c96150b457f8f30"
}
Response field Type Description
status String "NOT_PAIRED" or "PAIRED"
id Number TV ID. Omitted when status is "NOT_PAIRED"
apiKey String API key. Omitted when status is "NOT_PAIRED"
location Number Location ID. Omitted when status is "NOT_PAIRED"
GET /tv/ id

Get a details of a TV.

Request

curl https://api.qminder.com/v1/tv/41078
-H "X-Qminder-REST-API-Key: SECRET_KEY"

Response

{
  "statusCode": 200,
  "id": 41078,
  "name": "52 inch TV in Lobby",
  "settings":  {
    "selectedLine": 12345
  }
}
Response field Type Description
id Number TV ID
name String Name of a TV
settings Object Settings of the TV, only included when applicable
settings.selectedLine Number The id of the line selected to be shown on this TV
POST /tv/ id

Edit TV.

Request

curl -X POST https://api.qminder.com/v1/tv/41078
-H "X-Qminder-REST-API-Key: SECRET_KEY"
--data "name=Smart-TV"
Request parameter Description
name Name of the TV. Up to 50 characters long

Response

{
  "statusCode": 200,
  "id": 41078,
  "name": "Lobby TV"
}
Request parameter Description
name Name of the TV. Up to 50 characters long
DELETE /tv/ id

Removes the TV.

Request

curl -X DELETE https://api.qminder.com/v1/tv/41078
-H "X-Qminder-REST-API-Key: SECRET_KEY"

Response

{
  "statusCode": 200
}
POST /tv/ id /heartbeat

Update the heartbeat of the TV and add optional metadata in JSON format.

Request

curl -X POST https://api.qminder.com/v1/tv/41078/heartbeat
-H "X-Qminder-REST-API-Key: SECRET_KEY"
-H "Content-Type: application/json" --data "{\"example\":\"metadata\"}"

Response

{
  "statusCode": 200
}