Get requests by service
This endpoint returns employee requests for a service within a time interval of no more than 31 days.
GET /api/v2/businesses/{businessId}/services/{serviceId}/requests?from={yyyy-MM-dd}&to={yyyy-MM-dd}
If the data included in the request is correct —both the businessId and the serviceId— the response will contain the list of requests from the service employees in the time interval indicated in the URL.
Response example
[
{
"employeeId": "1006350",
"status": "REQUESTED",
"type": "MANDATORY",
"from": "2026-08-27",
"to": "2026-08-27",
"fromHour": "20:00",
"toHour": "22:00",
"requestedAt": "2026-08-20T10:15:32.123Z"
},
{
"employeeId": "1006350",
"status": "GRANTED",
"type": "MAYBE",
"from": "2026-08-29",
"to": "2026-08-29",
"fromHour": "20:00",
"toHour": "22:00",
"requestedAt": "2026-08-22T16:42:10.500Z"
}
]
Details
-
employeeId: external identifier of the employee.
-
status: status of the request. The possible values are
REQUESTED,GRANTEDandDENIED. -
type: type of availability that applies to the request. The possible values are
MANDATORY(work availability),MAYBE(availability) andNON_WORKED(free day). -
from: start date of the request in
yyyy-MM-ddformat. -
to: end date of the request in
yyyy-MM-ddformat. -
fromHour: start time of the request in
HH:mmformat. Refers to local time, that is, the time zone of the service. -
toHour: end time of the request in
HH:mmformat. Refers to local time, that is, the time zone of the service. -
comments: free text that can accompany the request.
-
recover: type of recovery indicating how the employee’s request could be compensated. The options are
FREE(free day) orNONE(no compensation is offered for the request). -
requestedAt: date and time the request was created, in
yyyy-MM-ddTHH:mm:ss.SSSZformat.
As can be seen in the example, the response information will depend on the data defined for each request and its status in the system.
Considerations
The fromHour and toHour fields return values in local time, determined by the time zone configured for the service.
If there are no requests for the service in the query interval, the request will return an empty array [].
Error codes
In addition to the common errors, this endpoint can return the following codes:
| Code | Message | Description |
|---|---|---|
|
from and to cannot be greater than 31 |
The range between |
Useful links
What is a request?