Skip to content

Request Approval

The raised ticket can be sent for approval from the authorized users or higher authority

Attributes

id (long)
Id of the approval

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

comments (string)
Comments given on the approval by the approver [Max-length : 250]

comments (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

approver (user)
Approver of the approval

approver (user)
Approver of the approval

Example

{
  "approver": {
    "email_id": "andrews@zmail.com",
    "name": "test-approver",
    "id": "234567890123456"
  }
}

original_approver (user)
The back approver, to whom the approval has been sent when the approver is on leave/not available

original_approver (user)

Example

{
  "original_approver": {
    "name": "test-original_approver",
    "id": "234567890123456"
  }
}

xpath (JSONObject)
Organisational Roles configured for the approval
show attribute

xpath (JSONObject)
Organisational Role configured for the approval.

Example

{
  "xpath": {
    "path": "org_roles.org_ref1",
    "display_name": "General Manager"
  }
}

path (string)
The path of the organisational role to be configured for the approval

path (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

display_name (string)read only
The display name of the organisational role. For Example: CEO, CFO.

display_name (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

approval_level (approval_level)read only
Approval level to which the approval is associated

approval_level (approval_level)
Approval level to which the approval is associated

Example

{
  "approval_level": {
    "id": "234567890123456"
  }
}

More Attributes Expand all

status (approval_status)read only

Status of the Approval

status (approval_status)
Status of the Approval

Example

{
  "status": {
    "name": "Approved",
    "id": "234567890123456"
  }
}

sent_on (datetime)read only

Date at which the approval is being sent

sent_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

action_taken_on (datetime)read only

Date at which the action on the approval is taken

action_taken_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

Add Request Approval

This operation helps you Add request approval.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals

Attributes

id (long)
Id of the approval

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

comments (string)
Comments given on the approval by the approver [Max-length : 250]

comments (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

approver (user)
Approver of the approval

approver (user)
Approver of the approval

Example

{
  "approver": {
    "email_id": "andrews@zmail.com",
    "name": "test-approver",
    "id": "234567890123456"
  }
}

original_approver (user)
The back approver, to whom the approval has been sent when the approver is on leave/not available

original_approver (user)

Example

{
  "original_approver": {
    "name": "test-original_approver",
    "id": "234567890123456"
  }
}

xpath (JSONObject)
Organisational Roles configured for the approval
show attribute

xpath (JSONObject)
Organisational Role configured for the approval.

Example

{
  "xpath": {
    "path": "org_roles.org_ref1",
    "display_name": "General Manager"
  }
}

path (string)
The path of the organisational role to be configured for the approval

path (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

display_name (string)read only
The display name of the organisational role. For Example: CEO, CFO.

display_name (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

approval_level (approval_level)read only
Approval level to which the approval is associated

approval_level (approval_level)
Approval level to which the approval is associated

Example

{
  "approval_level": {
    "id": "234567890123456"
  }
}

More Attributes Expand all

status (approval_status)read only

Status of the Approval

status (approval_status)
Status of the Approval

Example

{
  "status": {
    "name": "Approved",
    "id": "234567890123456"
  }
}

sent_on (datetime)read only

Date at which the approval is being sent

sent_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

action_taken_on (datetime)read only

Date at which the action on the approval is taken

action_taken_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals\
      -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='{
  "approval": {
    "approver": {
        "email_id": "lincoln@zmail.com"
    },
    "xpath": {
      "path": "orgroles.udf_ref6",
      "display_name": "General Manager"
    },
    "comments": "Comments for why this entity is approved/rejected",
    "original_approver": {
      "email_id": "lincoln@zmail.com"
    }
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "approval": {
    "approver": {
        "email_id": "lincoln@zmail.com"
    },
    "xpath": {
      "path": "orgroles.udf_ref6",
      "display_name": "General Manager"
    },
    "comments": "Comments for why this entity is approved/rejected",
    "original_approver": {
      "email_id": "lincoln@zmail.com"
    }
  }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: POST
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
  "approval": {
    "approver": {
        "email_id": "lincoln@zmail.com"
    },
    "xpath": {
      "path": "orgroles.udf_ref6",
      "display_name": "General Manager"
    },
    "comments": "Comments for why this entity is approved/rejected",
    "original_approver": {
      "email_id": "lincoln@zmail.com"
    }
  }
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method post -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "approval": {
    "approver": {
        "email_id": "lincoln@zmail.com"
    },
    "xpath": {
      "path": "orgroles.udf_ref6",
      "display_name": "General Manager"
    },
    "comments": "Comments for why this entity is approved/rejected",
    "original_approver": {
      "email_id": "lincoln@zmail.com"
    }
  }
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="POST")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  },
  "approval": {
    "approver": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1687616429503192",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "xpath": {
      "path": null
    },
    "comments": "Comments for why this entity is approved/rejected",
    "original_approver": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "2246399527435800",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "approval_level": {
      "created_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "request": {
        "id": "573363737610000"
      },
      "level": 2,
      "associated_entity": "request",
      "id": "2464447227215416",
      "created_by": {
        "id": "163363737611449"
      },
      "status": {
        "id": "573363737611449"
      }
    },
    "id": "1777935282983700",
    "sent_on": null,
    "action_taken_on": null,
    "status": {
      "name": "To be Sent",
      "id": "1586004938752875"
    }
  }
}

Get Request Approval

This operation helps you Get request approval.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}

Attributes

id (long)
Id of the approval

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

comments (string)
Comments given on the approval by the approver [Max-length : 250]

comments (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

approver (user)
Approver of the approval

approver (user)
Approver of the approval

Example

{
  "approver": {
    "email_id": "andrews@zmail.com",
    "name": "test-approver",
    "id": "234567890123456"
  }
}

original_approver (user)
The back approver, to whom the approval has been sent when the approver is on leave/not available

original_approver (user)

Example

{
  "original_approver": {
    "name": "test-original_approver",
    "id": "234567890123456"
  }
}

xpath (JSONObject)
Organisational Roles configured for the approval
show attribute

xpath (JSONObject)
Organisational Role configured for the approval.

Example

{
  "xpath": {
    "path": "org_roles.org_ref1",
    "display_name": "General Manager"
  }
}

path (string)
The path of the organisational role to be configured for the approval

path (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

display_name (string)read only
The display name of the organisational role. For Example: CEO, CFO.

display_name (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

approval_level (approval_level)read only
Approval level to which the approval is associated

approval_level (approval_level)
Approval level to which the approval is associated

Example

{
  "approval_level": {
    "id": "234567890123456"
  }
}

More Attributes Expand all

status (approval_status)read only

Status of the Approval

status (approval_status)
Status of the Approval

Example

{
  "status": {
    "name": "Approved",
    "id": "234567890123456"
  }
}

sent_on (datetime)read only

Date at which the approval is being sent

sent_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

action_taken_on (datetime)read only

Date at which the action on the approval is taken

action_taken_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_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"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};          
response = invokeurl
[
    url: url
    type: GET
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}  
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  },
  "approval": {
    "approver": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1807795817979319",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "xpath": {
      "path": null
    },
    "comments": "Comments for why this entity is approved/rejected",
    "original_approver": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "2014205042604256",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "approval_level": {
      "created_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "request": {
        "id": "573363737610000"
      },
      "level": 3,
      "associated_entity": "request",
      "id": "1719945134484852",
      "created_by": {
        "id": "163363737611449"
      },
      "status": {
        "id": "573363737611449"
      }
    },
    "id": "1668157746997366",
    "sent_on": null,
    "action_taken_on": null,
    "status": {
      "name": "To be Sent",
      "id": "2131832274890872"
    }
  }
}

Get List Request Approval

This operation helps you Get all request approvals.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals

Attributes

id (long)
Id of the approval

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

comments (string)
Comments given on the approval by the approver [Max-length : 250]

comments (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

approver (user)
Approver of the approval

approver (user)
Approver of the approval

Example

{
  "approver": {
    "email_id": "andrews@zmail.com",
    "name": "test-approver",
    "id": "234567890123456"
  }
}

original_approver (user)
The back approver, to whom the approval has been sent when the approver is on leave/not available

original_approver (user)

Example

{
  "original_approver": {
    "name": "test-original_approver",
    "id": "234567890123456"
  }
}

xpath (JSONObject)
Organisational Roles configured for the approval
show attribute

xpath (JSONObject)
Organisational Role configured for the approval.

Example

{
  "xpath": {
    "path": "org_roles.org_ref1",
    "display_name": "General Manager"
  }
}

path (string)
The path of the organisational role to be configured for the approval

path (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

display_name (string)read only
The display name of the organisational role. For Example: CEO, CFO.

display_name (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

approval_level (approval_level)read only
Approval level to which the approval is associated

approval_level (approval_level)
Approval level to which the approval is associated

Example

{
  "approval_level": {
    "id": "234567890123456"
  }
}

More Attributes Expand all

status (approval_status)read only

Status of the Approval

status (approval_status)
Status of the Approval

Example

{
  "status": {
    "name": "Approved",
    "id": "234567890123456"
  }
}

sent_on (datetime)read only

Date at which the approval is being sent

sent_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

action_taken_on (datetime)read only

Date at which the action on the approval is taken

action_taken_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals\
      -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"\
      --data-urlencode input_data='{"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}};
params = {"input_data":input_data};           
response = invokeurl
[
    url: url
    type: GET
    parameters:params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}}'@
$data = @{ 'input_data' = $input_data}    
$response = Invoke-RestMethod -Uri $url -Method get -Body $data -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}}'''       
url += "?" + urlencode({"input_data":input_data})
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": [
    {
      "status_code": 2000,
      "status": "success"
    }
  ],
  "approvals": [
    {
      "approver": {
        "email_id": "lincoln@zmail.com",
        "is_technician": false,
        "sms_mail": "linc123@xys_sms.co",
        "phone": "test-phone",
        "name": "Lincoln",
        "mobile": "test-mobile",
        "id": "2197181355456534",
        "photo_url": "test-photo_url",
        "is_vip_user": false
      },
      "xpath": {
        "path": null
      },
      "comments": "Comments for why this entity is approved/rejected",
      "original_approver": {
        "email_id": "lincoln@zmail.com",
        "is_technician": false,
        "sms_mail": "linc123@xys_sms.co",
        "phone": "test-phone",
        "name": "Lincoln",
        "mobile": "test-mobile",
        "id": "2139303138191423",
        "photo_url": "test-photo_url",
        "is_vip_user": false
      },
      "approval_level": {
        "created_time": {
          "display_value": "Nov 10, 2016 11:44 AM",
          "value": "1478758440000"
        },
        "request": {
          "id": "573363737610000"
        },
        "level": 4,
        "associated_entity": "request",
        "id": "2466949555586303",
        "created_by": {
          "id": "163363737611449"
        },
        "status": {
          "id": "573363737611449"
        }
      },
      "id": "1681435988882635",
      "sent_on": null,
      "action_taken_on": null,
      "status": {
        "name": "To be Sent",
        "id": "1578780480099143"
      }
    }
  ],
  "list_info": {
    "has_more_rows": false,
    "row_count": 1
  }
}

Delete Request Approval

This operation helps you Delete request approval.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}

$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}\
      -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"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
response = invokeurl
[
    url: url
    type: DELETE
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method delete -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers,method="DELETE")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}

Approve Request Approval

This operation helps you Approve request approval.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve

$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve\
      -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='{
  "approval": {
    "comments": "The comments to approve the approval"
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "approval": {
    "comments": "The comments to approve the approval"
  }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
  "approval": {
    "comments": "The comments to approve the approval"
  }
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method put -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "approval": {
    "comments": "The comments to approve the approval"
  }
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="PUT")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "messages": [
      {
        "status_code": 2000,
        "type": "success",
        "message": "Your decision has been recorded. Thank you for your cooperation!"
      }
    ],
    "status": "success"
  }
}

Get Notification Content For Sending Request Approval

This operation helps you Get notification content for sending request approval.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification\
      -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"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
response = invokeurl
[
    url: url
    type: GET
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  },
  "notification": {
    "subject": "Approval required for a Request",
    "description": "Your approval is required for a Request to act upon. The details of the Request can be found at $ApprovalLink"
  }
}

Send Notification For Request Approval

This operation helps you Send notification for request approval.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification

$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification\
      -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='{
  "notification": {
    "subject": "Approval required for a Request",
    "description": "Your approval is required for a Request to act upon. The details of the Request can be found at $ApprovalLink"
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "notification": {
    "subject": "Approval required for a Request",
    "description": "Your approval is required for a Request to act upon. The details of the Request can be found at $ApprovalLink"
  }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
  "notification": {
    "subject": "Approval required for a Request",
    "description": "Your approval is required for a Request to act upon. The details of the Request can be found at $ApprovalLink"
  }
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method put -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "notification": {
    "subject": "Approval required for a Request",
    "description": "Your approval is required for a Request to act upon. The details of the Request can be found at $ApprovalLink"
  }
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="PUT")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "messages": [
      {
        "status_code": 2000,
        "type": "success",
        "message": "Approval Mail Sent"
      }
    ],
    "status": "success"
  }
}

Reject Request Approval

This operation helps you Reject request approval.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject

$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject\
      -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='{
  "approval": {
    "comments": "The comments to reject the approval"
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "approval": {
    "comments": "The comments to reject the approval"
  }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
  "approval": {
    "comments": "The comments to reject the approval"
  }
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method put -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "approval": {
    "comments": "The comments to reject the approval"
  }
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="PUT")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "messages": [
      {
        "status_code": 2000,
        "type": "success",
        "message": "Your decision has been recorded. Thank you for your cooperation!"
      }
    ],
    "status": "success"
  }
}