AttendanceBot API uses unique team identifier and auth token to authenticate requests. API is in closed beta right now and we are rolling it out slowly. 


If you're interested, please write to Sarah@harmonizehq.com and we will add you to the beta list.


Leave Records API - To fetch leave records of employees.

GET https://www.attendancebot.com/api/report/leave/

Query Parameters

team - unique identifier of the workspace (required)
auth - authorization token (required)
from - start date range (optional)
to - end date range (optional)
department_id - to fetch leaves of a single department (optional)

Sample JSON Response

{
   "data": [
       {
           "Department Id": 61,
           "Remote Location": "",
           "Employee Name": "ABC XYZ",
           "Leave Type": "Annual",
           "Approved By": "PQRS XYZ",
           "Approved at": "02/04/2020",
           "Email": "ABC@email.com",
           "Department": "Support",
           "Department Name": "Support",
           "Leave Duration": "Full day",
           "Office": "LA",
           "Remark": "",
           "Leave Date": "06-04-2020"
       }
],
   "ok": true
}
Response Codes 200 - Success 400 - Bad Input parameter



Leave Balance API - To fetch leave balance of employees.

GET https://www.attendancebot.com/api/leavebalance/

Query Parameters

team - unique identifier of the workspace (required)
auth - authorization token (required)
email - email address of the employee (optional)
leave_type - leave for which balance is needed (optional)
page - page number, incase fetching for full workspace (optional)

Sample JSON Response

{
   "data": [
       {
           "balances": [
               {
                   "balance": 8,
                   "annual_leave_count": 10,
                   "leave_type": "sick",
                   "unlimited_balance":false
               }
           ],
           "id": 19,
           "name": "ABC XYZ"
       }
   ],
  "next_page": 5,
  "page": "Page 4 of 9",
  "ok": true
}
Response Codes 200 - Success 400 - Bad Input parameter



Department API - To fetch list of all departments.

GET https://www.attendancebot.com/api/departments/

Query Parameters

team - unique identifier of the workspace (required)
auth - authorization token (required)

Sample JSON Response

{
 departments: [
  • {
    • id: 1,
    • name: "Engineering"
    },
  • {
    • id: 2,
    • name: "Marketing"
    },
  • {
    • id: 3,
    • name: "Customer Success"
    },
  • {
    • id: 4,
    • name: "Design"
    }
], ok: true } Response Codes 200 - Success 400 - Bad Input parameter



Timesheet API - To fetch people hours.

GET https://www.attendancebot.com/api/report/people_timesheet/

Query Parameters

team - unique identifier of the workspace (required)
auth - authorization token (required)
from - from date (required)
to - to date (required)
email - email of employee (optional)

Sample JSON Response

{
  ok: true,
  data:   [
  • {
    • total_hour_work: "10 Hrs 30 Mins",
    • name: "Ronak Bansal",
    • total_daily_overtime: "00 Hrs 00 Mins",
    • range_data: [
      • {
        • hours_worked: "10:30",
        • total_free_time: "00:00",
        • date: "08/28/2020",
        • overtime: "00:00",
        • single_day: "Friday",
        • day_month: "28 Aug"
        },
      • {
        • hours_worked: "00:00",
        • total_free_time: "00:00",
        • date: "08/29/2020",
        • overtime: "00:00",
        • single_day: "Saturday",
        • day_month: "29 Aug"
        },
      • {
        • hours_worked: "00:00",
        • total_free_time: "00:00",
        • date: "08/30/2020",
        • overtime: "00:00",
        • single_day: "Sunday",
        • day_month: "30 Aug"
        }
      ],
    • email: "ronakbansal@gmail.com"
    • ]
    }

}

Response Codes 200 - Success 400 - Bad Input parameter


Punches API - To get detailed punches.

GET https://www.attendancebot.com/api/report/timesheet/

Query Parameters

team - unique identifier of the workspace (required)
auth - authorization token (required)
from - from date (required)
to - to date (required)

Sample JSON Response

{
  ok: true,
  data: 
  [
  • {
    • Source: "",
    • Client: "CLIENT1",
    • Project: "project1",
    • Timestamp: "28-08-2020 13:30:00",
    • Action Type: "In",
    • Duration (HH:MM): "",
    • Employee Name: "Ronak Bansal",
    • Remark: "",
    • Total Day Duration (including lunch) (HH:MM): ""
    },
  • {
    • Source: "Day Change",
    • Client: "",
    • Project: "",
    • Timestamp: "28-08-2020 23:59:59",
    • Action Type: "Out",
    • Duration (HH:MM): "10:30",
    • Employee Name: "Ronak Bansal",
    • Remark: "",
    • Total Day Duration (including lunch) (HH:MM): "10:30"
    },
  • {
    • Source: "Day Change",
    • Client: "CLIENT1",
    • Project: "project1",
    • Timestamp: "29-08-2020 00:00:00",
    • Action Type: "In",
    • Duration (HH:MM): "",
    • Employee Name: "Ronak Bansal",
    • Remark: "",
    • Total Day Duration (including lunch) (HH:MM): ""
    }
] } Response Codes 200 - Success 400 - Bad Input parameter