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 include the availability intervals defined for the employee, detailing the following information:

  • 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), and CALENDAR (assignment calendar).

Below is an example of the request:

GET /api/v1/businesses/BUSINESSID/person/PERSONID/disponibility?from=2023-01-01&to=2025-12-01

Response snippet:

{
    "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"
        }
    ]
}
json

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 the employee identifier is incorrect, the request will return a 404 Not Found error indicating Employee not found.

If no availability intervals are defined for the employee or for the requested date range, the disponibilityIntervals field will contain an empty array [].