Availability
Availability in Zoho Shifts can be used to set which times of the day or days of the week an employee prefer to work or not available.
End Points
Get all availabilities
Create an availability
Update an availability
Delete an availability
Get all availabilities
Required OAuth Scope: ZohoShifts.schedules.READ
Query Parameters
start_date
(Required)
Start date of range in
yyyy-mm-dd
format. end_date
(Required)
End date of range in
yyyy-mm-dd
format. employees
Comma separated employee IDs to filter availabilities by employees.
$ curl https://shifts.zoho.com/api/v1/{org_id}/availability
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"availabilities": [
{
"id": "4838893903",
"employee_id": "7238362363823",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"preference": "preferred",
"notes": "Morning classes."
}
]
}
Create an availability
Required OAuth Scope: ZohoShifts.schedules.CREATE
Arguments
employee_id
string
(Required)
start_time
date-time
(Required)
Start time of the availability
end_time
date-time
(Required)
End time of the availability
preference
string
(Required)
Any of
preferred
, unavailable
. notes
string
$ curl https://shifts.zoho.com/api/v1/{org_id}/availability
-X POST
-H "Content-Type: application/json;charset=UTF-8"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
-d '{"field":"value","field":"value"}'
{
"employee_id": "7238362363823",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"preference": "preferred",
"notes": "Morning classes."
}
{
"id": "4838893903",
"employee_id": "7238362363823",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"preference": "preferred",
"notes": "Morning classes."
}
Update an availability
Required OAuth Scope: ZohoShifts.schedules.UPDATE
Arguments
id
string
employee_id
string
start_time
date-time
Start time of the availability
end_time
date-time
End time of the availability
preference
string
Any of
preferred
, unavailable
. notes
string
$ curl https://shifts.zoho.com/api/v1/{org_id}/availability/{id}
-X PUT
-H "Content-Type: application/json;charset=UTF-8"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
-d '{"field":"value","field":"value"}'
{
"id": "4838893903",
"employee_id": "7238362363823",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"preference": "preferred",
"notes": "Morning classes."
}
{
"employee_id": "7238362363823",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"preference": "preferred",
"notes": "Morning classes."
}
Delete an availability
Required OAuth Scope: ZohoShifts.schedules.DELETE
$ curl https://shifts.zoho.com/api/v1/{org_id}/availability/{id}
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"message": "Availability deleted"
}