The API provides full control of all wakeup calls within the system. All wakeup call management is performed via the wakeup resource.
When the time for the wakeup call arrives, the system will call the room extension and, if the phone is answered, will play an announcement to the guest and then hang up. All wakeup-related activity is logged by the system and those logs can be reviewed by the hospitality administrator as needed.
Creating a new wakeup call is performed via the POST method with the content being an urlencoded body.
Parameter | Type | Description |
---|---|---|
room | string | Room number or CSV to create wakeup call for. |
datetime | date | Date and time for wakeup call in ISO8601 format Use this field or date and time fields but NOT both. |
date | string | Date for the wakeup call. Default is current day. Formatted as YYYYMMDD. |
daily | bool | Should wakeup call be performed daily. This can be expressed as 0, 1, true, or false. Default is false. |
time | string | Time for wakeup call. Formatted as HHMM. |
Name | Type | Description |
---|---|---|
error | int | Error code. |
description | string | Description of the error code. |
id | string | Unique wakeup call id if created. |
curl -i -X POST http://127.0.0.1:10022/rest/wakeup -d "room=7101&date=20190928&time=0800" -u user:password
HTTP/1.1 201 Created Date: Fri, 27 Sep 2019 16:11:29 GMT Connection: close Content-Language: en Server: DuVoice/6.03.32 DVREST/6.0.1 Access-Control-Allow-Origin: * Location: 127.0.0.1:10022 Content-Type: application/json Content-Length: 90 { "description" : "OK", "error" : 0, "id" : "461e0cf8-e142-11e9-a480-902b34db254e" }
For a list of all pending wakeup calls use the GET method with the parameter LIST. This returns a JSON array of all pending wakeup calls. It's also possible to get other specific types of wakeup calls like failed or answered using this same method.
curl -i -X GET http://127.0.0.1:10022/rest/wakeup/list/pending -u user:password
HTTP/1.1 200 OK Date: Fri, 27 Sep 2019 16:25:44 GMT Connection: close Content-Language: en Server: DuVoice/6.03.32 DVREST/6.0.1 Access-Control-Allow-Origin: * Location: 127.0.0.1:10022 Content-Type: application/json Content-Length: 858 { "pending" : [ { "actor" : "sampson", "attempts" : 0, "created" : "2019-09-27T09:17:00-07:00", "daily" : false, "id" : "459d7ed0-e142-11e9-ad37-902b34db254e", "prompt" : 1668, "result" : -1, "room" : "7102", "scheduled" : "2019-09-28T08:30:00-07:00", "snoozes" : 0, "source" : 4, "status" : 0, "tenant" : "8b9a6860-4a38-11e7-b52d-902b34db254e" }, { "actor" : "user", "attempts" : 0, "created" : "2019-09-27T09:17:00-07:00", "daily" : false, "id" : "461e0cf8-e142-11e9-a480-902b34db254e", "prompt" : 1668, "result" : -1, "room" : "7101", "scheduled" : "2019-09-28T08:00:00-07:00", "snoozes" : 0, "source" : 4, "status" : 0, "tenant" : "8b9a6860-4a38-11e7-b52d-902b34db254e" } ] }
Updating an existing wakeup call is performed via the PUT method and requires the unique ID of the wakeup call you wish to change. It's not possible to change the date, time, or room number of a wakeup call.
In this example we are marking the wakeup call complete with a result of 1. See PUT for all the result codes possible.
curl -i -X PUT http://127.0.0.1:10022/rest/wakeup/461e0cf8-e142-11e9-a480-902b34db254e -d "result=1" -u user:password
HTTP/1.1 200 OK Date: Fri, 27 Sep 2019 16:12:43 GMT Connection: Close Content-Language: en Server: DuVoice/6.03.32 DVREST/6.0.1 Access-Control-Allow-Origin: * Location: 127.0.0.1:10022