Categories

Categories AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Categories are hierarchical groupings used to organize items in Zoho Inventory. Create and manage categories, nested subcategories, visibility, and related metadata.

Download Categories OpenAPI Document

Attribute

category_id
string
Unique identifier of the category.
name
string
Name of the category. Max-length [100].
description
string
Description of the category. Max-length [12000].
url
string
URL slug for the category. Max-length [100].
parent_category_id
string
Unique identifier of the parent category.
visibility
boolean
Whether the category is visible.
show_in_menu
boolean
Whether the category is shown in navigation menus.
seo_title
string
SEO title for the category. Max-length [100].
seo_keyword
string
SEO keywords for the category. Max-length [700].
seo_description
string
SEO description for the category. Max-length [700].
sibling_order
long
Display order of the category among its siblings.
ondc_category_type
string
ONDC category type associated with the category.
category_tax_preferences
array
Tax preferences configured for the category.
Show Sub-Attributes arrow
tax_specification
string
Tax specification. Allowed values include inter and intra.
tax_id
string
Unique identifier of the tax.
custom_fields
array
Custom fields associated with the category.
Show Sub-Attributes arrow
index
integer
Index of the custom field.
customfield_id
string
Unique identifier of the custom field.
label
string
Label of the custom field. Max-length [200].
api_name
string
API name of the custom field. Max-length [100].
value
string
Value of the custom field.
value_formatted
string
Formatted value of the custom field.

Example

{ "category_id": "4815000000044001", "name": "Electronics", "description": "Consumer electronics and accessories", "url": "electronics", "parent_category_id": "4815000000044000", "parent_category_name": "Root", "visibility": true, "show_in_menu": true, "seo_title": "Electronics", "seo_keyword": "electronics,gadgets", "seo_description": "Browse electronics and gadgets", "sibling_order": 1, "depth": 0, "has_active_items": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530", "ondc_category_type": "Electronics", "is_deprecated_ondc_category": false, "category_tax_preferences": [ { "tax_specification": "inter", "tax_id": "4815000000044043" } ], "custom_fields": [ { "index": 1, "customfield_id": "4815000000044500", "label": "Department", "api_name": "cf_department", "value": "Retail", "value_formatted": "Retail" } ], "ancestors": [ { "category_id": "4815000000044002", "name": "Accessories", "url": "accessories", "parent_category_id": "4815000000044001", "visibility": true, "show_in_menu": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530" } ], "children": [ { "category_id": "4815000000044002", "name": "Accessories", "url": "accessories", "parent_category_id": "4815000000044001", "visibility": true, "show_in_menu": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530" } ], "products": [ {} ] }

Create a category AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Creates a new category.
OAuth Scope : ZohoInventory.items.CREATE

Arguments

name
string
(Required)
Name of the category. Max-length [100].
description
string
Description of the category. Max-length [12000].
sibling_order
long
Display order of the category among its siblings.
parent_category_id
string
Unique identifier of the parent category.
parent_category_name
string
Name of the parent category.
visibility
boolean
Whether the category is visible.
show_in_menu
boolean
Whether the category is shown in navigation menus.
url
string
(Required)
URL slug for the category. Max-length [100].
category_tax_preferences
array
Tax preferences for the category. Array size 0-2.
Show Sub-Attributes arrow
tax_specification
string
Tax specification. Allowed values include inter and intra.
tax_id
string
Unique identifier of the tax.
custom_fields
array
Custom fields for the category.
Show Sub-Attributes arrow
index
integer
Index of the custom field.
customfield_id
string
Unique identifier of the custom field.
label
string
Label of the custom field. Max-length [200].
api_name
string
API name of the custom field. Max-length [100].
value
string
Value of the custom field.
value_formatted
string
Formatted value of the custom field.

Query Parameters

organization_id
string
(Required)
ID of the organization

Request Example

Click to copy
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/categories?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/categories?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/categories?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/categories?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/categories?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/categories?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "name": "Electronics", "description": "Consumer electronics and accessories", "sibling_order": 1, "parent_category_id": "4815000000044000", "parent_category_name": "Root", "visibility": true, "show_in_menu": true, "url": "electronics", "category_tax_preferences": [ { "tax_specification": "inter", "tax_id": "4815000000044043" } ], "custom_fields": [ { "index": 1, "customfield_id": "4815000000044500", "label": "Department", "api_name": "cf_department", "value": "Retail", "value_formatted": "Retail" } ] }

Response Example

{ "code": 0, "message": "Category added successfully", "category": { "category_id": "4815000000044001", "name": "Electronics", "description": "Consumer electronics and accessories", "url": "electronics", "parent_category_id": "4815000000044000", "parent_category_name": "Root", "visibility": true, "show_in_menu": true, "seo_title": "Electronics", "seo_keyword": "electronics,gadgets", "seo_description": "Browse electronics and gadgets", "sibling_order": 1, "depth": 0, "has_active_items": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530", "ondc_category_type": "Electronics", "is_deprecated_ondc_category": false, "category_tax_preferences": [ { "tax_specification": "inter", "tax_id": "4815000000044043" } ], "custom_fields": [ { "index": 1, "customfield_id": "4815000000044500", "label": "Department", "api_name": "cf_department", "value": "Retail", "value_formatted": "Retail" } ], "ancestors": [ { "category_id": "4815000000044002", "name": "Accessories", "url": "accessories", "parent_category_id": "4815000000044001", "visibility": true, "show_in_menu": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530" } ], "children": [ { "category_id": "4815000000044002", "name": "Accessories", "url": "accessories", "parent_category_id": "4815000000044001", "visibility": true, "show_in_menu": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530" } ], "products": [ {...} ] } }

List all categories AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Lists all categories in the organization. Supports filtering by parent, name, status filters, and pagination.
OAuth Scope : ZohoInventory.items.READ

Query Parameters

organization_id
string
(Required)
ID of the organization
parent_category_id
string
Filter categories that are direct children of the specified parent category ID.
include_parent_category
boolean
If true, the parent category is included in the results when filtering by parent_category_id. Default value is true.
include_root_category
boolean
If true, the root category is included in the results.
search_text
string
Search categories by name or description containing the search text.
filter_by
string
Filter categories. Allowed values: All, ShowInMenu, ActiveItems.
category_ids
string
Comma-separated list of category IDs to filter. Max-occurrences [50].
name
string
Filter categories by exact name match.
name_startswith
string
Filter categories whose name starts with the specified text.
name_contains
string
Filter categories whose name contains the specified text.
name_in
string
Filter categories whose name is in the specified comma-separated list of names.
name_not_in
string
Filter categories whose name is not in the specified comma-separated list of names.
created_time
string
Filter by creation time. Variants: created_time_less_than, created_time_less_equals, created_time_greater_than, and created_time_greater_equals. Format: yyyy-MM-ddTHH:mm:ssZ.
created_time_less_than
string
Filter categories created before the specified timestamp.
created_time_less_equals
string
Filter categories created on or before the specified timestamp.
created_time_greater_than
string
Filter categories created after the specified timestamp.
created_time_greater_equals
string
Filter categories created on or after the specified timestamp.
last_modified_time
string
Filter categories modified on or after the specified timestamp. Format: yyyy-mm-ddThh:mm:ss+/-hhmm.
page
integer
Page number to be fetched. Default value is 1.
per_page
integer
Number of records to be fetched per page. Default value is 5000.
sort_column
string
Column to sort by. Default value is sibling_order.
sort_order
string
Sort order. Allowed values: A (ascending), D (descending). Default value is A.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/categories?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/categories?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/categories?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/categories?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/categories?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/categories?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "categories": [ { "category_id": "4815000000044001", "name": "Electronics", "description": "Consumer electronics and accessories", "url": "electronics", "parent_category_id": "4815000000044000", "sibling_order": 1, "visibility": true, "show_in_menu": true, "depth": 0, "has_active_items": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530" }, {...}, {...} ], "page_context": { "page": 1, "per_page": 5000, "has_more_page": false, "report_name": "categories", "applied_filter": "All", "sort_column": "sibling_order", "sort_order": "A" } }

Update a category AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Updates an existing category.
OAuth Scope : ZohoInventory.items.UPDATE

Path Parameters

category_id
string
(Required)
Unique identifier of the category.

Query Parameters

organization_id
string
(Required)
ID of the organization
update_all_items
boolean
If true, updates POS preferences of all items associated with this category.

Request Example

Click to copy
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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "name": "Electronics", "description": "Consumer electronics and accessories", "sibling_order": 1, "parent_category_id": "4815000000044000", "parent_category_name": "Root", "visibility": true, "show_in_menu": true, "url": "electronics", "category_tax_preferences": [ { "tax_specification": "inter", "tax_id": "4815000000044043" } ], "custom_fields": [ { "index": 1, "customfield_id": "4815000000044500", "label": "Department", "api_name": "cf_department", "value": "Retail", "value_formatted": "Retail" } ] }

Response Example

{ "code": 0, "message": "Category updated successfully", "category": { "category_id": "4815000000044001", "name": "Electronics", "description": "Consumer electronics and accessories", "url": "electronics", "parent_category_id": "4815000000044000", "parent_category_name": "Root", "visibility": true, "show_in_menu": true, "seo_title": "Electronics", "seo_keyword": "electronics,gadgets", "seo_description": "Browse electronics and gadgets", "sibling_order": 1, "depth": 0, "has_active_items": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530", "ondc_category_type": "Electronics", "is_deprecated_ondc_category": false, "category_tax_preferences": [ { "tax_specification": "inter", "tax_id": "4815000000044043" } ], "custom_fields": [ { "index": 1, "customfield_id": "4815000000044500", "label": "Department", "api_name": "cf_department", "value": "Retail", "value_formatted": "Retail" } ], "ancestors": [ { "category_id": "4815000000044002", "name": "Accessories", "url": "accessories", "parent_category_id": "4815000000044001", "visibility": true, "show_in_menu": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530" } ], "children": [ { "category_id": "4815000000044002", "name": "Accessories", "url": "accessories", "parent_category_id": "4815000000044001", "visibility": true, "show_in_menu": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530" } ], "products": [ {...} ] } }

Retrieve a category AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Fetches the details of an existing category, including ancestors, children, and related metadata.
OAuth Scope : ZohoInventory.items.READ

Path Parameters

category_id
string
(Required)
Unique identifier of the category.

Query Parameters

organization_id
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "success", "category": { "category_id": "4815000000044001", "name": "Electronics", "description": "Consumer electronics and accessories", "url": "electronics", "parent_category_id": "4815000000044000", "parent_category_name": "Root", "visibility": true, "show_in_menu": true, "seo_title": "Electronics", "seo_keyword": "electronics,gadgets", "seo_description": "Browse electronics and gadgets", "sibling_order": 1, "depth": 0, "has_active_items": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530", "ondc_category_type": "Electronics", "is_deprecated_ondc_category": false, "category_tax_preferences": [ { "tax_specification": "inter", "tax_id": "4815000000044043" } ], "custom_fields": [ { "index": 1, "customfield_id": "4815000000044500", "label": "Department", "api_name": "cf_department", "value": "Retail", "value_formatted": "Retail" } ], "ancestors": [ { "category_id": "4815000000044002", "name": "Accessories", "url": "accessories", "parent_category_id": "4815000000044001", "visibility": true, "show_in_menu": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530" } ], "children": [ { "category_id": "4815000000044002", "name": "Accessories", "url": "accessories", "parent_category_id": "4815000000044001", "visibility": true, "show_in_menu": true, "created_time": "2024-01-15T10:30:00+0530", "last_modified_time": "2024-06-20T14:45:00+0530" } ], "products": [ {...} ] } }

Delete a category AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Deletes an existing category from Zoho Inventory.
OAuth Scope : ZohoInventory.items.DELETE

Path Parameters

category_id
string
(Required)
Unique identifier of the category.

Query Parameters

organization_id
string
(Required)
ID of the organization
delete_sub_categories
boolean
If true, also deletes subcategories under this category.

Request Example

Click to copy
headers_data = Map(); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/inventory/v1/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?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/categories/4815000000044001?organization_id=10234695' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "code": 0, "message": "Category deleted successfully." }