Retrieve the schedules of employees of a center

This API helps you to retrieve the schedules of employees of the specified center.
You must provide the unique identifier of the center as center_id. You must also specify the appropriate start_date and end_date values for which you want to view the schedules of employees.

Note: To run this request, you must enable the Schedule role permission. This allows the user to access the employee's schedule. Navigate to the organization-level, Security Roles > employee role > Permissions > Employee Manager > Other Settings > Schedule.

Response Details

NameTypeDescription
employee_schedulesobjectObject that contains details about various elements of employees' schedules. For more information, refer to the employee_schedules table below.

employee_schedules

NameTypeDescription
employee_idguidUnique 32-character ID of an employee of the center.
employee_namestringName of the employee.
schedulesobjectObject that contains schedule details of the specific employee. For more information, refer to the schedules table below.

schedules Object

NameTypeDescription
datedatetimeDate of the beginning of the employee's schedule.
shiftsobjectObject that contains shift details of the employee. For more information, refer to the shifts table below.

shifts Object

NameTypeDescription
schedule_idguidUnique 32-character ID of the schedule of the employee.
start_timedatetimeStart time of the shift of the employee.
end_timedatetimeEnd time of the shift of the employee.
statusintIndicates the status of the shift of the employee.
room_idguidUnique 32-character ID of the room where the employee was scheduled to work.

error

NameTypeDescription
StatusCodeintStatus code that represents the type of error.
MessagestringMessage that describes the error.
InternalMessagestringInternal message that describes the error in more detail.

error Object

Error MessageError CodeDescription
InvalidInput502If the specified center_id is not valid.
InvalidInput502If the employee does not exist in the organization. The login credentials might not be of an employee.
InvalidInput502If the specified date range is not valid. The date range must be between 0 to 30 days.
InvalidInput502If the specified start_date or end_date is not valid.
UserNotAuthorized438If the Zenoti user does not have the appropriate authorization to retrieve the schedules of employees of a center.
Language
Authorization
Header
Click Try It! to start a request and see the response here!