Get availability intervals by employee
This endpoint allows querying the availability intervals defined for an employee and the type of availability for each period.
GET /api/v1/businesses/{businessId}/person/{personId}/disponibility?from={yyyy-MM-dd}&to={yyyy-MM-dd}
If the data included in the request is correct —both businessId and personId— the response will be a 200 OK with the availability intervals defined for the employee.
Response example
{
"personId": "PERSONID",
"from": "2023-01-01",
"to": "2025-12-01",
"disponibilityIntervals": [
{
"from": "2025-01-21",
"to": "2025-01-28",
"type": "DAY_TYPE"
},
{
"from": "2021-06-25",
"to": "2025-01-31",
"type": "DAY_TYPE"
},
{
"from": "2025-02-01",
"to": "2025-02-20",
"type": "SHIFT_PATTERN"
}
]
}
Details
-
personId: external identifier of the employee.
-
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 range.
-
from: start date of the availability interval.
-
to: end date of the availability interval, if it has been defined.
-
type: method used to define availability for this interval. Possible values are
DAY_TYPE(day type),SHIFT_PATTERN(shift patterns), andCALENDAR(assignment calendar).
-
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 for each one.
Considerations
If no availability intervals are defined for the employee 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?