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.

Log in to see full request history

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.
Path Params
string
required

Mandatory Unique 32-character identifier of the center.

Query Params
date
required

Mandatory Start date from which the schedules of employees of the specified center will be displayed.

date
required

Mandatory End date until which the schedules of employees of the specified center will be displayed.

int32

Optional The schedule status of the employee: All = -2, NotScheduled = -1, Working = 0, and the specific code for the respective custom leave.

string

Optional Unique 32-character identifier of the employee of the specified center.

string

Optional Unique 32-character identifier of the employee's assigned job details.

boolean

Optional If true, the API considers the time stamp for the specified date range to filter the response data. If false, the API considers only the date values to filter the employee schedules.

Responses

Language
Credentials
Click Try It! to start a request and see the response here! Or choose an example:
application/json