Web Analytics

API Name:

api_v2/events/get_activity_events

We use this API to get events from company.

Quick info:

Full url

Method: GET

https://app.hriflow.ro/api/api_v2/events/get_activity_events

CURL request

Method: GET

curl -X GET -H "Authorization: Bearer {ACCESS TOKEN}" https://app.hriflow.ro/api/api_v2/events/get_activity_events

Method: POST

Example with users_ids parameter: curl -X POST -H "Authorization: Bearer {ACCESS TOKEN}" https://app.hriflow.ro/api/api_v2/events/get_activity_events?users_ids={users ids}

api: api_v2 /events/get_activity_events

Parameters:

API KEY

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.

api: api_v2 /events/get_activity_events

users_ids

Parameter users_ids is/are obtain from users profile as shown in image.

This parameter can be a single id or multiple ids separated by comma.

api: api_v2 /events/get_activity_events

teams

Parameter teams are the teams names and can be obtain in app from Workspace->Teams.

For this parameter copy team name and paste it to value, it works with multiple values separated by comma.

api: api_v2 /events/get_activity_events

event_ids

Parameter event_ids are the ids of the event types names.

To obtain these ids make a request without this parameter, you can filter by other parameters, and at the beginning of the response there will be an array (example shown in image) with ids and corresponding event name.

This parameter can be a single id or multiple ids separated by comma.

api: api_v2 /events/get_activity_events

status

Parameter status shows the state of the event approve_status.

Alowed values are: approved, not_approved, waiting, partially_approved, not_required, request_edit.

This parameter can be a single value or multiple values separated by comma.

date_interval_start
and
date_interval_end

These parameters can get a response with events from their interval.

If none of them are set, response will get, depending on other parameters, all the events from the first one registered until the period of the last event registered.

If one of them is set the other one is also required.

Dates format must be 'Y-m-d' (ex: 2025-08-08)

Returns:

Ok response:

If everything is ok, you get a list of events with no errors.

{
    "company_events": [
        "event_id: 67677 -> Paid Leave",
        "event_id: 67678 -> Sick Leave",
        "event_id: 67679 -> Leave Without Pay",
        "event_id: 67680 -> Unmotivated Absence",
        "event_id: 67681 -> Overtime",
        "event_id: 67682 -> Time Off",
        "event_id: 67683 -> Business Trip",
        "event_id: 67684 -> Compensatory Time",
        "event_id: 67685 -> Shift Swap"
    ],
    "events_waiting_approval": "0",
    "events_count": 2,
    "events": [
        {
            "full_name": "angajat 3",
            "event_name": "Paid Leave",
            "reason": "Some reason",
            "added_by": "233123",
            "approved_by": "Company Admin",
            "approve_status": "approved",
            "event_start": "2025-09-03 00:00:00",
            "event_end": "2025-09-03 00:00:00",
            "created": "2025-09-05 05:32:04",
            "updated": "2025-09-05 05:32:04"
        },
        {
            "replacing_users": {
                "full_name": "angajat 8"
            }
        },
        {
            "overlapping_event": {
                "full_name": "angajat 1",
                "event_name": "Paid Leave"
            }
        },
        {
            "full_name": "angajat 1",
            "event_name": "Paid Leave",
            "reason": "personal reason",
            "added_by": "233123",
            "approved_by": "Company Admin",
            "approve_status": "approved",
            "event_start": "2025-09-03 00:00:00",
            "event_end": "2025-09-03 00:00:00",
            "created": "2025-09-01 10:34:17",
            "updated": "2025-09-03 10:08:14"
        },
        {
            "replacing_users": {
                "full_name": "angajat 8"
            }
        },
        {
            "replacing_users": {
                "full_name": "angajat 5"
            }
        },
        {
            "overlapping_event": {
                "full_name": "angajat 3",
                "event_name": "Paid Leave"
            }
        }
    ]
}

Error response:

Error examples:

{
    "error": "Key is invalid!"
}
{
    "param_error": "Invalid parameters: teamszz"
}