{"id":3453,"date":"2018-03-04T16:05:11","date_gmt":"2018-03-04T14:05:11","guid":{"rendered":"http:\/\/modulus.help\/kb\/docs\/documentation\/introduction\/api-list-attendance-devices\/"},"modified":"2021-02-17T13:08:50","modified_gmt":"2021-02-17T11:08:50","slug":"api-list-attendance-devices","status":"publish","type":"docs","link":"https:\/\/modulus.help\/kb\/docs\/documentation\/personnel-apis-v1\/api-list-attendance-devices\/","title":{"rendered":"API: List Attendance Devices"},"content":{"rendered":"<p>The purpose of this API is to list active attendance devices available on modulus&reg;.<\/p>\n<h4>Request<\/h4>\n<table style=\"width: auto\">\n<tbody>\n<tr>\n<th style=\"text-align:left\">API Name<\/th>\n<td>PublicAttendanceDeviceList<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left\">URL<\/th>\n<td>https:\/\/your_account.modulus.biz\/api\/hr\/PublicAttendanceDeviceList?token=YOUR_TOKEN<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left\">Method<\/th>\n<td>GET<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left\">Source<\/th>\n<td>Third Party Server<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left\">Recipient<\/th>\n<td>modulus&reg; Server<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left\">Content Type<\/th>\n<td>&#8211;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Query String Parameters<\/h4>\n<table style=\"width: auto\">\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"text-align:left;\">token<\/th>\n<td>Security token retrieved from <a href=\"\/kb\/docs\/documentation\/getting-started\/step-2-authentication-token\/\">Authentication API<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Responses<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th>HTTP Status<\/th>\n<th>result<\/th>\n<th>title<\/th>\n<th>message<\/th>\n<th>object<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th colspan=\"5\">Success Responses<\/th>\n<\/tr>\n<tr>\n<td>200 OK<\/td>\n<td>true<\/td>\n<td>Success<\/td>\n<td>Data successfully retrieved.<\/td>\n<td>\n<pre><code class=\"json\">[\r\n    {\r\n        \"device_id\": \"Device ID as defined in setup section of the personnel module\",\r\n        \"label\": \"Device label\",\r\n        \"location\": \"Location at which the device installed\",\r\n        \"direction\": \"Device direction: NONE, IN, OUT, IN\/OUT.\"\r\n    }, ...\r\n]<\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>200 OK<\/td>\n<td>true<\/td>\n<td>Success<\/td>\n<td>No data found.<\/td>\n<td>null<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example<\/h4>\n<table style=\"width: auto;\">\n<tbody>\n<tr>\n<th style=\"text-align:left\">Request<\/th>\n<td>\n<pre><code class=\"json\">curl --request GET 'https:\/\/your_account.modulus.biz\/api\/hr\/PublicAttendanceDeviceList?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'\r\n<\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<th colspan=\"2\">Success Responses<\/th>\n<\/tr>\n<tr>\n<th style=\"text-align:left\">200 OK<\/th>\n<td>\n<pre><code class=\"json\">{\r\n   \"result\":true,\r\n   \"title\":\"Success\",\r\n   \"message\":\"Data successfully retrieved.\",\r\n   \"object\":[\r\n      {\r\n         \"device_id\":\"101\",\r\n         \"label\":\"Machine 101\",\r\n         \"location\":\"Head Office\",\r\n         \"direction\":\"IN\"\r\n      },\r\n      {\r\n         \"device_id\":\"102\",\r\n         \"label\":\"Machine 102\",\r\n         \"location\":\"Head Office\",\r\n         \"direction\":\"OUT\"\r\n      }\r\n   ]\r\n}<\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left\">200 OK<\/th>\n<td>\n<pre><code class=\"json\">{\r\n   \"result\":true,\r\n   \"title\":\"success\",\r\n   \"message\":\"No data found.\",\r\n   \"object\":null\r\n}<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><i>In case of &#8220;IN\/OUT&#8221; device, modulus&reg; expects to receive check-IN\/OUT flag along with the uploaded logs. Otherwise, modulus&reg; decides log type (IN\/OUT) according to shifts on relevant date.<\/i><\/p>\n","protected":false},"featured_media":0,"parent":3773,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"comment_count":0,"_links":{"self":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3453"}],"collection":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/comments?post=3453"}],"version-history":[{"count":12,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3453\/revisions"}],"predecessor-version":[{"id":3954,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3453\/revisions\/3954"}],"up":[{"embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3773"}],"next":[{"title":"API: Import Attendance Logs","link":"https:\/\/modulus.help\/kb\/docs\/documentation\/personnel-apis-v1\/api-import-attendance-logs\/","href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3455"}],"wp:attachment":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/media?parent=3453"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/doc_tag?post=3453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}