Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:products:compact-commander-series-_4000-5000-6000:developer_documentation:webapi [18.07.2019 15:51]
palm
en:products:compact-commander-series-_4000-5000-6000:developer_documentation:webapi [18.07.2019 15:52] (current)
palm
Line 1: Line 1:
 +====== WebAPI Documentation Hotel ======
  
 +**General information**
 +
 +
 +Before a command can be invoked in the ITK appliance, a login is mandatory. The only exception is querying the system information.
 +
 +Authorization on the ITK appliances takes place via Digest Access Authentication (DAA) in accordance with RFC 2617. Session recognition runs away from the standard digest implementation. It is done by means of a cookie AUERSessionID (15 characters long value) from the webserver of the ITK appliance, in the first successful login. If this application does not transfer this cookie, the web server will request a renewed authorization with Digest Access Authentication every time it is called. It should be noted that then another session is created. Currently, the webserver supports a maximum of 100 sessions. If this value is exceeded, the oldest participant sessions in the webserver of the ITK appliance are deleted.
 +
 +**Call
 +**
 +The following commands are invoked exclusively via https. The individual commands are appended to the URL, e.g. Eg https:​%%//​%%192.168.0.240/​app_.
 +
 +**Response
 +**
 +All responses from the system are made using content-type application / json (charset = utf-8). Hotel API is implemented in version 6 of the API, the version level of the API is shown in http header "​X-AppVersion"​.
 +
 +----
 +
 +======Get List of hotel rooms======
 +
 +|''​**API call (URL)**''​|''​**Access Level**''​|''​**Parameters**''​|
 +|''/​app_hotel_list''​|''​Sub-Admin''​\\ ''​Admin''​|''​none''​|
 +
 +''​**Example call
 +**''''​https:​%%//​%%192.168.0.240/​app_hotel_list''​
 +
 +''​**Notes / reminders:​**''​
 +
 +  *''​Activation code for hotel subscriber needed to use this API call''​
 +
 +|''​**Response**''​|''​**Possible content**''​|
 +|''​id''​|''​Unique id of hotel room / subscriber''​|
 +|''​name''​|''​Name for hotel room / subscriber''​|
 +|''​nr''​|''​Subscriber number of hotel room''​|
 +
 +''​**
 +Example response:​**''​
 +
 +<code oobas>
 +[
 + {
 + "​id":​ 7382,
 + "​name":​ "Room 213",
 + "​nr":​ 213
 + },
 + {
 + ...
 + }
 +]
 +
 +</​code>​
 +
 +======Get state of hotel room======
 +|''​**API call (URL)**''​|''​**Access Level**''​|''​**Parameters**''​|
 +|''/​app_hotel_get''​|''​Sub-Admin''​\\ ''​Admin''​|''​id Unique id of hotel room / subscriber''​|
 +
 +
 +''​**Example call
 +**''''​https:​%%//​%%192.168.0.240/​app_hotel_get?​id=7382''​
 +
 +''​**Notes / reminders:​**''​
 +
 +  *''​Activation code for hotel subscriber needed to use this API call''​
 +
 +|''​**Response**''​|''​**Possible content**''​|
 +|''​checkedIn''​|''​0 hotel room free (no check in)''''​
 +''''​1 hotel room occupied (check in)''​|
 +|''​checkinId''​|''​0 hotel room free (no check in)''​\\ ''​1...65535 (system generated) itarated checkin id''​|
 +|''​checkinDate''​|''​Date of last checkin (format: "​yymmddhhmm"​)''​|
 +|''​exchangeLine''​|''​0 no outgoing calls''​\\ ''​1 in and outgoing calls''​|
 +|''​locked''​|''​0 hotel room is locked''​\\ ''​1 hotel room is available''​|
 +|''​cleaned''​|''​0 hotel room needs cleanup''​\\ ''​1 hotel room is clean''​|
 +|''​noInternalCalls''​|''​0 calls to other guest rooms are allowed''​\\ ''​1 calls to other guest rooms are not allowd''​|
 +|''​charges''​|''​call charges (incurred in hundredths)''​|
 +|''​charges''''​Formatted''​|''​Formatted String of call charges''​|
 +
 +''​**Example response:​**''​
 +
 +<code oobas>
 +[
 + {
 + "​checkedIn":​ 1,
 + "​checkinId":​ "​20965",​
 + "​checkinDate":​ "​1804171413",​
 + "​exchangeLine":​ 1,
 + "​locked":​ 0,
 + "​cleaned":​ 1,
 + "​nointernalCalls":​ 0,
 + "​charges":​ 2250,
 + "​chargesFormatted":​ "22.50 €"
 + },
 + {
 + ...
 + }
 +]
 +</​code>​
 +
 +======Set state of hotel room======
 +|''​**API call (URL)**''​|''​**Access Level**''​|''​**Parameters**''​|
 +|''/​app_hotel_set''​|''​Sub-Admin''​\\ ''​Admin''​|''​id Unique id
 + of hotel room / subscriber''​\\ ''​checkedIn 0 Check-Out 1
 + ​check-In''​\\ ''​exchangeLine 0 no outgoing calls 1 in and outgoing
 + ​calls''​\\ ''​locked 0 hotel room is locked 1 hotel room is
 + ​available''​\\ ''​cleaned 0 hotel room needs cleanup 1 hotel room
 + is clean''​|
 +
 +
 +''​**Example call
 +**''''​https:​%%//​%%192.168.0.240/​app_hotel_set?​id=7382&​checkedIn=1 ''​
 +
 +''​https:​%%//​%%192.168.0.240/​app_hotel_set?​id=7382&​checkedIn=1&​locked=0 ''​
 +
 +''​https:​%%//​%%192.168.0.240/​app_hotel_set?​id=7382&​exchangeLine=0&​locked=1&​cleaned=0''​
 +
 +''​**Notes / reminders:​**''​
 +
 +  *''​id is mandatory, other parameters are optional''​
 +  *''​Activation code for hotel subscriber needed to use this API call''​
 +
 +|''​**Response**''​|''​**Possible content**''​|
 +|''​successful''​|''​true set state was successful''''​\\
 +false set state was not successful''​|
 +
 +
 +''​**Example response:​**''​
 +
 +<code oobas>
 +{ "​successful":​ true }
 +</​code>​
 +
 +
 +
 +======Get call list of hotel room======
 +|''​**API call (URL)**''​|''​**Access Level**''​|''​**Parameters**''​|
 +|''/​app_hotel_calls''​|''​Sub-Admin''​\\ ''​Admin''​|''​id
 + ​Unique id of hotel room / subscriber''​\\ ''​__or__''​\\ ''​checkinId ​
 + check in id''​\\ ''​wakeupCalls optional parameter to get
 + list of wake up calls''​|
 +
 +
 +''​**Example call**''​
 +''​https:​%%//​%%192.168.0.240/​app_hotel_calls?​id=7382 ''​
 +
 +''​https:​%%//​%%192.168.0.240/​app_hotel_calls?​checkinId=20965 ''​
 +
 +''​https:​%%//​%%192.168.0.240/​app_hotel_calls?​id=7382&​wakeupCalls''​
 +
 +''​https:​%%//​%%192.168.0.240/​app_hotel_calls?​checkinId=20965&​wakeupCalls''''​
 +''​
 +
 +''​**Notes / reminders:​**''​
 +
 +  *''​You can access call data after check out via parameter check in id''​
 +  *''​Activation code for hotel subscriber needed to use this API call''​
 +
 +|''​**Response**''​|''​**Possible content**''​|
 +|''​id''​|''​id of call data entry''​|
 +|''​extName''​|''​Name of caller, if stored in address book of pbx, transmitted by network operator or resolved by online name search''​|
 +|''​extRufNr''​|''​Number of caller (if transmitted)''​|
 +|''​datum''​|''​Call date''​|
 +|''​startZeit''​|''​Call start time''​|
 +|''​dauer''​|''​Duration / call time in seconds''​|
 +|''​msn''​|''​Own called line extension''​|
 +|''​dir''​|''​Direction''''​
 +0 incoming''''​
 +1 outgoing''​|
 +|''​Success''​|''​State of wake up call
 +0 unanswered
 +1 answered''​|
 +
 +
 +''​**Example response (hotel calls):​**''​
 +
 +<code oobas>
 +[
 + {
 +    "​id":​ 58447,
 +    "​extName":​ "",​
 +    "​extRufNr":​ "​0530692000",​
 +    "​datum":​ "​04.04.17",​
 +    "​startZeit":​ "​12:​44:​59",​
 +    "​dauer":​ "​48",​
 +    "​msn":​ "​970851",​
 +    "​dir":​ 0
 +  },
 +  {
 +    "​id":​ 58448,
 +    "​extName":​ "",​
 +    "​extRufNr":​ "​0530692000",​
 +    "​datum":​ "​02.04.17",​
 +    "​startZeit":​ "​12:​10:​29",​
 +    "​dauer":​ "​147",​
 +    "​msn":​ "​970851",​
 +    "​dir":​ 1
 +  }
 +]
 +</​code>​
 +
 +''​**Example response (wake up calls):​**''​
 +
 +<code oobas>
 +[
 +  {
 +        "​id":​ 1518,
 +        "​datum":​ "​10.07.18",​
 +        "​startZeit":​ "​15:​22:​29",​
 +        "​dauer":​ "​00:​00:​29",​
 +        "​success":​ 0
 +  },
 +  {
 +        "​id":​ 1517,
 +        "​datum":​ "​10.07.18",​
 +        "​startZeit":​ "​15:​21:​07",​
 +        "​dauer":​ "​00:​00:​07",​
 +        "​success":​ 1
 +  }
 +]
 +</​code>​
 +
 +
 +
 +======Get wake up calls of hotel room======
 +|''​**API call (URL)**''​|''​**Access Level**''​|''​**Parameters**''​|
 +|''/​app_hotel_wakeup_list''​|''​Sub-Admin''​\\ ''​Admin''​|''​id Unique id of hotel room / subscriber''​|
 +
 +
 +''​**Example call**''​
 +''​https:​%%//​%%192.168.0.240/​app_hotel_wakeup_ist?​id=7382 ​
 +''​
 +
 +''​**Notes / reminders:​**''​
 +
 +  *''​Activation code for hotel subscriber needed to use this API call''''​**
 +**''​
 +|''​**Response**''​|''​**Possible content**''​|
 +|''​id''​|''​Unique id of wake up call''​|
 +|''​zeit''​|''​time,​ format hh:​mm.''​|
 +|''​tag''​|''​day(s)''''​
 +1 Monday''''​
 +2 Tuesday''''​
 +4 Wednesday''''​
 +8 Thursday''''​
 +16 Friday''''​
 +32 Saturday''''​
 +64 Sunday''​\\ ''​31 Monday to Friday''''​
 +96 Saturday to Sunday''''​
 +127 every day''​|
 +|''​aktiv''​|''​Wake up call state''''​
 +0 deactivated''''​
 +1 activated''​|
 +|''​immer''​|''​Wake up repetition''''​
 +0 once''''​
 +1 recurrend''​|
 +|''​fwProg''​|''​Z''''​origin of wake up call''''​
 +0 Webserver / API''''​
 +1 programmed by''​|
 +
 +<code oobas>
 +
 +</​code>​
 +''​**Example response:​**''​
 +
 +
 +
 +<code oobas>
 +[
 + {
 +    "​id":​ 5070,
 +    "​zeit":​ "​08:​16",​
 +    "​tag":​ 31,
 +    "​aktiv":​ 1,
 +    "​immer":​ 1,
 +    "​fwProg":​ 0
 + },
 + {
 +    "​id":​ 5813,
 +    "​zeit":​ "​09:​15",​
 +    "​tag":​ 96,
 +    "​aktiv":​ 1,
 +    "​immer":​ 1,
 +    "​fwProg":​ 1
 + }
 +]
 +</​code>​
 +
 +
 +
 +======Set wake up call for hotel room======
 +|''​**API call (URL)**''​|''​**Access Level**''​|''​**Parameters**''​|
 +|''/​app_hotel_wakeup_set''​|''​Sub-Admin''​\\ ''​Admin''​|''​id
 +Unique id of hotel room / subscriber''​\\ ''​action
 +''''​0 create''''​
 +''''​1 modify''''​
 +''''​2 delete''''​
 +''''​\\
 +''''​weckId''''​
 +unique id of wake up call (id)
 +''''​\\
 +''''​zeit''''​
 +time, formatted hh:mm
 +''''​
 +''''​tag''''​
 +day(s)
 +1 Monday
 +2 Tuesday
 +4 Wednesday
 +8 Thursday
 +16 Friday
 +32 Saturday
 +64 Sunday
 +31 Monday to Friday''''​
 +96 Saturday to Sunday''''​
 +127 every day''''​
 +''''​
 +''''​immer''''​\\
 +Wake up repetition
 +0 once
 +1 recurrend''''​
 +''''​
 +aktiv\\
 +Wake up call state''''​
 +0 deactivated''''​
 +1 aktivated''​|
 +
 +
 +''​**Example call
 +**''''​https:​%%//​%%192.168.0.240/​app_hotel_wakeup_set?​id=7382&​action=0&​zeit=08:​00&​tag=31&​aktiv=1&​immer=1''​
 +
 +
 +
 +''​https:​%%//​%%192.168.0.240/​app_hotel_wakeup_set?​id=7382&​action=1&​zeit=07:​30''​
 +
 +''​**Notes / reminders:​**''​
 +
 +  *''​Activation code for hotel subscriber needed to use this API call
 +''​
 +|''​**Response**''​|''​**Possible content**''​|
 +|''​successful''​|''​true create / modify / delete success\\
 +false create / modify / delete not success''​|
 +
 +
 +
 +
 +''​**Example response:​**''​
 +
 +<code oobas>
 +{ "​successful":​ true }
 +</​code>​
 +