Get employee requests
This endpoint allows to query an employee’s requests within a specified time period not exceeding 31 days.
GET /api/v1/businesses/{businessId}/employees/{employeeId}/requests?from={yyyy-MM-dd}&to={yyyy-MM-dd}
If the data included in the request is correct —both the businessId and the employeeId— the response will contain the list of the employee’s requests within the defined time interval:
[
{
"employeeId": "1006357",
"status": "REQUESTED",
"type": "NON_WORKED",
"from": "2024-07-20",
"to": "2024-07-20"
},
{
"employeeId": "1006357",
"status": "GRANTED",
"type": "MAYBE",
"from": "2024-07-21",
"to": "2024-07-21",
"fromHour": "10:00",
"toHour": "17:00"
},
{
"employeeId": "1006357",
"status": "REQUESTED",
"type": "MANDATORY",
"from": "2024-07-25",
"to": "2024-07-25",
"fromHour": "10:00",
"toHour": "12:00"
}
]
Considerations
The fromHour
and toHour
fields return the local time, that is, the time zone configured for the service.
If the time period specified in the URL is longer than 31 days, the request will return a 406 Not Acceptable
error.
If the employee identifier is incorrect, the request will return a 404 Not Found
error indicating Employee not found.
Useful links
What is a request?