Discussions

Ask a Question
Back to All

GET Leaves by positions

Good day.

I am trying to get a list of employee vacations by specifying a date range and position.

For example: https://www.humanity.com/api/v2/leaves?access_token=xxxxxxxx&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&position=xxxxxxx.

If I use the access_token of a user with “Employee” permissions, then only the “start_date” and “end_date” parameters work, and I get vacations for all employees of all positions.

If I use the access_token with "manager" permissions, then the position filter works correctly and I get vacations for the specified position.

Why isn't the restricted user filtering information by position through an API request?

How can I get workaround this?