<service domain|custom domain>/app/<portal>/api/v3/product_types
Product Type
Product type includes the types of assets that you have in your organization. Workstations, Servers, Routers are some of the Asset types.
Attributes
id (long)
Unique identifier to identify the product type.
category (asset_category)
Category of the product type. For ex: IT, Non-IT
name (string)
Unique name to identify the product type.
type (asset_type)
Type of the product type. For ex: Asset,Component,Software,Consumable
description (string)
Description of the product type
display_name (string)
Unique display name to identify the product type.
Add Product Type
This operation helps you add product types. Mandatory fields are name, type, category.
Mandatory Fields :- category, name, type
Url
Attributes
id (long)
Unique identifier to identify the product type.
category (asset_category)
Category of the product type. For ex: IT, Non-IT
name (string)
Unique name to identify the product type.
type (asset_type)
Type of the product type. For ex: Asset,Component,Software,Consumable
description (string)
Description of the product type
display_name (string)
Unique display name to identify the product type.
$ curl <service domain|custom domain>/app/<portal>/api/v3/product_types\
-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='{
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"type": {
"name": "Asset",
"id": "2135869199647172"
},
"category": {
"name": "IT",
"id": "1753538512503012"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/product_types";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"type": {
"name": "Asset",
"id": "2135869199647172"
},
"category": {
"name": "IT",
"id": "1753538512503012"
}
}
};
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/product_types"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"type": {
"name": "Asset",
"id": "2135869199647172"
},
"category": {
"name": "IT",
"id": "1753538512503012"
}
}
}
'@
$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/product_types"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"type": {
"name": "Asset",
"id": "2135869199647172"
},
"category": {
"name": "IT",
"id": "1753538512503012"
}
}
}'''
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())
{
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"id": "2463432716012621",
"display_name": "test-display_name",
"type": {
"name": "Asset",
"id": "2135869199647172"
},
"category": {
"name": "IT",
"description": "test-description",
"id": "1753538512503012"
}
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Edit Product Type
This operation helps you edit product types.
Url
<service domain|custom domain>/app/<portal>/api/v3/product_types/{product_type_id}
Attributes
id (long)
Unique identifier to identify the product type.
category (asset_category)
Category of the product type. For ex: IT, Non-IT
name (string)
Unique name to identify the product type.
type (asset_type)
Type of the product type. For ex: Asset,Component,Software,Consumable
description (string)
Description of the product type
display_name (string)
Unique display name to identify the product type.
$ curl <service domain|custom domain>/app/<portal>/api/v3/product_types/{product_type_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='{
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"type": {
"name": "Asset",
"id": "2318797136815923"
},
"category": {
"name": "IT",
"id": "2023986279723228"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/product_types/{product_type_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"type": {
"name": "Asset",
"id": "2318797136815923"
},
"category": {
"name": "IT",
"id": "2023986279723228"
}
}
};
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/product_types/{product_type_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"type": {
"name": "Asset",
"id": "2318797136815923"
},
"category": {
"name": "IT",
"id": "2023986279723228"
}
}
}
'@
$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/product_types/{product_type_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"type": {
"name": "Asset",
"id": "2318797136815923"
},
"category": {
"name": "IT",
"id": "2023986279723228"
}
}
}'''
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())
{
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"id": "2345379074559558",
"display_name": "test-display_name",
"type": {
"name": "Asset",
"id": "2318797136815923"
},
"category": {
"name": "IT",
"description": "test-description",
"id": "2023986279723228"
}
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Get Product Type
This operation helps you get product types.
Url
<service domain|custom domain>/app/<portal>/api/v3/product_types/{product_type_id}
Attributes
id (long)
Unique identifier to identify the product type.
category (asset_category)
Category of the product type. For ex: IT, Non-IT
name (string)
Unique name to identify the product type.
type (asset_type)
Type of the product type. For ex: Asset,Component,Software,Consumable
description (string)
Description of the product type
display_name (string)
Unique display name to identify the product type.
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/product_types/{product_type_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/product_types/{product_type_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/product_types/{product_type_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/product_types/{product_type_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())
{
"product_type": {
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"id": "1654204619243101",
"display_name": "test-display_name",
"type": {
"name": "Asset",
"id": "1898443623900317"
},
"category": {
"name": "IT",
"description": "test-description",
"id": "1699836392964313"
}
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Get List Product Type
This operation helps you get list product types.
Url
<service domain|custom domain>/app/<portal>/api/v3/product_types
Attributes
id (long)
Unique identifier to identify the product type.
category (asset_category)
Category of the product type. For ex: IT, Non-IT
name (string)
Unique name to identify the product type.
type (asset_type)
Type of the product type. For ex: Asset,Component,Software,Consumable
description (string)
Description of the product type
display_name (string)
Unique display name to identify the product type.
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/product_types\
-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/product_types";
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/product_types"
$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/product_types"
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"
}
],
"product_types": [
{
"image": "test-image",
"name": "Workstation",
"description": "test-description",
"id": "2011402704295145",
"display_name": "test-display_name",
"type": {
"name": "Asset",
"id": "1717928672901287"
},
"category": {
"name": "IT",
"description": "test-description",
"id": "1968174468165684"
}
}
],
"list_info": {
"has_more_rows": false,
"row_count": 1
}
}
Delete Product Type
This operation helps you delete product types.
Url
<service domain|custom domain>/app/<portal>/api/v3/product_types/{product_type_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/product_types/{product_type_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/product_types/{product_type_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/product_types/{product_type_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/product_types/{product_type_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"
}
}