1. Home
  2. Docs
  3. Documentation
  4. Personnel APIs – V1
  5. API: List Attendance Devices

API: List Attendance Devices

The purpose of this API is to list active attendance devices available on modulus®.

Request

API Name PublicAttendanceDeviceList
URL https://your_account.modulus.biz/api/hr/PublicAttendanceDeviceList?token=YOUR_TOKEN
Method GET
Source Third Party Server
Recipient modulus® Server
Content Type –

Query String Parameters

Parameter Description
token Security token retrieved from Authentication API.

Responses

HTTP Status result title message object
Success Responses
200 OK true Success Data successfully retrieved.
[
    {
        "device_id": "Device ID as defined in setup section of the personnel module",
        "label": "Device label",
        "location": "Location at which the device installed",
        "direction": "Device direction: NONE, IN, OUT, IN/OUT."
    }, ...
]
200 OK true Success No data found. null

Example

Request
curl --request GET 'https://your_account.modulus.biz/api/hr/PublicAttendanceDeviceList?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Success Responses
200 OK
{
   "result":true,
   "title":"Success",
   "message":"Data successfully retrieved.",
   "object":[
      {
         "device_id":"101",
         "label":"Machine 101",
         "location":"Head Office",
         "direction":"IN"
      },
      {
         "device_id":"102",
         "label":"Machine 102",
         "location":"Head Office",
         "direction":"OUT"
      }
   ]
}
200 OK
{
   "result":true,
   "title":"success",
   "message":"No data found.",
   "object":null
}

In case of “IN/OUT” device, modulus® expects to receive check-IN/OUT flag along with the uploaded logs. Otherwise, modulus® decides log type (IN/OUT) according to shifts on relevant date.