<service domain|custom domain>/app/<portal>/api/v3/customers
Customer
The Customers module lets you manage clients of the managed service provider (MSP). The MSP can maintain detailed records of all customers and their information, including associated solutions, advisory details, announcements, and more in the Customers module.
Attributes
id (long)
Denotes the ID of the customer.
name (string)
Name of the Customer.
description (string)
Description of the customer.
domain (string)
Domain of the Customer, which will be accessible by the Client Portal Users.
default_site (string)
The site which was mentioned as a default Site.
login_logo (long)
This logo will be displayed in the login page for the respective customer user. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
More Attributes Expand all
header_logo (long)
This logo will be displayed as the instance logo for the respective customer users. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
Add Customer
This operation allows the SDAdmin to create a new Customer.
Mandatory Fields :- name
Url
Attributes
id (long)
Denotes the ID of the customer.
name (string)
Name of the Customer.
description (string)
Description of the customer.
default_site (string)
The site which was mentioned as a default Site.
login_logo (long)
This logo will be displayed in the login page for the respective customer user. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
header_logo (long)
This logo will be displayed as the instance logo for the respective customer users. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
More Attributes Expand all
$ curl <service domain|custom domain>/app/<portal>/api/v3/customers\
-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='{
"customer": {
"name": "Customer A",
"description": "Description of the Customer A",
"support_email": "customeraa@customerdomain.com",
"support_name": "Customer Support Name",
"state": "State Bs",
"location": "Location AAs",
"street": "Customer Street",
"landmark": "Near Landmark Xs",
"postal_code": "123454"
}
} '
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/customers";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"customer": {
"name": "Customer A",
"description": "Description of the Customer A",
"support_email": "customeraa@customerdomain.com",
"support_name": "Customer Support Name",
"state": "State Bs",
"location": "Location AAs",
"street": "Customer Street",
"landmark": "Near Landmark Xs",
"postal_code": "123454"
}
} ;
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/customers"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"customer": {
"name": "Customer A",
"description": "Description of the Customer A",
"support_email": "customeraa@customerdomain.com",
"support_name": "Customer Support Name",
"state": "State Bs",
"location": "Location AAs",
"street": "Customer Street",
"landmark": "Near Landmark Xs",
"postal_code": "123454"
}
}
'@
$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/customers"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"customer": {
"name": "Customer A",
"description": "Description of the Customer A",
"support_email": "customeraa@customerdomain.com",
"support_name": "Customer Support Name",
"state": "State Bs",
"location": "Location AAs",
"street": "Customer Street",
"landmark": "Near Landmark Xs",
"postal_code": "123454"
}
} '''
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"
},
"customer": {
"email_id": "aa@customerdomain.com",
"template": {
"inactive": false,
"name": "General Customer Template",
"id": "100000000000040055"
},
"country": "United States",
"attachments": [],
"city": "City YY",
"description": "Description of the Customer A",
"header_logo": null,
"login_logo": null,
"support_name": "Customer Support Name",
"street": "Customer Streets",
"door_no": "33",
"id": "100000000000052115",
"state": "State Bs",
"is_msp": false,
"landmark": "Near Landmark Xs",
"fax": "+22 22222",
"created_time": {
"display_value": "Jan 17, 2025 04:24 PM",
"value": "1737111264440"
},
"website": "https://www.customeraweb.com",
"mobile": "11111111111",
"support_email": "customeraa@customerdomain.com",
"customer_group": [],
"domain": "cust-100000000000052115.clients.sdpcloud.com",
"name": "Customer A",
"udf_fields": {
"txt_single_line_field": null
},
"default_site": {
"name": "Customer A Base Site",
"id": "100000000000052120"
},
"location": "Location AAs",
"phone_number": "222222222",
"postal_code": "123454",
"deleted_time": null
}
}
Edit Customer
This operation allows the user to edit a specific customer.
Url
<service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}
Attributes
id (long)
Denotes the ID of the customer.
name (string)
Name of the Customer.
description (string)
Description of the customer.
default_site (string)
The site which was mentioned as a default Site.
login_logo (long)
This logo will be displayed in the login page for the respective customer user. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
header_logo (long)
This logo will be displayed as the instance logo for the respective customer users. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
More Attributes Expand all
$ curl <service domain|custom domain>/app/<portal>/api/v3/customers/{customer_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='{
"customer": {
"name": "Customer A edited",
"description": "Description of the Customer A edited",
"support_email": "customeraa@customerdomain.com",
"support_name": "Customer Support Name edited",
"state": "State Bs",
"location": "Location AAs",
"street": "Customer Streets",
"landmark": "Near Landmark Xs",
"postal_code": "123454"
}
} '
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"customer": {
"name": "Customer A edited",
"description": "Description of the Customer A edited",
"support_email": "customeraa@customerdomain.com",
"support_name": "Customer Support Name edited",
"state": "State Bs",
"location": "Location AAs",
"street": "Customer Streets",
"landmark": "Near Landmark Xs",
"postal_code": "123454"
}
} ;
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/customers/{customer_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"customer": {
"name": "Customer A edited",
"description": "Description of the Customer A edited",
"support_email": "customeraa@customerdomain.com",
"support_name": "Customer Support Name edited",
"state": "State Bs",
"location": "Location AAs",
"street": "Customer Streets",
"landmark": "Near Landmark Xs",
"postal_code": "123454"
}
}
'@
$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/customers/{customer_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"customer": {
"name": "Customer A edited",
"description": "Description of the Customer A edited",
"support_email": "customeraa@customerdomain.com",
"support_name": "Customer Support Name edited",
"state": "State Bs",
"location": "Location AAs",
"street": "Customer Streets",
"landmark": "Near Landmark Xs",
"postal_code": "123454"
}
} '''
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,
"status": "success"
},
"customer": {
"email_id": "aa@customerdomain.com",
"template": {
"inactive": false,
"name": "General Customer Template",
"id": "100000000000040055"
},
"country": "United States",
"attachments": [],
"city": "City YY",
"description": "Description of the Customer A edited",
"header_logo": null,
"login_logo": null,
"support_name": "Customer Support Name edited",
"street": "Customer Streets",
"door_no": "33",
"id": "100000000000052115",
"state": "State Bs",
"is_msp": false,
"landmark": "Near Landmark Xs",
"fax": "+22 22222",
"created_time": {
"display_value": "Jan 17, 2025 04:24 PM",
"value": "1737111264440"
},
"website": "https://www.customeraweb.com",
"mobile": "11111111111",
"support_email": "customeraa@customerdomain.com",
"customer_group": [],
"domain": "cust-100000000000052115.clients.sdpcloud.com",
"name": "Customer A edited",
"udf_fields": {
"txt_single_line_field": null
},
"default_site": {
"name": "Customer A Base Site",
"id": "100000000000052120"
},
"location": "Location AAs",
"phone_number": "222222222",
"postal_code": "123454",
"deleted_time": null
}
}
Get Customer
This operation allows the user to get the information of a specific Customer.
Url
<service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}
Attributes
id (long)
Denotes the ID of the customer.
name (string)
Name of the Customer.
description (string)
Description of the customer.
domain (string)
Domain of the Customer, which will be accessible by the Client Portal Users.
default_site (string)
The site which was mentioned as a default Site.
login_logo (long)
This logo will be displayed in the login page for the respective customer user. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
More Attributes Expand all
header_logo (long)
This logo will be displayed as the instance logo for the respective customer users. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/customers/{customer_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/customers/{customer_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/customers/{customer_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/customers/{customer_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"
},
"customer": {
"email_id": "aa@customerdomain.com",
"template": {
"inactive": false,
"name": "General Customer Template",
"id": "100000000000040055"
},
"country": "United States",
"attachments": [],
"city": "City YY",
"description": "Description of the Customer A edited",
"header_logo": null,
"login_logo": null,
"support_name": "Customer Support Name edited",
"street": "Customer Streets",
"door_no": "33",
"id": "100000000000052115",
"state": "State Bs",
"is_msp": false,
"landmark": "Near Landmark Xs",
"fax": "+22 22222",
"created_time": {
"display_value": "Jan 17, 2025 04:24 PM",
"value": "1737111264440"
},
"website": "https://www.customeraweb.com",
"mobile": "11111111111",
"support_email": "customeraa@customerdomain.com",
"customer_group": [],
"domain": "cust-100000000000052115.clients.sdpcloud.com",
"name": "Customer A edited",
"udf_fields": {
"txt_single_line_field": null
},
"default_site": {
"name": "Customer A Base Site",
"id": "100000000000052120"
},
"location": "Location AAs",
"phone_number": "222222222",
"postal_code": "123454",
"deleted_time": null
}
}
Get List Customer
This operation allows the user to get the list of the customer information based on the criteria.
Url
<service domain|custom domain>/app/<portal>/api/v3/customers
Attributes
id (long)
Denotes the ID of the customer.
name (string)
Name of the Customer.
description (string)
Description of the customer.
domain (string)
Domain of the Customer, which will be accessible by the Client Portal Users.
default_site (string)
The site which was mentioned as a default Site.
login_logo (long)
This logo will be displayed in the login page for the respective customer user. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
More Attributes Expand all
header_logo (long)
This logo will be displayed as the instance logo for the respective customer users. The image should be added for the customer via “/customers/_images”. The file_id from the response should be added as the input.
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/customers\
-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=''
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/customers";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = ;
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/customers"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @''@
$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/customers"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = ''''''
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"
},
"customer": [{
"email_id": "aa@customerdomain.com",
"template": {
"inactive": false,
"name": "General Customer Template",
"id": "100000000000040055"
},
"country": "United States",
"attachments": [],
"city": "City YY",
"description": "Description of the Customer A edited",
"header_logo": null,
"login_logo": null,
"support_name": "Customer Support Name edited",
"street": "Customer Streets",
"door_no": "33",
"id": "100000000000052115",
"state": "State Bs",
"is_msp": false,
"landmark": "Near Landmark Xs",
"fax": "+22 22222",
"created_time": {
"display_value": "Jan 17, 2025 04:24 PM",
"value": "1737111264440"
},
"website": "https://www.customeraweb.com",
"mobile": "11111111111",
"support_email": "customeraa@customerdomain.com",
"customer_group": [],
"domain": "cust-100000000000052115.clients.sdpcloud.com",
"name": "Customer A edited",
"udf_fields": {
"txt_single_line_field": null
},
"default_site": {
"name": "Customer A Base Site",
"id": "100000000000052120"
},
"location": "Location AAs",
"phone_number": "222222222",
"postal_code": "123454",
"deleted_time": null
}]
}
Add Service Url
This operation allows the user to configure a domain for the customer.
Url
<service domain|custom domain>/app/<portal>/app/itdesk/api/v3/customers/{customer_id}/client_portal_directory/_add_service_url
$ curl <service domain|custom domain>/app/<portal>/app/itdesk/api/v3/customers/{customer_id}/client_portal_directory/_add_service_url\
-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='{
"service_url": "sssssss.clients.sdpcloud.com"
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/app/itdesk/api/v3/customers/{customer_id}/client_portal_directory/_add_service_url";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"service_url": "sssssss.clients.sdpcloud.com"
};
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>/app/itdesk/api/v3/customers/{customer_id}/client_portal_directory/_add_service_url"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"service_url": "sssssss.clients.sdpcloud.com"
}
'@
$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>/app/itdesk/api/v3/customers/{customer_id}/client_portal_directory/_add_service_url"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"service_url": "sssssss.clients.sdpcloud.com"
}'''
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,
"status": "success"
}
}
Delete Service Url
This operation allows the user to delete the configured domain for the customer.
Url
<service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}/client_portal_directory/_delete_service_url
$ curl <service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}/client_portal_directory/_delete_service_url\
-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/customers/{customer_id}/client_portal_directory/_delete_service_url";
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/customers/{customer_id}/client_portal_directory/_delete_service_url"
$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/customers/{customer_id}/client_portal_directory/_delete_service_url"
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"
}
}
Inactive The Customer
This operation allows the user to mark a customer as inactive.
Url
<service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}/_move_to_trash
$ curl <service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}/_move_to_trash\
-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=''
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}/_move_to_trash";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = ;
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/customers/{customer_id}/_move_to_trash"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
'@
$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/customers/{customer_id}/_move_to_trash"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = ''''''
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,
"status": "success"
},
"customer": {
"email_id": null,
"template": {
"inactive": false,
"name": "General Customer Template",
"id": "100000000000040055"
},
"country": null,
"attachments": [],
"city": null,
"description": null,
"header_logo": null,
"login_logo": null,
"client_portal": "1031147813",
"support_name": null,
"street": null,
"door_no": null,
"id": "100000000000044788",
"state": null,
"is_msp": false,
"landmark": null,
"fax": null,
"created_time": {
"display_value": "Jan 13, 2025 12:45 PM",
"value": "1736752513016"
},
"website": null,
"mobile": null,
"support_email": null,
"customer_group": [],
"domain": "cust-100000000000044788.clients.sdpcloud.com",
"name": "Customer A",
"udf_fields": {
"txt_single_line_field": null
},
"default_site": {
"name": "Base Site",
"id": "100000000000044793"
},
"location": null,
"phone_number": null,
"postal_code": null,
"deleted_time": {
"display_value": "Jan 20, 2025 02:28 PM",
"value": "1737363501395"
}
}
}
Restore The Inactive Customer
This operation allows the user to restore the customer/ reactive the inactive customer.
Url
<service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}/_restore_from_trash
$ curl <service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}/_restore_from_trash\
-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=''
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/customers/{customer_id}/_restore_from_trash";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = ;
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/customers/{customer_id}/_restore_from_trash"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
'@
$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/customers/{customer_id}/_restore_from_trash"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = ''''''
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,
"status": "success"
},
"customer": {
"email_id": null,
"template": {
"inactive": false,
"name": "General Customer Template",
"id": "100000000000040055"
},
"country": null,
"attachments": [],
"city": null,
"description": null,
"header_logo": null,
"login_logo": null,
"client_portal": "1031147809",
"support_name": null,
"street": null,
"door_no": null,
"id": "100000000000042918",
"state": null,
"is_msp": false,
"landmark": null,
"fax": null,
"created_time": {
"display_value": "Jan 13, 2025 12:45 PM",
"value": "1736752509411"
},
"website": null,
"mobile": null,
"support_email": null,
"customer_group": [],
"domain": "cust-100000000000042918.clients.sdpcloud.com",
"name": "Customer A",
"udf_fields": {
"txt_single_line_field": null
},
"default_site": {
"name": "Base Site",
"id": "100000000000042923"
},
"location": null,
"phone_number": null,
"postal_code": null,
"deleted_time": null
}
}