API Docs
Employees

Employees

Employees in Zoho Shifts can be grouped by schedules. Every employee must be assigned to at least one schedule.

End Points

Get all employees

List all employees in an organization.

Required OAuth Scope: ZohoShifts.employees.READ

Query Parameters

schedules
Comma separated schedule IDs to filter employees by schedules.
status
Any of active, inactive to filter employees by status.
invite_status
Any of not-sent, sent, accepted to filter employees by invitation status.
limit
The number of entries to return per page. Default: 50 Max: 100
page
The page number to fetch. Default: 1

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/employees -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "employees": [ { "id": "12345", "first_name": "John", "last_name": "Peter", "work_email": "john.peter@mail.com", "mobile": "234569886", "mobile_country_code": "in", "access_level_id": "11000000000001", "status": "active", "invite_status": "accepted", "schedules": [ { "id": "11000000000201" } ], "positions": [ { "id": "11000000000301" } ] } ], "meta": { "count": 100, "limit": 50, "page": 1 } }

Create an employee

Required OAuth Scope: ZohoShifts.employees.CREATE

Arguments

first_name
string
(Required)
First name of the employee.
last_name
string
Last name of the employee.
work_email
string
Email address of the employee. This will be used to send user invitation and email notifications.
mobile
string
Mobile number of the employee. This will be used to send text notifications.
mobile_country_code
string
Country code of the mobile number.
schedules
array
(Required)
Array of schedule IDs assigned to the employee. Minimum of one schedule is required.
Show Sub-Attributes arrow
id
string
(Required)
Schedule ID
positions
array
Array of position IDs assigned to the employee.
Show Sub-Attributes arrow
id
string
(Required)
Position ID
timezone
string
(Required)
Time zone of the employee.
access_level_id
string
Access level ID of the employee.
send_invitation
boolean
, default is false
Send user invitation to the newly created employee
hourly_rate
string
The hourly rate fo the employee.
hire_date
date
Hire date of the employee
external_employee_id
string
Unique ID of the employee used in other platform.
hide_from_schedule
boolean
, default is false
Send true to hide this employee from full schedule page.
overtime_rule_id
string
ID of overtime rule assigned to the employee
employment_type
string
Employment type of the employee. Any of full-time, part-time.
max_hrs_week
number
The maximum number of hours the employee can work in a week.
min_hrs_week
number
The maximum number of hours the employee can work in a week.
max_hrs_day
number
The maximum number of hours the employee can work in a day.
max_days_week
integer
The maximum number of days the employee can work in a week.
max_shifts_day
integer
The maximum number of shifts the employee can work in a day.

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/employees -X POST -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "first_name": "John", "last_name": "Peter", "work_email": "john.peter@mail.com", "mobile": "234569886", "mobile_country_code": "in", "schedules": [ { "id": "11000000000201" } ], "positions": [ { "id": "11000000000301" } ], "timezone": "America/New_York", "access_level_id": "11000000000001", "send_invitation": false, "hourly_rate": 20, "hire_date": "1995-05-23", "external_employee_id": "123657", "hide_from_schedule": false, "overtime_rule_id": "11000000000003", "employment_type": "full-time", "max_hrs_week": 168, "min_hrs_week": 168, "max_hrs_day": 24, "max_days_week": 7, "max_shifts_day": 0 }

Response Example

{ "id": "12345", "first_name": "John", "last_name": "Peter", "work_email": "john.peter@mail.com", "mobile": "234569886", "mobile_country_code": "in", "schedules": [ { "id": "11000000000201" } ], "positions": [ { "id": "11000000000301" } ], "timezone": "America/New_York", "access_level_id": "11000000000001", "status": "active", "invite_status": "accepted", "hire_date": "1995-05-23", "external_employee_id": "123657", "hide_from_schedule": false, "overtime_rule_id": "11000000000003", "employment_type": "full-time", "max_hrs_week": 168, "min_hrs_week": 168, "max_hrs_day": 24, "max_days_week": 7, "max_shifts_day": 0 }

Get an employee

Required OAuth Scope: ZohoShifts.employees.READ

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/employees/{id} -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "id": "12345", "first_name": "John", "last_name": "Peter", "work_email": "john.peter@mail.com", "mobile": "234569886", "mobile_country_code": "in", "access_level_id": "11000000000001", "status": "active", "invite_status": "accepted", "schedules": [ { "id": "11000000000201" } ], "positions": [ { "id": "11000000000301" } ], "timezone": "America/New_York", "hire_date": "1995-05-23", "external_employee_id": "123657", "hide_from_schedule": false, "overtime_rule_id": "11000000000003", "employment_type": "full-time", "max_hrs_week": 168, "min_hrs_week": 168, "max_hrs_day": 24, "max_days_week": 7, "max_shifts_day": 0 }

Update an employee

Required OAuth Scope: ZohoShifts.employees.UPDATE

Arguments

first_name
string
First name of the employee.
last_name
string
Last name of the employee.
work_email
string
Email address of the employee. This will be used to send user invitation and email notifications.
mobile
string
Mobile number of the employee. This will be used to send text notifications.
mobile_country_code
string
Country code of the mobile number.
schedules
array
Array of schedule IDs assigned to the employee. Minimum of one schedule is required.
Show Sub-Attributes arrow
id
string
(Required)
Schedule ID
positions
array
Array of position IDs assigned to the employee.
Show Sub-Attributes arrow
id
string
(Required)
Position ID
timezone
string
Time zone of the employee.
access_level_id
string
Access level ID of the employee.
hourly_rate
string
The hourly rate fo the employee.
hire_date
date
Hire date of the employee
external_employee_id
string
Unique ID of the employee used in other platform.
hide_from_schedule
boolean
, default is false
Send true to hide this employee from full schedule page.
overtime_rule_id
string
ID of overtime rule assigned to the employee
employment_type
string
Employment type of the employee. Any of full-time, part-time.
max_hrs_week
number
The maximum number of hours the employee can work in a week.
min_hrs_week
number
The maximum number of hours the employee can work in a week.
max_hrs_day
number
The maximum number of hours the employee can work in a day.
max_days_week
integer
The maximum number of days the employee can work in a week.
max_shifts_day
integer
The maximum number of shifts the employee can work in a day.

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/employees/{id} -X PUT -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "first_name": "John", "last_name": "Peter", "work_email": "john.peter@mail.com", "mobile": "234569886", "mobile_country_code": "in", "schedules": [ { "id": "11000000000201" } ], "positions": [ { "id": "11000000000301" } ], "timezone": "America/New_York", "access_level_id": "11000000000001", "hourly_rate": 20, "hire_date": "1995-05-23", "external_employee_id": "123657", "hide_from_schedule": false, "overtime_rule_id": "11000000000003", "employment_type": "full-time", "max_hrs_week": 168, "min_hrs_week": 168, "max_hrs_day": 24, "max_days_week": 7, "max_shifts_day": 0 }

Response Example

{ "id": "12345", "first_name": "John", "last_name": "Peter", "work_email": "john.peter@mail.com", "mobile": "234569886", "mobile_country_code": "in", "access_level_id": "11000000000001", "status": "active", "invite_status": "accepted", "schedules": [ { "id": "11000000000201" } ], "positions": [ { "id": "11000000000301" } ], "timezone": "America/New_York", "hire_date": "1995-05-23", "external_employee_id": "123657", "hide_from_schedule": false, "overtime_rule_id": "11000000000003", "employment_type": "full-time", "max_hrs_week": 168, "min_hrs_week": 168, "max_hrs_day": 24, "max_days_week": 7, "max_shifts_day": 0 }

Activate employees

Required OAuth Scope: ZohoShifts.employees.UPDATE

Arguments

employees
array
(Required)
Array of employee IDs to activate.

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/employees/activate -X POST -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "employees": [ "11000000000061", "11000000000055", "11000000000055" ] }

Response Example

{ "message": "Employees activated" }

Deactivate employees

Required OAuth Scope: ZohoShifts.employees.UPDATE

Arguments

employees
array
(Required)
Array of employee IDs to de-activate.

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/employees/deactivate -X POST -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "employees": [ "11000000000061", "11000000000055", "11000000000055" ] }

Response Example

{ "message": "Employees deactivated" }

Invite employees

Required OAuth Scope: ZohoShifts.employees.UPDATE

Arguments

employees
array
(Required)
Array of employee IDs to send user invitation.
access_level_id
string
Access level ID to assign to the employees.

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/employees/invite -X POST -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "employees": [ "11000000000061", "11000000000055", "11000000000055" ], "access_level_id": "11000000000001" }

Response Example

{ "message": "Employees invited" }

Get all access levels

Required OAuth Scope: ZohoShifts.settings.READ

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/settings/accesslevels -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "access_levels": [ { "id": "11000000000001", "name": "Administrator" } ] }
© 2024, Zoho Corporation Pvt. Ltd. All Rights Reserved.