Service Board > Max for Developers > Max Groovy APIs > Shift Plan API > Get Available Durations APIs
Get Available Durations APIs
These APIs return available shift segment information for specified start and end times. Holidays are excluded from working hours during calculation. Return type is List<ShiftSegmentItem>. To return all available and unavailable durations, set all to true.
Get All Available Durations for Specified User Between Specified Start and End Times
getAvailableDurations(UUID userId, DateTime startDate, DateTime endDate, Boolean ignoreNonWorkType = false, Boolean fullDuration = false, Boolean all = false)
When all is set to true, returns all work and non-work durations.
Get All Available Durations for Shift Defined in System Settings Between Specified Start and End Times
getAvailableDurationsBySystemSetting(DateTime startDate, DateTime endDate, Boolean ignoreNonWorkType = false, Boolean fullDuration = false, Boolean all = false)
Get All Available Durations for Passed-in Shift Between Specified Start and End Times
getAvailableDurationsByShift(UUID shiftId, DateTime startDate, DateTime endDate, Boolean ignoreNonWorkType = false, Boolean fullDuration = false, Boolean all = false)
For more information:
Was this helpful?