{"info":{"_postman_id":"87b18d2c-30f8-446f-8acf-5e98c5d65049","name":"Wisepill API V1.2 (evriMED Smart Pillbox)","description":"<html><head></head><body><p>The evriMED1000C and RT3000 smart pillboxes are designed and manufactured by Wisepill Technologies in Cape Town, South Africa.</p>\n<p>The Wisepill API provides the functionality required to:</p>\n<ul>\n<li><p>Manage, configure, and view smart pill box device settings and information</p>\n</li>\n<li><p>Store and view events ( pill box openings, device heartbeats, etc. ) and episodes from smart pill box devices</p>\n</li>\n<li><p>Monitor key device parameters such as battery charge and signal strength</p>\n</li>\n<li><p>Manage and monitor medication adherence which includes the \"last pillbox opened status (last opened) and the last pillbox seen status (last seen)</p>\n</li>\n<li><p>Update and maintain an adherence string for every episode</p>\n</li>\n</ul>\n<p><b>API Functions</b></p>\n<p>The Wisepill API conforms to the OpenAPI Specification (<a href=\"https://www.openapis.org/\">https://www.openapis.org/</a>) which defines a standard interface to RESTful APIs.</p>\n<p>The API contains APIs for general use and APIs reserved for ADMIN functions only. USER and ADMIN API keys are provided on request to evriMED clients. Please contact <a href=\"https://mailto:support@wisepill.com\">support@wisepill.com</a> for API key requests and API support)</p>\n<p><b>Sandbox and Main URL</b></p>\n<p>The sandbox API uses <a href=\"https://evrimed.wisepill.com/sbapi/\">https://evrimed.wisepill.com/sbapi/</a></p>\n<p>The Main API uses <a href=\"https://evrimed.wisepill.com/sbapi/\">https://evrimed.wisepill.com/api/</a></p>\n<p><b>Adherence String</b></p>\n<p>The adherence string is used in conjunction with the episode_start _date. The first digit in the string applies to the episode__start_date day. The following days are encoded into the subsequent positions in the string.</p>\n<p>E.g. \"001,92,1,1,1,1,9,1\"</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Adherence Code</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0</td>\n<td>No data received yet for this day. This will e replaced by a 9 or a 1 or a 2 if the device connects again.</td>\n</tr>\n<tr>\n<td>1</td>\n<td>An intake was received on this day</td>\n</tr>\n<tr>\n<td>2</td>\n<td>More than one intake was received on this day</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Only a device heartbeat was received on this day. No intakes have yet been received. Note that this number may be replaced by a 1 or a 2 when the device connects again.</td>\n</tr>\n</tbody>\n</table>\n</div><p><b>Device Status</b></p>\n<p>The evriMED smart pillbox device can have one of the statuses in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Device Status</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>Device linked to an episode (autogenerated)</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Device available (autogenerated)</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Lost or damaged device (set manually)</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Device is unavailable (set manually)</td>\n</tr>\n</tbody>\n</table>\n</div><p><b>Episode Status</b></p>\n<p>An Episode can have one of the following modes:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Episode Status</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>2</td>\n<td>Episode closed</td>\n</tr>\n<tr>\n<td>1</td>\n<td>Episode Open</td>\n</tr>\n</tbody>\n</table>\n</div><p><b>Device Types</b></p>\n<p>The following Wisepill smart pillboxes are supported:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>2</td>\n<td>evriMED1000C smart pillbox. The evriMED1000C is a modular system that is available in a number of different form factors including desktop and soft bag formats (See wisepill.com/evrimed)</td>\n</tr>\n<tr>\n<td>4</td>\n<td>RT3000 desktop pillbox</td>\n</tr>\n</tbody>\n</table>\n</div><p><b>Device Battery Voltage</b></p>\n<p>The Wisepill pillbox devices regularly report their battery status to the Wisepill Cloud. The devices are designed to work for a full 6-month TB episode. The battery voltage is reported in millivolts and will have a maximum of 4200mV. The battery health can be characterized as follows:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Battery Voltage Range in millivolts</strong></th>\n<th><strong>Battery Status</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>3850 to 4200</td>\n<td>Good</td>\n</tr>\n<tr>\n<td>3750 to 3850</td>\n<td>Medium</td>\n</tr>\n<tr>\n<td>3650 to 3750</td>\n<td>Low</td>\n</tr>\n<tr>\n<td>Below 3650</td>\n<td>Critical</td>\n</tr>\n</tbody>\n</table>\n</div><p>Device Signal</p>\n<p>The Wisepill pillbox regularly reports the signal strength with which it is able to communicate with the cell towers. The signal quality can be characterized as follows:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Signal Strength</strong></th>\n<th><strong>Signal Quality</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>20 - 31</td>\n<td>Excellent</td>\n</tr>\n<tr>\n<td>15-19</td>\n<td>Good</td>\n</tr>\n<tr>\n<td>10-14</td>\n<td>Acceptable</td>\n</tr>\n<tr>\n<td>5-9</td>\n<td>Low</td>\n</tr>\n<tr>\n<td>0-4</td>\n<td>Poor</td>\n</tr>\n<tr>\n<td>99</td>\n<td>Unknown</td>\n</tr>\n</tbody>\n</table>\n</div><p><b>API Result Codes&nbsp;</b>&nbsp;</p>\n<img src=\"https://content.pstmn.io/cb9a349b-9983-4a10-9426-bca3c9ec1e44/aW1hZ2UucG5n\" alt=\"Result%20Codes\" width=\"454\" height=\"833\">\n\n<p><b>HTTP Status Codes&nbsp;</b>&nbsp;</p>\n<p>See <a href=\"https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtmlResult\">https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"12754609","collectionId":"87b18d2c-30f8-446f-8acf-5e98c5d65049","publishedId":"2sA3XLFjUD","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-04-15T09:34:47.000Z"},"item":[{"name":"API Change Log","item":[],"id":"2b018ef7-5650-4dcb-9c23-68d88a11408d","description":"<h2 id=\"changelog-april-2025\">Changelog (April 2025)</h2>\n<ul>\n<li><p>Updated getEvents to include LIMIT and OFFSET parameters. The maximum records that can be retrieved is 100. LIMIT and OFFSET can be used for paging. For adherence reporting, please use the adherence string returned by getEpisodes</p>\n</li>\n<li><p>The getEvents, findDevices and getDevices will all only return devices in device groups defined by your user credentials for the MAIN api. The sandbox will allow you to see all devices.</p>\n</li>\n</ul>\n","_postman_id":"2b018ef7-5650-4dcb-9c23-68d88a11408d"},{"name":"User Functions","item":[{"name":"findDevices","id":"5a49a72a-4ca3-47ac-9a25-4fb321daff87","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://evrimed.wisepill.com/sbapi/v1/devices/findDevice","description":"<p><b>Function</b></p>\n<p>The findDevices function is used to search for a device. The function accepts all or part of the device's IMEI number as an input. The function returns all devices containing the input string.</p>\n<p><b>Input</b></p>\n<ul>\n<li>input - All or part of a device IMEI number</li>\n<li>device_status (optional) Limit the devices searched to ones with this device_status</li>\n</ul>\n<p>The Wisepill smart pillbox device can have one of the statuses in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Device Status</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>Device linked to an episode (autogenerated)</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Device available (autogenerated)</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Lost or damaged device (set manually)</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Device is unavailable (set manually)</td>\n</tr>\n</tbody>\n</table>\n</div><p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li>Result (string)</li>\n<li>ResultCode (int)</li>\n</ul>\n<p><strong>Function Data:</strong></p>\n<p>records (array):</p>\n<ul>\n<li>device_imei (string)</li>\n<li>device_status (int)</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","findDevice"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>(Optional) 1 = linked, 2 = available, 3 = lost or damaged, 9 = unavailable</p>\n","type":"text/plain"},"key":"device_status","value":""},{"disabled":true,"description":{"content":"<p>Search string consisting of all or part of an device IMEI number</p>\n","type":"text/plain"},"key":"input","value":""}],"variable":[]}},"response":[{"id":"6bcd3813-a85d-47de-8669-bc16b06bf644","name":"findDevices","originalRequest":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/api/v1/devices/findDevice.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["api","v1","devices","findDevice.php"],"query":[{"key":"device_status","value":"2","description":"(Optional) 1 = linked, 2 = available, 3 = lost or damaged, 9 = unavailable","disabled":true},{"key":"input","value":"523","description":"Search string consisting of all or part of an device IMEI number","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 15 Apr 2023 15:40:54 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Devices found\",\n    \"ResultCode\": 0,\n    \"records\": [\n        {\n            \"device_imei\": \"768730034005523\",\n            \"device_status\": \"2\"\n        },\n        {\n            \"device_imei\": \"968730034005523\",\n            \"device_status\": \"2\"\n        }\n    ]\n}"}],"_postman_id":"5a49a72a-4ca3-47ac-9a25-4fb321daff87"},{"name":"getDevices","id":"c6db2d1f-e1a1-48cc-a5d8-207e0ef4cd71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/devices/getDevices","description":"<p><b>Function</b></p>\n<p>The getDevices function is used to retrieve attributes of a device or a series of devices</p>\n<p><b>Input</b></p>\n<ul>\n<li>device_imei OR episode_id</li>\n</ul>\n<p>Optionally, the device_status parameter can be used to limit the function to return only devices with that device_status.</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li>Result (string)</li>\n<li>ResultCode (int)</li>\n</ul>\n<p><strong>Function Data:</strong> results (array)</p>\n<ul>\n<li>See example</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","getDevices"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Device IMEI number (Either device IMEI number or episode number must be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>Episode number (Either episode number or device IMEI number must be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":""},{"disabled":true,"description":{"content":"<p>(Optional) 1 = linked, 2 = available, 3 = lost or damaged, 9 = unavailable</p>\n","type":"text/plain"},"key":"device_status","value":""},{"disabled":true,"description":{"content":"<p>(Optional) 0 = all devices, 1 = only devices linked to episodes, 2 = only devices not linked to episodes</p>\n","type":"text/plain"},"key":"episode_type","value":""}],"variable":[]}},"response":[{"id":"7b19b83e-108e-4881-a82a-9e5aff5f7fd5","name":"getDevices","originalRequest":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/api/v1/devices/getDevices.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["api","v1","devices","getDevices.php"],"query":[{"key":"device_imei","value":"","description":"Device IMEI number (Either device IMEI number or episode number must be specified)","disabled":true},{"key":"episode_id","value":"","description":"Episode number (Either episode number or device IMEI number must be specified)","disabled":true},{"key":"device_status","value":"","description":"(Optional)  1=linked, 2= available,3=Lost or damaged,9=unavailable ","disabled":true},{"key":"episode_type","value":null,"description":"(Optional) 0 = all devices, 1 = devices linked to episodes only, 2= devices not linked to episodes only ","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 15 Apr 2023 16:02:39 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Devices found\",\n    \"ResultCode\": 0,\n    \"records\": [\n        {\n            \"device_imei\": \"868730034005523\",\n            \"device_status\": \"1\",\n            \"last_seen\": \"2023-04-11 07:02:06\",\n            \"last_opened\": \"2023-04-11 07:02:06\",\n            \"last_battery_level\": \"3990\",\n            \"last_signal_strength\": \"23\",\n            \"alarm\": \"1\",\n            \"alarm_time\": \"07:00:00\",\n            \"alarm_days\": \"127\",\n            \"refill_alarm\": \"1\",\n            \"refill_alarm_datetime\": \"2023-10-01 14:00:00\",\n            \"episode_id\": \"88\"\n        }\n    ]\n}"}],"_postman_id":"c6db2d1f-e1a1-48cc-a5d8-207e0ef4cd71"},{"name":"createEpisode","id":"1d33987e-ea20-4f6d-be73-f27493f53620","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/episodes/createEpisode","description":"<p><b>Function</b></p>\n<p>The createEpisode function creates a new patient episode.</p>\n<p><b>Input</b></p>\n<p>Optionally, an episode_start_date (YYYY-MM-DD) and an external_id can be defined which will be associated with the newly create patient episode.</p>\n<p>The adherence string is calculated for each episode from the start of the episode.</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li><p>Result (string)</p>\n</li>\n<li><p>ResultCode (int)</p>\n</li>\n</ul>\n<p><strong>Function Data:</strong></p>\n<ul>\n<li><p>episode_id (int)</p>\n</li>\n<li><p>DatetimeCreated (datetime, \"YYYY-MM-DD hh:mm:ss\" format) - The date the episode was created</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","episodes","createEpisode"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>(Optional) Episode Start Date (YYYY-MM-DD). If ommited, the current day will be used</p>\n","type":"text/plain"},"key":"episode_start_date","value":""},{"disabled":true,"description":{"content":"<p>(Optional) External episode identifier. Could be used as a patient ID for the episode</p>\n","type":"text/plain"},"key":"external_id","value":""}],"variable":[]}},"response":[{"id":"2ebb2c3d-41f4-4cce-ae35-d8318181abd5","name":"createEpisode","originalRequest":{"method":"POST","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/episodes/createEpisode.php?episode_start_date=&external_id=","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","episodes","createEpisode.php"],"query":[{"key":"episode_start_date","value":"","description":"(Optional) Episode Start Date (YYYY-MM-DD). If ommited, the current day will be used"},{"key":"external_id","value":"","description":"(Optional) External episode identifier. Could be used as a patient ID for the episode"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 06:01:51 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Episode created\",\n    \"ResultCode\": \"0\",\n    \"episode_id\": 118,\n    \"DatetimeCreated\": \"2023-04-17 06:01:51\"\n}"}],"_postman_id":"1d33987e-ea20-4f6d-be73-f27493f53620"},{"name":"assignDevice","id":"c11c4120-266b-4150-98f7-1531f076e0c3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/devices/assignDevice","description":"<p><b>Function</b></p>\n<p>The assignDevice function assigns a smart pillbox device to a patient episode.</p>\n<p><b>Input</b></p>\n<p>A valid patient episode ID and device IMEI must be used as an input.</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li>Result (string)</li>\n<li>ResultCode (int)</li>\n</ul>\n<p><strong>Function Data:</strong> results (array)</p>\n<ul>\n<li>device_imei (string)</li>\n<li>episode (id)</li>\n<li>device_status (int))</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","assignDevice"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Episode number (Both episode number and device IMEI number must be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":""},{"disabled":true,"description":{"content":"<p>Device IMEI number (Both device IMEI number and episode number must be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""}],"variable":[]}},"response":[{"id":"6fa1f62e-a4f7-4761-bef9-5ca8b9d812d0","name":"assignDevice","originalRequest":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/devices/assignDevice.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","devices","assignDevice.php"],"query":[{"key":"episode_id","value":"","description":"Episode number (Both episode number and device IMEI number must be specified)","disabled":true},{"key":"device_imei","value":"","description":"Device IMEI number (Both device IMEI number and episode number must be specified)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 05:54:00 GMT"},{"key":"Server","value":"Apache"},{"key":"Keep-Alive","value":"timeout=15, max=96"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Device assigned\",\n    \"ResultCode\": \"0\",\n    \"episode_status\": \"1\",\n    \"device_status\": \"2\"\n}"}],"_postman_id":"c11c4120-266b-4150-98f7-1531f076e0c3"},{"name":"unassignDevice","id":"aa966e5b-af2e-4ddd-893c-b67c183f945f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/devices/unassignDevice","description":"<p><b>Function</b></p>\n<p>The unassignDevice function unassigns a smart pillbox device from a patient episode.</p>\n<p><b>Input</b></p>\n<ul>\n<li>episode_id (int)</li>\n<li>device_imei (string)</li>\n<li>device_status (int, optional)</li>\n</ul>\n<p>Either an episode ID or a device IMEI can be used as an input. The device_status is optional. If no device_status is given, the status is set to \"available\" (2)</p>\n<p>The Wisepill smart pillbox device can have one of the statuses in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Device Status</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>Device linked to an episode (autogenerated)</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Device available (autogenerated)</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Lost or damaged device (set manually)</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Device is unavailable (set manually)</td>\n</tr>\n</tbody>\n</table>\n</div><p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li>Result (string)</li>\n<li>ResultCode (int)</li>\n</ul>\n<p><strong>Function Data:</strong></p>\n<ul>\n<li>device_status (int)</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","unassignDevice"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Episode number (Either episode number or device IMEI number must be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":""},{"disabled":true,"description":{"content":"<p>Device IMEI number (Either device IMEI number or episode number must be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>(Optional) 1 = linked, 2 = available, 3 = lost or damaged, 9 = unavailable</p>\n","type":"text/plain"},"key":"device_status","value":""}],"variable":[]}},"response":[{"id":"1d42f781-c990-4fc7-a64b-c8450fe74bc2","name":"unassignDevice","originalRequest":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/devices/unassignDevice.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","devices","unassignDevice.php"],"query":[{"key":"episode_id","value":"","description":"Episode number (Either episode number or device IMEI number must be specified)","disabled":true},{"key":"device_imei","value":"","description":"Device IMEI number (Either device IMEI number or episode number must be specified)","disabled":true},{"key":"device_status","value":"","description":"(Optional) 1 = linked, 2 = available, 3 = lost or damaged, 9 = unavailable","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 05:55:50 GMT"},{"key":"Server","value":"Apache"},{"key":"Keep-Alive","value":"timeout=15, max=96"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Device now unassigned\",\n    \"ResultCode\": \"0\",\n    \"device_status\": \"1\"\n}"}],"_postman_id":"aa966e5b-af2e-4ddd-893c-b67c183f945f"},{"name":"getEpisodes","id":"361351df-46b0-4b38-ae2b-3e4aa0c98387","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"data\": {\n        \"episodes\": [\n            \"88\",\n            \"108\",\n            \"105\",\n            \"89\"\n        ],\n        \"imeis\": [\n            \"762927043259176\"\n        ]\n    }\n}"},"url":"https://evrimed.wisepill.com/sbapi/v1/episodes/getEpisodes","description":"<p><b>Function</b></p>\n<p>The getEpisodes function is used to retrieve episodes for a single or multiple devices or episodes</p>\n<p><b>Input</b></p>\n<p>Params - single:</p>\n<ul>\n<li>device_imei OR episode_id</li>\n</ul>\n<p>Body - multiple:</p>\n<ul>\n<li>device_imei OR episode_id - Multiple items allowed in an array in the query body.</li>\n</ul>\n<p>Optional</p>\n<ul>\n<li><p>episode status</p>\n</li>\n<li><p>external_id</p>\n</li>\n<li><p>calendar (Optional, 0= unset, 1=set) - provide a URL to a calendar episode viewer for debugging purposes.</p>\n</li>\n</ul>\n<p>The device_imei/episode_id can be sent as a URL parameter or as an array in the body of the request</p>\n<p>An Episode can have one of the statuses in the following table.:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Episode Status</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>2</td>\n<td>Episode closed</td>\n</tr>\n<tr>\n<td>1</td>\n<td>Episode open</td>\n</tr>\n</tbody>\n</table>\n</div><p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li><p>Result (string)</p>\n</li>\n<li><p>ResultCode (int)</p>\n</li>\n</ul>\n<p>Some notes:</p>\n<ul>\n<li><p>total_episode_days - Total days since episode start date</p>\n</li>\n<li><p>total_device_dose_days - Total days during the episode where intakes were received.</p>\n</li>\n<li><p>total_device_days - Total days during the episode where the device reported any events at all.</p>\n</li>\n<li><p>last_seen - Last time the device reported in UTC</p>\n</li>\n<li><p>last_opened - The time of the last reported intake.</p>\n</li>\n</ul>\n<p><strong>Function Data:</strong> results (array)</p>\n<ul>\n<li>See example (episode end_date has also been added to the output as of 10 June 2024)</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","episodes","getEpisodes"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Episode number (Both episode number or device IMEI number can be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":"126"},{"disabled":true,"description":{"content":"<p>Device IMEI number (Both device IMEI number or episode number can be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>(Optional) 0 = all episodes, 1 = open episodes only 2 = closed episodes only</p>\n","type":"text/plain"},"key":"episode_status","value":""},{"disabled":true,"description":{"content":"<p>(Optional) 0 = all episodes, 1 = only episodes with linked devices, 2 = only episodes without linked devices</p>\n","type":"text/plain"},"key":"episode_type","value":null},{"disabled":true,"description":{"content":"<p>Debug parameter to allow graphical viewing of an episode 0 = unset, 1 = set</p>\n","type":"text/plain"},"key":"calendar","value":""}],"variable":[]}},"response":[{"id":"579fdab4-8f8f-4891-95ea-565036c0f001","name":"getEpisodes  (params)","originalRequest":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/episodes/getEpisodes?episode_id=&device_imei=&episode_status=&episode_type&calendar=","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","episodes","getEpisodes"],"query":[{"key":"episode_id","value":"","description":"Episode number (Both episode number or device IMEI number can be specified)"},{"key":"device_imei","value":"","description":"Device IMEI number (Both device IMEI number or episode number can be specified)"},{"key":"episode_status","value":"","description":"Optional) 0 = all episodes, 1 = open episodes only 2 = closed episodes only"},{"key":"episode_type","value":null,"description":"(Optional) 0 = all episodes, 1 = only episodes with linked devices, 2 = only episodes without linked devices"},{"key":"calendar","value":"","description":"Debug parameter to allow graphical viewing of an episode 0 = unset, 1 = set"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 15:05:45 GMT"},{"key":"Server","value":"Apache"},{"key":"Keep-Alive","value":"timeout=15, max=98"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Episode detail retrieved\",\n    \"ResultCode\": 0,\n    \"records\": [\n        {\n            \"episode_id\": \"88\",\n            \"episode_status\": \"1\",\n            \"device_imei\": \"868730034005523\",\n            \"external_id\": \"LLoyds Personal Pillbox\",\n            \"adherence_string\": \"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,9,1,9,9,1,1,9,1,1,2,1,2,1,1\",\n            \"episode_start_date\": \"2023-03-01 00:00:00\",\n            \"device_start_date\": \"2023-03-30 07:41:51\",\n            \"total_episode_days\": \"42\",\n            \"total_device_dose_days\": \"11\",\n            \"total_device_days\": \"15\",\n            \"last_seen\": \"2023-04-11 07:02:06\",\n            \"last_opened\": \"2023-04-11 07:02:06\",\n            \"last_battery_level\": \"3990\",\n            \"last_signal_strength\": \"23\"\n        }\n    ]\n}"},{"id":"62f60430-1e9b-457b-a2d5-39a254d18bc3","name":"getEpisodes (body)","originalRequest":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"data\": {\n        \"episodes\": [\n            \"88\",\n            \"108\",\n            \"105\",\n            \"89\"\n        ],\n        \"imeis\": [\n            \"762927043259176\"\n        ]\n    }\n}"},"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/episodes/getEpisodes?episode_type","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","episodes","getEpisodes"],"query":[{"key":"episode_id","value":"{{episode_id}}","description":"Episode number (Both episode number or device IMEI number can be specified)","disabled":true},{"key":"device_imei","value":"{{device_imei}}","description":"Device IMEI number (Both device IMEI number or episode number can be specified)","disabled":true},{"key":"episode_status","value":"0","description":"Optional) 0 = all episodes, 1 = open episodes only 2 = closed episodes only","disabled":true},{"key":"episode_type","value":null,"description":"(Optional) 0 = all episodes, 1 = only episodes with linked devices, 2 = only episodes without linked devices","type":"text"},{"key":"calendar","value":"0","description":"Debug parameter to allow graphical viewing of an episode 0:unset, 1:set","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 16:26:22 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Episode detail retrieved\",\n    \"ResultCode\": 0,\n    \"records\": [\n        {\n            \"episode_id\": \"39\",\n            \"episode_status\": \"1\",\n            \"device_imei\": \"762927043259176\",\n            \"external_id\": \"1234567789\",\n            \"adherence_string\": \"0\",\n            \"episode_start_date\": \"2023-08-01 00:00:00\",\n            \"device_start_date\": \"2023-03-10 09:14:14\",\n            \"total_episode_days\": \"0\",\n            \"total_device_dose_days\": \"0\",\n            \"total_device_days\": \"0\",\n            \"last_seen\": \"2023-03-21 08:39:03\",\n            \"last_opened\": \"2023-03-21 08:39:03\",\n            \"last_battery_level\": \"4041\",\n            \"last_signal_strength\": \"19\"\n        },\n        {\n            \"episode_id\": \"88\",\n            \"episode_status\": \"1\",\n            \"device_imei\": \"868730034005523\",\n            \"external_id\": \"LLoyds Personal Pillbox\",\n            \"adherence_string\": \"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,9,1,9,9,1,1,9,1,1,2,1,2,1,1\",\n            \"episode_start_date\": \"2023-03-01 00:00:00\",\n            \"device_start_date\": \"2023-03-30 07:41:51\",\n            \"total_episode_days\": \"42\",\n            \"total_device_dose_days\": \"11\",\n            \"total_device_days\": \"15\",\n            \"last_seen\": \"2023-04-11 07:02:06\",\n            \"last_opened\": \"2023-04-11 07:02:06\",\n            \"last_battery_level\": \"3990\",\n            \"last_signal_strength\": \"23\"\n        },\n        {\n            \"episode_id\": \"89\",\n            \"episode_status\": \"1\",\n            \"device_imei\": null,\n            \"external_id\": \"Demo External ID\",\n            \"adherence_string\": \"2,1,1,1,9,9,9,9,9,1,0,0\",\n            \"episode_start_date\": \"2023-04-05 00:00:00\",\n            \"device_start_date\": \"2023-04-05 14:30:47\",\n            \"total_episode_days\": \"9\",\n            \"total_device_dose_days\": \"5\",\n            \"total_device_days\": \"10\",\n            \"last_seen\": null,\n            \"last_opened\": null,\n            \"last_battery_level\": null,\n            \"last_signal_strength\": null\n        },\n        {\n            \"episode_id\": \"105\",\n            \"episode_status\": \"2\",\n            \"device_imei\": null,\n            \"external_id\": \"DemoExternalID001\",\n            \"adherence_string\": null,\n            \"episode_start_date\": \"2023-07-01 00:00:00\",\n            \"device_start_date\": \"2023-04-15 10:57:02\",\n            \"total_episode_days\": \"0\",\n            \"total_device_dose_days\": \"0\",\n            \"total_device_days\": \"0\",\n            \"last_seen\": null,\n            \"last_opened\": null,\n            \"last_battery_level\": null,\n            \"last_signal_strength\": null\n        },\n        {\n            \"episode_id\": \"108\",\n            \"episode_status\": \"1\",\n            \"device_imei\": null,\n            \"external_id\": \"DemoExternalID001\",\n            \"adherence_string\": null,\n            \"episode_start_date\": \"2023-07-01 00:00:00\",\n            \"device_start_date\": null,\n            \"total_episode_days\": \"0\",\n            \"total_device_dose_days\": \"0\",\n            \"total_device_days\": \"0\",\n            \"last_seen\": null,\n            \"last_opened\": null,\n            \"last_battery_level\": null,\n            \"last_signal_strength\": null\n        }\n    ]\n}"}],"_postman_id":"361351df-46b0-4b38-ae2b-3e4aa0c98387"},{"name":"closeEpisode","id":"ce3b6e4e-82ab-4541-8e5a-6dfd1bbcee4f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/episodes/closeEpisode","description":"<p><b>Function</b></p>\n<p>The closeEpisode function closes a patient episode.</p>\n<p><b>Inputs</b></p>\n<p>A valid episode_id must be provided</p>\n<p>Optionally, an episode_end_date can be defined (YYYY-MM-DD)</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li><p>Result (string)</p>\n</li>\n<li><p>ResultCode (int)</p>\n</li>\n<li><p>EpisodeStatus (int)</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","episodes","closeEpisode"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Episode number</p>\n","type":"text/plain"},"key":"episode_id","value":""},{"disabled":true,"description":{"content":"<p>(Optional) Episode End Date (YYYY-MM-DD). If omittted, the current data will be used</p>\n","type":"text/plain"},"key":"episode_end_date","value":""}],"variable":[]}},"response":[{"id":"71ce5550-868c-4ccb-9c21-e697e9a20538","name":"closeEpisode","originalRequest":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/episodes/closeEpisode.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","episodes","closeEpisode.php"],"query":[{"key":"episode_id","value":"","description":"Episode number","disabled":true},{"key":"episode_end_date","value":"","description":"(Optional) Episode End Date (YYYY-MM-DD). If omitted, the current data will be us","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 06:31:04 GMT"},{"key":"Server","value":"Apache"},{"key":"Keep-Alive","value":"timeout=15, max=97"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Episode Closed\",\n    \"ResultCode\": \"0\",\n    \"episode_status\": \"2\"\n}"}],"_postman_id":"ce3b6e4e-82ab-4541-8e5a-6dfd1bbcee4f"},{"name":"SetAlarm","id":"a46d04f5-0f78-426a-8ef6-a60fedc5fd6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/devices/setAlarm","description":"<p><b>Function</b></p>\n<p>The setAlarm function sets the alarm for a smart pillbox device.</p>\n<p><b>Input</b></p>\n<p>device_imei OR episode_id</p>\n<p>alarm (1=set, 0 =unset)</p>\n<p>alarm_time (time in HH:mm format)</p>\n<p>alarm_days (decimal value equivalent to the binary representation of days of the week, SMTWTFS in a string format. e.g. 1111111 binary = 127 decimal</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li><p>Result (string)</p>\n</li>\n<li><p>ResultCode (int)</p>\n</li>\n</ul>\n<p><strong>Function Data:</strong></p>\n<ul>\n<li>Updated parameters</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","setAlarm"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Device IMEI number (Either device IMEI number or episode number must be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>Episode number (Either episode number or device IMEI number must be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":""},{"disabled":true,"description":{"content":"<p>Alarm Enable (1 = set, 0 = unset)</p>\n","type":"text/plain"},"key":"alarm","value":""},{"disabled":true,"description":{"content":"<p>Alarm time (HH:mm)</p>\n","type":"text/plain"},"key":"alarm_time","value":""},{"disabled":true,"description":{"content":"<p>(Optional) Days of the week enabled for the alarm. The input is the decimal form of a binary representation of SMTWTFS (E.g. 0111110 represents working weekdays only i.e. MON,TUE,WE,Thu and Fri). If omitted, all days are enabled :   i.e.  1111111 = 127 decimal.</p>\n","type":"text/plain"},"key":"alarm_days","value":""}],"variable":[]}},"response":[{"id":"55623c0e-ffb7-4151-8924-910010733b44","name":"SetAlarm","originalRequest":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/api/v1/devices/setAlarm.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["api","v1","devices","setAlarm.php"],"query":[{"key":"device_imei","value":"","description":"Device IMEI number (Either device IMEI number or episode number must be specified)","disabled":true},{"key":"episode_id","value":"","description":"Episode number (Either episode number or device IMEI number must be specified)","disabled":true},{"key":"alarm","value":"","description":"Alarm Enable (1 = set, 0 = unset)","disabled":true},{"key":"alarm_time","value":"","description":"Alarm time (HH:mm)","disabled":true},{"key":"alarm_days","value":"","description":"(Optional) Days of the week enabled for the alarm. The input is the decimal form of a binary representation of SMTWTFS (E.g. 0111110 represents working weekdays only i.e. MON,TUE,WE,Thu and Fri). If omitted, all days are enabled :   i.e.  1111111 = 127 decimal.","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 06:35:43 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Setting updated\",\n    \"ResultCode\": \"0\",\n    \"device_imei\": \"767420042383713\",\n    \"episode_id\": \"119\",\n    \"alarm\": \"1\",\n    \"alarm_time\": \"23:59\",\n    \"alarm_days\": \"127\"\n}"}],"_postman_id":"a46d04f5-0f78-426a-8ef6-a60fedc5fd6b"},{"name":"SetRefillAlarm","id":"cce589bd-d4aa-4bda-8fcb-90c80a3e4122","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/devices/setRefillAlarm","description":"<p><b>Function</b></p>\n<p>The setRefillAlarm function sets the refill alarm for a smart pillbox device.</p>\n<p><b>Input</b></p>\n<p>device_imei OR episode_id</p>\n<p>refill_alarm (1=set, 0 =unset)</p>\n<p>refill_alarm_datetime (datetime in \"YYYY-MM-DD HH:mm\" format.</p>\n<p>EndFragment</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li><p>Result (string)</p>\n</li>\n<li><p>ResultCode (int)</p>\n</li>\n</ul>\n<p><strong>Function Data:</strong></p>\n<ul>\n<li>Updated parameters</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","setRefillAlarm"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Device IMEI number (Either device IMEI number or episode number must be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>Episode number (Either episode number or device IMEI number must be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":""},{"disabled":true,"description":{"content":"<p>Refill Alarm Enable (1 = set, 0 = unset)</p>\n","type":"text/plain"},"key":"refill_alarm","value":""},{"disabled":true,"description":{"content":"<p>The Datetime that the refill alarm will be activated (YYYY-MM-DD HH:mm)YYYY-MM-DD hh:mm</p>\n","type":"text/plain"},"key":"refill_alarm_datetime","value":""}],"variable":[]}},"response":[{"id":"0661e954-c910-460f-9c62-dfdb28b98863","name":"SetRefillAlarm","originalRequest":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/devices/setRefillAlarm.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","devices","setRefillAlarm.php"],"query":[{"key":"device_imei","value":"","description":"Device IMEI number (Either device IMEI number or episode number must be specified)","disabled":true},{"key":"episode_id","value":"","description":"Episode number (Either episode number or device IMEI number must be specified)","disabled":true},{"key":"refill_alarm","value":"","description":"Refill Alarm Enable (1 = set, 0 = unset)","disabled":true},{"key":"refill_alarm_datetime","value":"","description":"The Datetime that the refill alarm will be activated (YYYY-MM-DD HH:mm)YYYY-MM-DD hh:mm","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 06:36:36 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Setting updated\",\n    \"ResultCode\": \"0\",\n    \"device_imei\": \"767420042383713\",\n    \"episode_id\": \"119\",\n    \"refill_alarm\": \"1\",\n    \"refill_alarm_datetime\": \"2023-10-01 14:00:00\"\n}"}],"_postman_id":"cce589bd-d4aa-4bda-8fcb-90c80a3e4122"}],"id":"34a5e3ca-3468-407d-b68f-f0438b45ab05","_postman_id":"34a5e3ca-3468-407d-b68f-f0438b45ab05","description":""},{"name":"Admin Functions","item":[{"name":"getDeviceDetail","id":"74e3524f-e90b-4e65-ad4b-2840e499e5d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://evrimed.wisepill.com/sbapi/v1/devices/getDeviceDetail","description":"<p><b>Function (ADMIN access only))</b></p>\n<p>The getDeviceDetail function is used to retrieve detail attributes of a device or a series of devices</p>\n<p><b>Input</b></p>\n<ul>\n<li>a single device_imei or multiple</li>\n</ul>\n<p>The device_imei can be sent as a URL parameter or as an array in the body of the request</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li>Result (string)</li>\n<li>ResultCode (int)</li>\n</ul>\n<p><strong>Function Data:</strong> records (array)</p>\n<ul>\n<li>See example</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","getDeviceDetail"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Device IMEI number</p>\n","type":"text/plain"},"key":"device_imei","value":""}],"variable":[]}},"response":[{"id":"0d6521a3-beda-45ee-915e-7ae1d22fe956","name":"getDeviceDetail (params)","originalRequest":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/devices/getDeviceDetail?device_imei=861833043098369","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","devices","getDeviceDetail"],"query":[{"key":"device_imei","value":"861833043098369","description":"Device IMEI number"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 18 Apr 2023 06:50:48 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Device details retrieved\",\n    \"Resultcode\": 0,\n    \"records\": [\n        {\n            \"device_id\": \"6762\",\n            \"device_imei\": \"861833043098369\",\n            \"device_status\": \"2\",\n            \"device_type\": \"2\",\n            \"firmware_version\": null,\n            \"data_activation_date\": null,\n            \"data_expiry_date\": null,\n            \"network_preference\": null,\n            \"sync_frequency\": null,\n            \"alarm\": null,\n            \"alarm_time\": null,\n            \"alarm_days\": null,\n            \"refill_alarm\": null,\n            \"refill_alarm_datetime\": null,\n            \"last_seen\": \"2023-04-17 15:33:21\",\n            \"last_opened\": \"2023-04-17 15:33:21\",\n            \"last_signal_strength\": \"19\",\n            \"last_battery_level\": \"4030\",\n            \"episode_id\": null,\n            \"timezone\": \"UTC\",\n            \"open_led\": null,\n            \"open_sound\": null,\n            \"suppress_alarm\": null,\n            \"ntp_server\": null,\n            \"device_group_id\": \"1\",\n            \"device_mode\": \"1\"\n        }\n    ]\n}"},{"id":"94fc3e46-8022-425d-a19e-76172539dbdc","name":"getDeviceDetail (body data)","originalRequest":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"data\": {\n        \"imeis\": [\n            \"762927043259176\",\n            \"861833048452058\",\n            \"867420042383713\"\n        ]\n    }\n}"},"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/devices/getDeviceDetail","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","devices","getDeviceDetail"],"query":[{"key":"device_imei","value":"861833043098369","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 18 Apr 2023 06:51:35 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Device details retrieved\",\n    \"Resultcode\": 0,\n    \"records\": [\n        {\n            \"device_id\": \"4810\",\n            \"device_imei\": \"762927043259176\",\n            \"device_status\": \"1\",\n            \"device_type\": \"2\",\n            \"firmware_version\": null,\n            \"data_activation_date\": null,\n            \"data_expiry_date\": null,\n            \"network_preference\": null,\n            \"sync_frequency\": null,\n            \"alarm\": \"0\",\n            \"alarm_time\": \"09:10:00\",\n            \"alarm_days\": \"12345\",\n            \"refill_alarm\": \"0\",\n            \"refill_alarm_datetime\": \"0000-00-00 00:00:00\",\n            \"last_seen\": \"2023-03-21 08:39:03\",\n            \"last_opened\": \"2023-03-21 08:39:03\",\n            \"last_signal_strength\": \"19\",\n            \"last_battery_level\": \"4041\",\n            \"episode_id\": \"39\",\n            \"timezone\": \"UTC\",\n            \"open_led\": \"1\",\n            \"open_sound\": \"1\",\n            \"suppress_alarm\": null,\n            \"ntp_server\": null,\n            \"device_group_id\": \"1\",\n            \"device_mode\": \"1\"\n        },\n        {\n            \"device_id\": \"371\",\n            \"device_imei\": \"861833048452058\",\n            \"device_status\": \"1\",\n            \"device_type\": \"2\",\n            \"firmware_version\": null,\n            \"data_activation_date\": null,\n            \"data_expiry_date\": null,\n            \"network_preference\": null,\n            \"sync_frequency\": null,\n            \"alarm\": \"0\",\n            \"alarm_time\": \"00:00:00\",\n            \"alarm_days\": \"127\",\n            \"refill_alarm\": \"0\",\n            \"refill_alarm_datetime\": \"0000-00-00 00:00:00\",\n            \"last_seen\": \"2023-04-18 00:47:41\",\n            \"last_opened\": \"2023-04-18 00:47:41\",\n            \"last_signal_strength\": \"30\",\n            \"last_battery_level\": \"4133\",\n            \"episode_id\": \"46\",\n            \"timezone\": \"UTC\",\n            \"open_led\": \"1\",\n            \"open_sound\": \"1\",\n            \"suppress_alarm\": null,\n            \"ntp_server\": null,\n            \"device_group_id\": \"1\",\n            \"device_mode\": \"1\"\n        },\n        {\n            \"device_id\": \"90\",\n            \"device_imei\": \"867420042383713\",\n            \"device_status\": \"9\",\n            \"device_type\": \"4\",\n            \"firmware_version\": null,\n            \"data_activation_date\": null,\n            \"data_expiry_date\": null,\n            \"network_preference\": null,\n            \"sync_frequency\": null,\n            \"alarm\": \"0\",\n            \"alarm_time\": \"23:59:00\",\n            \"alarm_days\": \"127\",\n            \"refill_alarm\": \"0\",\n            \"refill_alarm_datetime\": \"2023-07-01 13:00:00\",\n            \"last_seen\": \"2023-04-17 23:08:36\",\n            \"last_opened\": \"2023-04-17 23:08:36\",\n            \"last_signal_strength\": \"12\",\n            \"last_battery_level\": \"4128\",\n            \"episode_id\": \"114\",\n            \"timezone\": \"Africa/Johannesburg\",\n            \"open_led\": \"1\",\n            \"open_sound\": \"1\",\n            \"suppress_alarm\": null,\n            \"ntp_server\": null,\n            \"device_group_id\": \"1\",\n            \"device_mode\": \"0\"\n        }\n    ]\n}"}],"_postman_id":"74e3524f-e90b-4e65-ad4b-2840e499e5d9"},{"name":"getEvents","id":"d2a7cdaf-77bf-4bb4-a73b-f198b45ef5e8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"data\": {\n        \"episodes\": [\n            \"88\",\n            \"108\",\n            \"105\",\n            \"89\"\n        ],\n        \"imeis\": [\n            \"868730034005523\"\n        ]\n    }\n}"},"url":"https://evrimed.wisepill.com/sbapi/v1/events/getEvents","description":"<p><b>Function (ADMIN access only)</b></p>\n<p>The getEvents function is used to retrieve events for a device or episode</p>\n<p><b>Input</b></p>\n<ul>\n<li>a single device_imei /episode_id or multiple</li>\n</ul>\n<p>The device_imei/episode_id can be sent as a URL parameter or as an array in the body of the request</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li><p>Result (string)</p>\n</li>\n<li><p>ResultCode (int)</p>\n</li>\n</ul>\n<p><strong>Function Data:</strong> records (array)</p>\n<ul>\n<li>See example</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","events","getEvents"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Episode number (Both episode number or device IMEI number can be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":""},{"disabled":true,"description":{"content":"<p>Device IMEI number (Both device IMEI number or episode number can be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>Event Type (1 = heartbeat, 2 = event report was live, 3 = event report was delayed)</p>\n","type":"text/plain"},"key":"event_type","value":""},{"disabled":true,"description":{"content":"<p>(Optional) Start Event Date (YYYY-MM-DD)</p>\n","type":"text/plain"},"key":"start_event_date","value":""},{"disabled":true,"description":{"content":"<p>(Optional) End Event Date (YYYY-MM-DD)</p>\n","type":"text/plain"},"key":"end_event_date","value":""},{"disabled":true,"description":{"content":"<p>(Optional) Default = 100 Limits the records returned. Absolute max is 100</p>\n","type":"text/plain"},"key":"limit","value":null},{"disabled":true,"description":{"content":"<p>(Optional) Default = 0. Number of records skipped</p>\n","type":"text/plain"},"key":"offset","value":null}],"variable":[]}},"response":[{"id":"37105315-9c79-42b0-b9d1-16b90cf6b328","name":"getEvents (params)","originalRequest":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/events/getEvents.php?episode_id=","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","events","getEvents.php"],"query":[{"key":"episode_id","value":"","description":"Episode number (Both episode number or device IMEI number can be specified)"},{"key":"device_imei","value":"","description":"Device IMEI number (Both device IMEI number or episode number can be specified)","disabled":true},{"key":"event_type","value":"","description":"Event Type (1 = heartbeat, 2 = event report was live, 3 = event report was delayed)","disabled":true},{"key":"start_event_date","value":"","description":"(optional) Start Event Date (YYYY-MM-DD)","disabled":true},{"key":"end_event_date","value":"","description":"(Optional) End Event Date (YYYY-MM-DD)","disabled":true},{"key":"limit","value":null,"description":"(Optional) Default = 100 Limits the records returned. Absolute max is 100","type":"text","disabled":true},{"key":"offset","value":null,"description":"(Optional) Default = 0. Number of records skipped","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 06:59:19 GMT"},{"key":"Server","value":"Apache"},{"key":"Keep-Alive","value":"timeout=15, max=98"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Events retrieved\",\n    \"ResultCode\": 0,\n    \"records\": [\n        {\n            \"event_datetime\": \"2023-04-09 07:21:59\",\n            \"device_imei\": \"868730034005523\",\n            \"episode_id\": \"88\",\n            \"event_type\": \"3\",\n            \"signal_strength\": \"21\",\n            \"battery_level\": \"4123\",\n            \"transmission_type\": \"G\"\n        },\n        {\n            \"event_datetime\": \"2023-04-09 07:11:03\",\n            \"device_imei\": \"868730034005523\",\n            \"episode_id\": \"88\",\n            \"event_type\": \"3\",\n            \"signal_strength\": \"21\",\n            \"battery_level\": \"3970\",\n            \"transmission_type\": \"G\"\n        },\n        {\n            \"event_datetime\": \"2023-04-09 05:04:57\",\n            \"device_imei\": \"868730034005523\",\n            \"episode_id\": \"88\",\n            \"event_type\": \"2\",\n            \"signal_strength\": \"11\",\n            \"battery_level\": \"3970\",\n            \"transmission_type\": \"G\"\n        },\n        {\n            \"event_datetime\": \"2023-04-09 01:38:44\",\n            \"device_imei\": \"868730034005523\",\n            \"episode_id\": \"88\",\n            \"event_type\": \"1\",\n            \"signal_strength\": \"11\",\n            \"battery_level\": \"3970\",\n            \"transmission_type\": \"\"\n        }\n    ]\n}"},{"id":"4b1b7c78-c790-4c18-b52b-650d7d6003b7","name":"getEvents (body data)","originalRequest":{"method":"GET","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"text/plain","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"data\": {\n        \"episodes\": [\n            \"88\",\n            \"108\",\n            \"105\",\n            \"89\"\n        ],\n        \"imeis\": [\n            \"762927043259176\"\n        ]\n    }\n}","options":{"raw":{"language":"text"}}},"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/events/getEvents.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","events","getEvents.php"],"query":[{"key":"episode_id","value":"","disabled":true},{"key":"device_imei","value":"","disabled":true},{"key":"event_type","value":"","disabled":true},{"key":"start_event_date","value":"","disabled":true},{"key":"end_event_date","value":"","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 07:05:29 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Events retrieved\",\n    \"ResultCode\": 0,\n    \"records\": [\n        {\n            \"event_datetime\": \"2023-04-09 07:21:59\",\n            \"device_imei\": \"868730034005523\",\n            \"episode_id\": \"88\",\n            \"event_type\": \"3\",\n            \"signal_strength\": \"21\",\n            \"battery_level\": \"4123\",\n            \"transmission_type\": \"G\"\n        },\n        {\n            \"event_datetime\": \"2023-04-09 07:11:03\",\n            \"device_imei\": \"868730034005523\",\n            \"episode_id\": \"88\",\n            \"event_type\": \"3\",\n            \"signal_strength\": \"21\",\n            \"battery_level\": \"3970\",\n            \"transmission_type\": \"G\"\n        },\n        {\n            \"event_datetime\": \"2023-04-09 05:04:57\",\n            \"device_imei\": \"868730034005523\",\n            \"episode_id\": \"88\",\n            \"event_type\": \"2\",\n            \"signal_strength\": \"11\",\n            \"battery_level\": \"3970\",\n            \"transmission_type\": \"G\"\n        },\n        {\n            \"event_datetime\": \"2023-04-09 01:38:44\",\n            \"device_imei\": \"868730034005523\",\n            \"episode_id\": \"88\",\n            \"event_type\": \"1\",\n            \"signal_strength\": \"11\",\n            \"battery_level\": \"3970\",\n            \"transmission_type\": \"\"\n        },\n        {\n            \"event_datetime\": \"2023-04-09 01:08:35\",\n            \"device_imei\": \"867420042383713\",\n            \"episode_id\": \"89\",\n            \"event_type\": \"1\",\n            \"signal_strength\": \"12\",\n            \"battery_level\": \"4175\",\n            \"transmission_type\": \"\"\n        }\n    ]\n}"}],"_postman_id":"d2a7cdaf-77bf-4bb4-a73b-f198b45ef5e8"},{"name":"setDeviceStatus","id":"e77667f1-42df-48d5-8c78-f0cf224f8cda","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/devices/setDeviceStatus","description":"<p><b>Function (ADMIN access only)</b></p>\n<p>The setDeviceStatus function sets the status of a smart pillbox device.</p>\n<p><b>Input</b></p>\n<p>device_status</p>\n<p>The Wisepill smart pillbox device can have one of the statuses in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Device Status</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>Device linked to an episode (autogenerated)</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Device available (autogenerated)</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Lost or damaged device (set manually)</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Device is unavailable (set manually)</td>\n</tr>\n</tbody>\n</table>\n</div><p>Output</p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li>Result (string)</li>\n<li>ResultCode (int)</li>\n</ul>\n<p><strong>Function Data:</strong> results (array)</p>\n<ul>\n<li>device_status (int)</li>\n</ul>\n<p>The Wisepill smart pillbox device can have one of the statuses in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Device Status</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>Device linked to an episode (autogenerated)</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Device available (autogenerated)</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Lost or damaged device (set manually)</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Device is unavailable (set manually)</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["sbapi","v1","devices","setDeviceStatus"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Device IMEI number</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>Device Status (1 = linked, 2 = available, 3 = lost or damaged, 9 = unavailable)</p>\n","type":"text/plain"},"key":"device_status","value":""}],"variable":[]}},"response":[{"id":"f42ef1e6-a124-4f43-b8a7-30996b0325d8","name":"setDeviceStatus","originalRequest":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/api/v1/devices/setDeviceStatus.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["api","v1","devices","setDeviceStatus.php"],"query":[{"key":"device_imei","value":"","description":"Device IMEI number","disabled":true},{"key":"device_status","value":"","description":"Device Status (1 = linked, 2 = available, 3 = lost or damaged, 9 = unavailable)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 06:24:09 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Device status unchanged.\",\n    \"ResultCode\": \"0\",\n    \"device_status\": \"2\"\n}"}],"_postman_id":"e77667f1-42df-48d5-8c78-f0cf224f8cda"},{"name":"SetTimezone","id":"932deaf1-4095-42bd-8375-483ac22e7c59","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/devices/setTimezone","description":"<p><b>Function (ADMIN access only)</b></p>\n<p>The setTimezone function sets the timezone for a smart pillbox device.</p>\n<p><b>Input</b></p>\n<p>device_imei OR episode_id</p>\n<p>timezone (in readable format e.g. Africa/Johannesburg. See <a href=\"https://www.php.net/manual/en/timezones.php\">https://www.php.net/manual/en/timezones.php</a></p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li>Result (string)</li>\n<li>ResultCode (int)</li>\n</ul>\n<p><strong>Function Data:</strong></p>\n<ul>\n<li>Updated parameters</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","setTimezone"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Device IMEI number (Either device IMEI number or episode number must be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>Episode number (Either episode number or device IMEI number must be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":"126"},{"disabled":true,"description":{"content":"<p>Timezone in readable format (e.g. Africa/Johannesburg. See <a href=\"https://www.php.net/manual/en/timezones.php\">https://www.php.net/manual/en/timezones.php</a>)</p>\n","type":"text/plain"},"key":"timezone","value":"Australia/Eucla"}],"variable":[]}},"response":[{"id":"9eaaebb8-5fc1-4f65-9867-7901a6244cb8","name":"SetTimezone","originalRequest":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/api/v1/devices/setTimezone.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["api","v1","devices","setTimezone.php"],"query":[{"key":"device_imei","value":"","description":"Device IMEI number (Either device IMEI number or episode number must be specified)","disabled":true},{"key":"episode_id","value":"","description":"Episode number (Either episode number or device IMEI number must be specified)","disabled":true},{"key":"timezone","value":"","description":"Timezone in readable format (e.g. Africa/Johannesburg. See https://www.php.net/manual/en/timezones.php)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Apr 2023 06:36:09 GMT"},{"key":"Server","value":"Apache"},{"key":"Keep-Alive","value":"timeout=15, max=99"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Setting updated (no change)\",\n    \"ResultCode\": \"4\",\n    \"device_imei\": \"767420042383713\",\n    \"episode_id\": \"119\",\n    \"timezone\": \"UTC\"\n}"}],"_postman_id":"932deaf1-4095-42bd-8375-483ac22e7c59"},{"name":"SetDeviceLidFeedback","id":"c026c4a7-5ba2-43c5-b447-e816f1a08f33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/devices/setDeviceLidFeedback","description":"<p><b>Function (ADMIN access only)</b></p>\n<p>The setDeviceLidFeedback function sets the Device lid feedback for a smart pillbox device. The buzzer feedback sound and LED feedback can be independently switched on or off.</p>\n<p><b>Input</b></p>\n<p>device_imei OR episode_id</p>\n<p>led (1=set, 0 =unset)</p>\n<p>open_sound (1=set, 0 =unset)</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li>Result (string)</li>\n<li>ResultCode (int)</li>\n</ul>\n<p><strong>Function Data:</strong></p>\n<ul>\n<li>Updated parameters</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","setDeviceLidFeedback"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Device IMEI number (Either device IMEI number or episode number must be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>Episode number (Either episode number or device IMEI number must be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":""},{"disabled":true,"description":{"content":"<p>LED feedback when the lid is opened (1 = set, 0 = unset)</p>\n","type":"text/plain"},"key":"led","value":""},{"disabled":true,"description":{"content":"<p>Sound feedback when the lid is opened (1 = set, 0 = unset)</p>\n","type":"text/plain"},"key":"open_sound","value":""}],"variable":[]}},"response":[{"id":"954ef59a-2565-46e8-b24a-30f38c25878a","name":"SetDeviceLidFeedback","originalRequest":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/devices/setDeviceLidFeedback.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","devices","setDeviceLidFeedback.php"],"query":[{"key":"device_imei","value":"","description":"Device IMEI number (Either device IMEI number or episode number must be specified)","disabled":true},{"key":"episode_id","value":"","description":"Episode number (Either episode number or device IMEI number must be specified)","disabled":true},{"key":"led","value":"","description":"LED feedback when the lid is opened (1 = set, 0 = unset)","disabled":true},{"key":"open_sound","value":"","description":"Sound feedback when the lid is opened (1 = set, 0 = unset)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 15 Apr 2023 16:07:26 GMT"},{"key":"Server","value":"Apache"},{"key":"Keep-Alive","value":"timeout=15, max=97"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Setting updated (no change)\",\n    \"ResultCode\": \"4\",\n    \"open_sound\": \"1\",\n    \"led\": \"1\",\n    \"device_imei\": \"868730034005523\",\n    \"episode_id\": \"88\"\n}"}],"_postman_id":"c026c4a7-5ba2-43c5-b447-e816f1a08f33"},{"name":"SetDeviceSyncFreq","id":"5dc8726f-4e7f-4eb7-9497-31bf1b9858b6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":"https://evrimed.wisepill.com/sbapi/v1/devices/setDeviceSyncFreq","description":"<p><b>Function (ADMIN access only)</b></p>\n<p>The setDeviceSyncFreq function sets the frequency with which the device will connect to the server. The default is the daily mode. In this mode, the device connects to the server once a day when opened for the first time. The setting affects how long the device can go on a single battery charge. A setting of \"1\" will allow more than 6 months of uninterrupted usage on a single battery charge,</p>\n<p><b>Input</b></p>\n<p>device_imei OR episode_id</p>\n<p>sync_frequency (1= device connects daily , n= 2,3,4,5,6 Device connects to the server every n x 12hrs )</p>\n<p>open_sound (1=set, 0 =unset)</p>\n<p><b>Output</b></p>\n<p><em><strong>Function Result :</strong></em></p>\n<ul>\n<li>Result (string)</li>\n<li>ResultCode (int)</li>\n</ul>\n<p><strong>Function Data:</strong></p>\n<ul>\n<li>Updated parameters</li>\n</ul>\n","urlObject":{"protocol":"https","path":["sbapi","v1","devices","setDeviceSyncFreq"],"host":["evrimed","wisepill","com"],"query":[{"disabled":true,"description":{"content":"<p>Device IMEI number (Either device IMEI number or episode number must be specified)</p>\n","type":"text/plain"},"key":"device_imei","value":""},{"disabled":true,"description":{"content":"<p>Episode number (Either episode number or device IMEI number must be specified)</p>\n","type":"text/plain"},"key":"episode_id","value":""},{"disabled":true,"description":{"content":"<p>The frequency with which the device connects to the server (2 = device connects daily, n = 3, 4, 5, 6 Device connects to the server every n x 12hrs)</p>\n","type":"text/plain"},"key":"sync_frequency","value":""}],"variable":[]}},"response":[{"id":"db781393-2c57-419a-a6ad-4f4fbea1996f","name":"SetDeviceSyncFreq","originalRequest":{"method":"PUT","header":[{"key":"Username","value":"{{username}}","type":"text"},{"key":"Secret","value":"{{secret}}","type":"text"}],"url":{"raw":"https://evrimed.wisepill.com/sbapi/v1/devices/setDeviceSyncFreq.php","protocol":"https","host":["evrimed","wisepill","com"],"path":["sbapi","v1","devices","setDeviceSyncFreq.php"],"query":[{"key":"device_imei","value":"","description":"Device IMEI number (Either device IMEI number or episode number must be specified)","disabled":true},{"key":"episode_id","value":"","description":"Episode number (Either episode number or device IMEI number must be specified)","disabled":true},{"key":"sync_frequency","value":"","description":"The frequency with which the device connects to the server (2 = device connects daily, n = 3, 4, 5, 6 Device connects to the server every n x 12hrs)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 15 Apr 2023 16:08:06 GMT"},{"key":"Server","value":"Apache"},{"key":"Upgrade","value":"h2"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"Keep-Alive","value":"timeout=15, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"Result\": \"Setting updated (no change)\",\n    \"ResultCode\": \"4\",\n    \"sync_frequency\": \"1\",\n    \"device_imei\": \"868730034005523\",\n    \"episode_id\": \"88\"\n}"}],"_postman_id":"5dc8726f-4e7f-4eb7-9497-31bf1b9858b6"}],"id":"10d043fe-6a2b-4f41-b036-c0b9f5ae4100","_postman_id":"10d043fe-6a2b-4f41-b036-c0b9f5ae4100","description":""}]}