Items
An item is the product that is offered for sale. Nature of the product could be physical or digital. Based on the type of your business, you can offer one or more goods/services. Your product can be either fixed priced or a subscription service. Each of this may fall under a separate pricing category or have add ons associated to them.
Attribute
inventory, sales, purchases
or sales_and_purchases
. If item is associated with a group, then type should be inventory
. goods
or service
intra
or inter
{
"group_id": 4815000000044220,
"group_name": "Bags",
"item_id": 4815000000044208,
"name": "Bags-small",
"unit": "qty",
"item_type": "inventory",
"product_type": "goods",
"is_taxable": true,
"tax_id": 4815000000044043,
"documents": [
"string"
],
"description": "description",
"tax_name": "Sales",
"tax_percentage": 12,
"tax_type": "Service Tax",
"purchase_account_id": 4815000000035003,
"purchase_account_name": "Cost of Goods Sold",
"account_name": "Sales",
"inventory_account_id": 4815000000035001,
"attribute_id1": 4815000000044112,
"attribute_name1": "Small",
"status": "active",
"source": "string",
"rate": 6,
"pricebook_rate": 6,
"purchase_rate": 6,
"reorder_level": 5,
"initial_stock": 50,
"initial_stock_rate": 500,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"stock_on_hand": 50,
"available_stock": 2,
"actual_available_stock": 2,
"sku": "SK123",
"upc": 111111111111,
"ean": 111111111112,
"isbn": 111111111113,
"part_number": 111111111114,
"attribute_option_id1": 4815000000044214,
"attribute_option_name1": "Small",
"image_id": 2077500000000002000,
"image_name": "bag_s.jpg",
"purchase_description": "Purchase description",
"image_type": "jpg",
"item_tax_preferences": [
{
"tax_id": 4815000000044043,
"tax_specification": "intra"
}
],
"hsn_or_sac": 85423100,
"sat_item_key_code": "string",
"unitkey_code": "string",
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
}
Create an item
Creates a new item in Zoho Inventory.
OAuth Scope : ZohoInventory.items.CREATE
Arguments
inventory, sales, purchases
or sales_and_purchases
. If item is associated with a group, then type should be inventory
. goods
or service
intra
or inter
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/items?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/items?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/inventory/v1/items?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/inventory/v1/items?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/items?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/inventory/v1/items?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"group_id": 4815000000044220,
"group_name": "Bags",
"unit": "qty",
"documents": [
"string"
],
"item_type": "inventory",
"product_type": "goods",
"is_taxable": true,
"tax_id": 4815000000044043,
"description": "description",
"purchase_account_id": 4815000000035003,
"inventory_account_id": 4815000000035001,
"attribute_name1": "Small",
"name": "Bags-small",
"rate": 6,
"purchase_rate": 6,
"reorder_level": 5,
"initial_stock": 50,
"initial_stock_rate": 500,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"sku": "SK123",
"upc": 111111111111,
"ean": 111111111112,
"isbn": 111111111113,
"part_number": 111111111114,
"attribute_option_name1": "Small",
"purchase_description": "Purchase description",
"item_tax_preferences": [
{
"tax_id": 4815000000044043,
"tax_specification": "intra"
}
],
"hsn_or_sac": 85423100,
"sat_item_key_code": "string",
"unitkey_code": "string",
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
}
{
"code": 0,
"message": "The item has been added.",
"item": {
"group_id": 4815000000044220,
"group_name": "Bags",
"item_id": 4815000000044208,
"name": "Bags-small",
"unit": "qty",
"item_type": "inventory",
"product_type": "goods",
"is_taxable": true,
"tax_id": 4815000000044043,
"documents": [
"string"
],
"description": "description",
"tax_name": "Sales",
"tax_percentage": 12,
"tax_type": "Service Tax",
"purchase_account_id": 4815000000035003,
"purchase_account_name": "Cost of Goods Sold",
"account_name": "Sales",
"inventory_account_id": 4815000000035001,
"attribute_id1": 4815000000044112,
"attribute_name1": "Small",
"status": "active",
"source": "string",
"rate": 6,
"pricebook_rate": 6,
"purchase_rate": 6,
"reorder_level": 5,
"initial_stock": 50,
"initial_stock_rate": 500,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"stock_on_hand": 50,
"available_stock": 2,
"actual_available_stock": 2,
"sku": "SK123",
"upc": 111111111111,
"ean": 111111111112,
"isbn": 111111111113,
"part_number": 111111111114,
"attribute_option_id1": 4815000000044214,
"attribute_option_name1": "Small",
"image_id": 2077500000000002000,
"image_name": "bag_s.jpg",
"purchase_description": "Purchase description",
"image_type": "jpg",
"item_tax_preferences": [
{
"tax_id": 4815000000044043,
"tax_specification": "intra"
}
],
"hsn_or_sac": 85423100,
"sat_item_key_code": "string",
"unitkey_code": "string",
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
}
}
List all the items
Lists all the items present in Zoho Inventory.
OAuth Scope : ZohoInventory.items.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/items?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/items?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/items?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/items?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/items?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/inventory/v1/items?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"items": [
{
"group_id": 4815000000044220,
"group_name": "Bags",
"item_id": 4815000000044208,
"name": "Bags-small",
"status": "active",
"source": "string",
"is_linked_with_zohocrm": false,
"item_type": "inventory",
"description": "description",
"rate": 6,
"is_taxable": true,
"tax_id": 4815000000044043,
"tax_name": "Sales",
"tax_percentage": 12,
"purchase_description": "Purchase description",
"purchase_rate": 6,
"is_combo_product": false,
"product_type": "goods",
"attribute_id1": 4815000000044112,
"attribute_name1": "Small",
"reorder_level": 5,
"stock_on_hand": 50,
"available_stock": 2,
"actual_available_stock": 2,
"sku": "SK123",
"upc": 111111111111,
"ean": 111111111112,
"isbn": 111111111113,
"part_number": 111111111114,
"attribute_option_id1": 4815000000044214,
"attribute_option_name1": "Small",
"image_name": "bag_s.jpg",
"image_type": "jpg",
"created_time": "2013-01-24",
"last_modified_time": "2013-01-24",
"hsn_or_sac": 85423100,
"sat_item_key_code": "string",
"unitkey_code": "string",
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
},
{...},
{...}
]
}
Bulk fetch item details
Fetch item details for the mentioned item IDs
OAuth Scope : ZohoInventory.items.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/itemdetails?item_ids=4815000000044208,4815000000044274,4815000000044340&organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/itemdetails?item_ids=4815000000044208%2C4815000000044274%2C4815000000044340&organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/itemdetails?item_ids=4815000000044208%2C4815000000044274%2C4815000000044340&organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/itemdetails?item_ids=4815000000044208%2C4815000000044274%2C4815000000044340&organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/itemdetails?item_ids=4815000000044208%2C4815000000044274%2C4815000000044340&organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/inventory/v1/itemdetails?item_ids=4815000000044208%2C4815000000044274%2C4815000000044340&organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"items": [
{
"item_id": 4815000000044208,
"name": "Bags-small",
"unit": "qty",
"item_type": "inventory",
"product_type": "goods",
"is_taxable": true,
"tax_id": 4815000000044043,
"description": "description",
"tax_name": "Sales",
"tax_percentage": 12,
"tax_type": "Service Tax",
"purchase_account_id": 4815000000035003,
"purchase_account_name": "Cost of Goods Sold",
"account_name": "Sales",
"inventory_account_id": 4815000000035001,
"attribute_id1": 4815000000044112,
"attribute_name1": "Small",
"status": "active",
"rate": 6,
"pricebook_rate": 6,
"purchase_rate": 6,
"reorder_level": 5,
"initial_stock": 50,
"initial_stock_rate": 500,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"stock_on_hand": 50,
"available_stock": 2,
"actual_available_stock": 2,
"sku": "SK123",
"upc": 111111111111,
"ean": 111111111112,
"isbn": 111111111113,
"part_number": 111111111114,
"attribute_option_id1": 4815000000044214,
"attribute_option_name1": "Small",
"image_id": 2077500000000002000,
"image_name": "bag_s.jpg",
"purchase_description": "Purchase description",
"image_type": "jpg",
"item_tax_preferences": [
{
"tax_id": 4815000000044043,
"tax_specification": "intra"
}
],
"hsn_or_sac": 85423100,
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
},
{...},
{...}
]
}
Update an item
Update the details of an item.
OAuth Scope : ZohoInventory.items.UPDATE
Arguments
inventory, sales, purchases
or sales_and_purchases
. If item is associated with a group, then type should be inventory
. goods
or service
intra
or inter
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/inventory/v1/items/4815000000044208?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/items/4815000000044208?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url 'https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"group_id": 4815000000044220,
"group_name": "Bags",
"unit": "qty",
"item_type": "inventory",
"product_type": "goods",
"is_taxable": true,
"tax_id": 4815000000044043,
"description": "description",
"tax_name": "Sales",
"tax_percentage": 12,
"tax_type": "Service Tax",
"purchase_account_id": 4815000000035003,
"purchase_account_name": "Cost of Goods Sold",
"account_name": "Sales",
"inventory_account_id": 4815000000035001,
"attribute_id1": 4815000000044112,
"attribute_name1": "Small",
"status": "active",
"source": "string",
"name": "Bags-small",
"rate": 6,
"pricebook_rate": 6,
"purchase_rate": 6,
"reorder_level": 5,
"initial_stock": 50,
"initial_stock_rate": 500,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"stock_on_hand": 50,
"sku": "SK123",
"upc": 111111111111,
"ean": 111111111112,
"isbn": 111111111113,
"part_number": 111111111114,
"attribute_option_id1": 4815000000044214,
"attribute_option_name1": "Small",
"image_id": 2077500000000002000,
"image_name": "bag_s.jpg",
"purchase_description": "Purchase description",
"image_type": "jpg",
"item_tax_preferences": [
{
"tax_id": 4815000000044043,
"tax_specification": "intra"
}
],
"hsn_or_sac": 85423100,
"sat_item_key_code": "string",
"unitkey_code": "string",
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
}
{
"code": 0,
"message": "Item details have been updated",
"item": {
"group_id": 4815000000044220,
"group_name": "Bags",
"item_id": 4815000000044208,
"name": "Bags-small",
"unit": "qty",
"item_type": "inventory",
"product_type": "goods",
"is_taxable": true,
"tax_id": 4815000000044043,
"documents": [
"string"
],
"description": "description",
"tax_name": "Sales",
"tax_percentage": 12,
"tax_type": "Service Tax",
"purchase_account_id": 4815000000035003,
"purchase_account_name": "Cost of Goods Sold",
"account_name": "Sales",
"inventory_account_id": 4815000000035001,
"attribute_id1": 4815000000044112,
"attribute_name1": "Small",
"status": "active",
"source": "string",
"rate": 6,
"pricebook_rate": 6,
"purchase_rate": 6,
"reorder_level": 5,
"initial_stock": 50,
"initial_stock_rate": 500,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"stock_on_hand": 50,
"available_stock": 2,
"actual_available_stock": 2,
"sku": "SK123",
"upc": 111111111111,
"ean": 111111111112,
"isbn": 111111111113,
"part_number": 111111111114,
"attribute_option_id1": 4815000000044214,
"attribute_option_name1": "Small",
"image_id": 2077500000000002000,
"image_name": "bag_s.jpg",
"purchase_description": "Purchase description",
"image_type": "jpg",
"item_tax_preferences": [
{
"tax_id": 4815000000044043,
"tax_specification": "intra"
}
],
"hsn_or_sac": 85423100,
"sat_item_key_code": "string",
"unitkey_code": "string",
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
}
}
Retrieve an item
Fetches the details for an existing item.
OAuth Scope : ZohoInventory.items.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/items/4815000000044208?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/items/4815000000044208?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"item": {
"group_id": 4815000000044220,
"group_name": "Bags",
"item_id": 4815000000044208,
"name": "Bags-small",
"unit": "qty",
"item_type": "inventory",
"product_type": "goods",
"is_taxable": true,
"tax_id": 4815000000044043,
"description": "description",
"tax_name": "Sales",
"tax_percentage": 12,
"tax_type": "Service Tax",
"purchase_account_id": 4815000000035003,
"purchase_account_name": "Cost of Goods Sold",
"account_name": "Sales",
"inventory_account_id": 4815000000035001,
"attribute_id1": 4815000000044112,
"attribute_name1": "Small",
"status": "active",
"source": "string",
"rate": 6,
"pricebook_rate": 6,
"purchase_rate": 6,
"reorder_level": 5,
"initial_stock": 50,
"initial_stock_rate": 500,
"vendor_id": 4815000000044080,
"vendor_name": "Molly",
"stock_on_hand": 50,
"available_stock": 2,
"actual_available_stock": 2,
"sku": "SK123",
"upc": 111111111111,
"ean": 111111111112,
"isbn": 111111111113,
"part_number": 111111111114,
"attribute_option_id1": 4815000000044214,
"attribute_option_name1": "Small",
"image_id": 2077500000000002000,
"image_name": "bag_s.jpg",
"purchase_description": "Purchase description",
"image_type": "jpg",
"item_tax_preferences": [
{
"tax_id": 4815000000044043,
"tax_specification": "intra"
}
],
"hsn_or_sac": 85423100,
"sat_item_key_code": "string",
"unitkey_code": "string",
"custom_fields": [
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
}
}
Delete an item
Deletes an existing item from Zoho Inventory.
OAuth Scope : ZohoInventory.items.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/inventory/v1/items/4815000000044208?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/items/4815000000044208?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url 'https://www.zohoapis.com/inventory/v1/items/4815000000044208?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The item has been deleted."
}
Update custom field in existing items
Update the value of the custom field in existing items.
OAuth Scope : ZohoInventory.items.UPDATE
Arguments
Query Parameters
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/item/45667789900/customfields?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/item/45667789900/customfields?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/inventory/v1/item/45667789900/customfields?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/inventory/v1/item/45667789900/customfields?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/item/45667789900/customfields?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url 'https://www.zohoapis.com/inventory/v1/item/45667789900/customfields?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
[
{
"customfield_id": "46000000012845",
"value": "Normal"
}
]
{
"code": 0,
"message": "Custom Fields Updated Successfully"
}
Delete an item image
Deletes the image associated for an item in Zoho Inventory.
OAuth Scope : ZohoInventory.items.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/items/4815000000044208/image?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/items/4815000000044208/image?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/items/4815000000044208/image?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/inventory/v1/items/4815000000044208/image?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/items/4815000000044208/image?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url 'https://www.zohoapis.com/inventory/v1/items/4815000000044208/image?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The item image has been deleted."
}
Mark as active
Changes the status of an item to active.
OAuth Scope : ZohoInventory.items.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/items/4815000000044208/active?organization_id=10234695"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/items/4815000000044208/active?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/items/4815000000044208/active?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/items/4815000000044208/active?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/items/4815000000044208/active?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/inventory/v1/items/4815000000044208/active?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The item has been marked as Active."
}
Mark as inactive
Mark an item as inactive.
OAuth Scope : ZohoInventory.items.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/items/4815000000044208/inactive?organization_id=10234695"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/items/4815000000044208/inactive?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/items/4815000000044208/inactive?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/items/4815000000044208/inactive?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/inventory/v1/items/4815000000044208/inactive?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/inventory/v1/items/4815000000044208/inactive?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The item has been marked as Inactive."
}