API Name:
api_v2/users/get_today_status
We use this API to get status of iFlow users with today's attendance data.
Quick info:
Full url
Method: GET
https://app.hriflow.ro/api/api_v2/users/get_today_status
CURL request
Method: GET
curl -X GET -H "Authorization: Bearer {ACCESS TOKEN}" https://app.hriflow.ro/api/api_v2/users/get_today_status
Parameters:
Access token
The API access token is generated from hriflow app, with a label name of your choosing and is assigned to an administrator from the company.
Language
Method: POST With api_language key and ro_RO value you can translate the status to romanian.
Attendance type
Method: POST For the attendance_type key with the values set to work_schedule or live_attendance you can get the status by live attendance or by work schedule. Default status is set by live_attendance. With live_attendance value you can also get data for live attendance like check in and check out hours, time worked between live intervals and also a total time worked on all live intervals (example on below "Returns" section).
CURL request
Method: POST curl -X POST -H "Authorization: Bearer {ACCESS TOKEN}" -d "api_language={ro_RO/en_US}&attendance_type={live_attendance/work_schedule}" https://app.hriflow.ro/api/api_v2/users/get_today_status
Returns:
Ok response:
If everything is ok, you get a list of attendances with no errors.
[
{
"status": "Missing, Sick Leave",
"at_work": false,
"full_name": "Miclea Dorian",
"cnp": "2222222222222",
"user_id": "3",
"mark_number": "111111",
"events": [
{
"event_id": "485247",
"user_id": "3",
"event_type": "other_leave",
"event_type_name": "Sick Leave",
"position": 0,
"consecutive_days_position": "solo",
"event_type_color": "#FA28FF",
"approve_status": "",
"partial_approved_by_user_id": null,
"other_leave_type_name": "01 - Common illness",
"event_meta": {
"user_id": "3",
"days": 1,
"start_date": "30/09/2022",
"end_date": "30/09/2022",
"reason_message": ""
}
}
]
},
{
"status": "At work",
"at_work": true,
"full_name": "Abrudan Alexandru",
"cnp": "3333333333333",
"user_id": "2"
"mark_number": "77777",
},
{
"status": "At work",
"at_work": true,
"full_name": "Ban Alina",
"cnp": "5555555555555",
"user_id": "50456"
"mark_number": "33333",
}
]
Example of return without errors and with live_attendance value for attendance_type key.
[
{
"status": "At work",
"at_work": true,
"full_name": "Abrudan Alexandru",
"cnp": "3333333333333",
"user_id": "2"
"mark_number": "77777",
"live_attendance": [
{
"check_in": "07:00:00",
"check_out": "09:33:00",
"worked": "02:33:00"
},
{
"check_in": "10:30:00",
"check_out": "10:38:00",
"worked": "00:08:00"
},
{
"check_in": "10:40:00",
"check_out": "",
"worked": "00:00:00"
},
{
"current_time": "11:07:33",
"total_worked": "02:41:00"
}
]
},
]
Error response:
If an error ocurs on an attendance, you will get the text of the error on one of the error_ keys
{
"error": "Key is invalid!"
}






