api/v3/unavailability
Unavailability
Unavailability API help users to mark their absence, so that the work is not assigned to them for that period.
Attributes
id (long)
Unique identifier to identify the unavailability ( leave information ) of an user
comments (string)
User’s comments on the leave added
user (user)
User who is not available at work
is_technician (boolean)read only
Indicates whether the unavailable user is a technician or requester
from_date (date)
Indicates the start date & time of the User’s leave
to_date (date)
Indicates the end date & time of the User’s leave
More Attributes Expand all
Add Unavailability
This operation helps to add leave in the organization
Mandatory Fields :- user, from_date, to_date
Url
Attributes
id (long)
Unique identifier to identify the unavailability ( leave information ) of an user
comments (string)
User’s comments on the leave added
user (user)
User who is not available at work
is_technician (boolean)read only
Indicates whether the unavailable user is a technician or requester
from_date (date)
Indicates the start date & time of the User’s leave
to_date (date)
Indicates the end date & time of the User’s leave
More Attributes Expand all
$ curl ap/v3/unavailability
-X POST
-H "Accept: application/vnd.manageengine.sdp.v3+json"
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
-H "Content-Type: application/x-www-form-urlencoded"
-d input_data=
'{
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": 1664303400000
},
"to_date": {
"value": 1664389799999
},
"leave_type": {
"id": "2337000000007933"
},
"comments": "availing comp-off ",
"action": {
"for_approval": {
"approval_delegation_option": {
"id": "2337000000131014"
},
"backup_approver": {
"id": "2337000000091155"
}
},
"for_technician": {
"tech_delegation_option": {
"id": "2337000000131011"
},
"backup_technician": {
"id": "2337000000170001"
}
}
}
}
}'
{
"unavailability": {
"is_technician": true,
"comments": "availing comp-off",
"from_date": {
"display_value": "Sep 27, 2022",
"value": "1664218800000"
},
"to_date": {
"display_value": "Sep 28, 2022",
"value": "1664391599999"
},
"leave_type": {
"name": "Comp Off",
"id": "2337000000007933"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Sep 15, 2022 12:06 PM",
"value": "1663225565175"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Sep 15, 2022 12:06 PM",
"value": "1663225565202"
},
"updated_by": null,
"for_approval": {
"backup_approver": {
"name": "Reporting To",
"id": "2337000000091155"
},
"approval_delegation_option": {
"name": "ASSIGNED_TO_ROLE",
"id": "2337000000131014"
}
},
"for_technician": {
"backup_technician": {
"email_id": "sample_user_2@test.com",
"is_technician": true,
"name": "user_2",
"id": "2337000000170001",
"first_name": "user_2"
},
"tech_delegation_option": {
"name": "ASSIGNED_TO_USER",
"id": "2337000000131011"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
},
"id": "2337000001646025",
"user": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
}
}
Edit Unavailability
This operation helps you to modify leave details of an user, to add/update backup for tickets & approvals assigned to the user during his leave period
Url
api/v3/unavailability/{unavailability_id}
Attributes
id (long)
Unique identifier to identify the unavailability ( leave information ) of an user
comments (string)
User’s comments on the leave added
user (user)
User who is not available at work
is_technician (boolean)read only
Indicates whether the unavailable user is a technician or requester
from_date (date)
Indicates the start date & time of the User’s leave
to_date (date)
Indicates the end date & time of the User’s leave
More Attributes Expand all
$ curl api/v3/unavailability/{unavailability_id}
-X PUT
-H "Accept: application/vnd.manageengine.sdp.v3+json"
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
-H "Content-Type: application/x-www-form-urlencoded"
-d input_data=
'{
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": "1664130600000"
},
"to_date": {
"value": "1664217000000"
},
"leave_type": {
"id": "2337000000007935"
},
"comments": "On duty"
}
}'
{
"unavailability": {
"is_technician": true,
"comments": "On duty",
"from_date": {
"display_value": "Sep 25, 2022",
"value": "1664046000000"
},
"to_date": {
"display_value": "Sep 26, 2022",
"value": "1664218799999"
},
"leave_type": {
"name": "On Duty",
"id": "2337000000007935"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Sep 15, 2022 12:06 PM",
"value": "1663225565175"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Sep 15, 2022 12:06 PM",
"value": "1663225565202"
},
"updated_by": null,
"for_approval": {
"backup_approver": {
"name": "Reporting To",
"id": "2337000000091155"
},
"approval_delegation_option": {
"name": "ASSIGNED_TO_ROLE",
"id": "2337000000131014"
}
},
"for_technician": {
"backup_technician": {
"email_id": "sample_user_2@test.com",
"is_technician": true,
"name": "user_2",
"id": "2337000000170001",
"first_name": "user_2"
},
"tech_delegation_option": {
"name": "ASSIGNED_TO_USER",
"id": "2337000000131011"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
},
"id": "2337000001646025",
"user": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
}
}
Delete Unavailability
This operation helps to cancel the leave raised
Url
api/v3/unavailability?ids={unavailability_ids}
$ curl api/v3/unavailability?ids={unavailability_ids}
-X DELETE
-H "Accept: application/vnd.manageengine.sdp.v3+json"
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
-H "Content-Type: application/x-www-form-urlencoded"
{
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Get Unavailability
This operation helps to retrieve specific leave raised in the organization
Url
api/v3/unavailability/{unavailability_id}
Attributes
id (long)
Unique identifier to identify the unavailability ( leave information ) of an user
comments (string)
User’s comments on the leave added
user (user)
User who is not available at work
is_technician (boolean)read only
Indicates whether the unavailable user is a technician or requester
from_date (date)
Indicates the start date & time of the User’s leave
to_date (date)
Indicates the end date & time of the User’s leave
More Attributes Expand all
$ curl api/v3/unavailability/{unavailability_id}
-X GET
-H "Accept: application/vnd.manageengine.sdp.v3+json"
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
-H "Content-Type: application/x-www-form-urlencoded"
{
"unavailability": {
"is_technician": true,
"comments": null,
"from_date": {
"display_value": "Jun 26, 2020",
"value": "1593196200000"
},
"to_date": {
"display_value": "Jun 27, 2020",
"value": "1593282599999"
},
"leave_type": {
"name": "Comp Off",
"id": "2337000000007933"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Jun 19, 2020 11:38 AM",
"value": "1592548735068"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Jun 19, 2020 11:38 AM",
"value": "1592548735105"
},
"updated_by": null,
"for_approval": {
"backup_approver": null,
"approval_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"id": "2337000000360025",
"for_technician": {
"backup_technician": null,
"tech_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
},
"id": "2337000000360023",
"user": {
"email_id": "sample_user_3@test.com",
"is_technician": true,
"name": "user_3",
"id": "2337000000233049",
"department": {
"site": null,
"name": "Finance",
"id": "2337000000006629"
},
"first_name": "user_3"
}
}
}
Get List Unavailability
This operation helps to retrieve all the leave raised in the organization.
Url
api/v3/unavailability
Attributes
id (long)
Unique identifier to identify the unavailability ( leave information ) of an user
comments (string)
User’s comments on the leave added
user (user)
User who is not available at work
is_technician (boolean)read only
Indicates whether the unavailable user is a technician or requester
from_date (date)
Indicates the start date & time of the User’s leave
to_date (date)
Indicates the end date & time of the User’s leave
More Attributes Expand all
$ curl api/v3/unavailability
-X GET
-H "Accept: application/vnd.manageengine.sdp.v3+json"
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
-H "Content-Type: application/x-www-form-urlencoded"
{
"unavailability": [
{
"is_technician": true,
"comments": null,
"from_date": {
"display_value": "Jun 26, 2020",
"value": "1593196200000"
},
"to_date": {
"display_value": "Jun 27, 2020",
"value": "1593282599999"
},
"leave_type": {
"name": "Comp Off",
"id": "2337000000007933"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Jun 19, 2020 11:38 AM",
"value": "1592548735068"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Jun 19, 2020 11:38 AM",
"value": "1592548735105"
},
"updated_by": null,
"for_approval": {
"backup_approver": null,
"approval_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"id": "2337000000360025",
"for_technician": {
"backup_technician": null,
"tech_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
},
"id": "2337000000360023",
"user": {
"email_id": "sample_user_3@test.com",
"is_technician": true,
"name": "user_3",
"id": "2337000000233049",
"department": {
"site": null,
"name": "Finance",
"id": "2337000000006629"
},
"first_name": "user_3"
}
},
{
"is_technician": true,
"comments": null,
"from_date": {
"display_value": "Jul 6, 2021",
"value": "1625596200000"
},
"to_date": {
"display_value": "Jul 7, 2021",
"value": "1625682599999"
},
"leave_type": {
"name": "Casual Leave",
"id": "2337000000007929"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Jul 7, 2021 05:05 PM",
"value": "1625659544315"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Jul 7, 2021 05:13 PM",
"value": "1625660032256"
},
"updated_by": null,
"for_approval": {
"backup_approver": null,
"approval_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"id": "2337000000715055",
"for_technician": {
"backup_technician": null,
"tech_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
}
}
]
}