This API helps you to add, edit, or delete the schedule of the specified employee for any one particular day at a time.
You cannot use this API to simultaneously update the employee's schedule for multiple days.
You must provide appropriate data for the employee_id parameter.
Note: Before using this API, you must first call the GET Retrieve the schedules of employees of a center API. After you retrieve the schedule_id for the required employee, you can then use that unique schedule_id to update the employee's schedule for a specific day.
Parameters
Name
Type
Description
employee_id
guid
Unique 32-character ID of the specific employee. This is a mandatory parameter.
Request Body Details
Name
Type
Description
schedules
object
Object that contains schedule details of the specific employee. For more information, refer to the schedules table below.
center_id
guid
Unique 32-character ID of the center at which the specified employee works.
schedules
Name
Type
Description
date
datetime
Date of the schedule of the employee.
shifts
object
Object that contains shift details of the employee. For more information, refer to the shifts table below.
shifts
Name
Type
Description
schedule_id
guid
Unique 32-character ID of the schedule of the employee.
start_time
datetime
Start time of the shift of the employee.
end_time
datetime
End time of the shift of the employee.
status
int
Indicates the status of the shift of the employee.
room_id
guid
The id of the room in which the employee is scheduled to work.
Reponse Details
Name
Type
Description
success
boolean
If true, it indicates that the employee's schedule was successfully updated.
error
object
Object that contains error message and error code details. For more information, refer to the error table below.
error
Name
Type
Description
StatusCode
int
Status code that represents the type of the error.
Message
string
Message that describes the error.
InternalMessage
string
Internal message that describes about the error in more detail.
Error Message Details
Error Message
Error Code
Description
InvalidInput
502
If the employee schedule details are not passed and/or the employee schedule is null.
InvalidInput
502
If an invalid employee_id is specified.
InvalidInput
502
If the specified employee schedule date is for a past date.
InvalidInput
502
If the specified employee does not exist in the organization. The provided login credentials might not be of an employee.
InvalidInput
502
If the employee has already checked in. The schedule of employees who have already checked in cannot be edited.
InvalidInput
502
If the number of schedules that is passed in scheduleCount is not valid. The number of schedules that can be passed for an employee must not be equal to zero and must not be more than two.
InvalidInput
502
If there is a mismatch between the specified start date and end date of the employee's schedule. The specified start date and end date details of an employee must always be same.
InvalidInput
502
If the start time of one of the schedules is greater than the end time. Start time of any schedule cannot be greater than its end time.
InvalidInput
502
If not all schedules could be passed.
InvalidInput
502
If the employee's shifts are overlapping; shifts cannot overlap.
SomethingWentWrong
4023
If some issue occurred due to a failure at the API level.
SomethingWentWrong
438
If the Zenoti user does not have the required authorization to update the employee's schedule.
Language
Credentials
Header
Click Try It! to start a request and see the response here!