Get availability intervals by service
This endpoint allows querying the different availability intervals defined for the employees of a service within a period not exceeding 32 days.
GET /api/v1/businesses/{businessId}/service/{serviceId}/disponibility?from={yyyy-MM-dd}&to={yyyy-MM-dd}
If the data included in the request is correct —both businessId and serviceId— the response will be a 200 OK with the availability intervals defined for all employees of the service.
Response example
{
"serviceId": "SERVICEID",
"from": "2025-03-01",
"to": "2025-03-20",
"disponibilityIntervals": [
{
"from": "2016-02-29",
"type": "DAY_TYPE",
"personId": "XX1"
},
{
"from": "2021-10-01",
"to": "2025-03-10",
"type": "DAY_TYPE",
"personId": "XX1"
},
{
"from": "2025-03-11",
"type": "SHIFT_PATTERN",
"personId": "XX2"
}
]
}
Details
-
serviceId: external identifier of the service.
-
from: start date of the period for which the request is made.
-
to: end date of the period for which the request is made.
-
disponibilityIntervals: set of availability intervals defined within the queried time period.
-
from: start date of the availability interval.
-
to: end date of the availability interval, if defined.
-
type: method used to define availability for this interval. Possible values are
DAY_TYPE(day type),SHIFT_PATTERN(shift patterns), andCALENDAR(assignment calendar). -
personId: external identifier of the employee to whom the availability interval belongs.
-
As shown in the example, if an employee has multiple availability intervals defined for the range specified in the URL, the request will return the specifications of each one.
Considerations
If no availability intervals are defined for the service or for the requested date range, the disponibilityIntervals field will contain an empty array [].
Error codes
This endpoint does not return any error codes of its own beyond those described in common errors.
Useful links
What is employee availability?