Update Category Hierarchy

HTTP Request

PUThttps://commerce.zoho.com/store/api/v1/categories/ 

 

OAuthScope

ZohoCommerce.items.UPDATE

 

Body Parameters

ParameterDescription
parent_category_id*long: Category ID of new parent.

 

Request Example

Copiedcurl -X PUT
'https://commerce.zoho.com/store/api/v1/categories/1706707000000068758'
-H 'Authorization: Zoho-oauthtoken ***'
-H 'Content-Type: application/json'
-H 'X-com-zoho-store-organizationid: 682219181'
-d '{"parent_category_id":"1706707000000068764"}'

Success Response

Copied{
"code": 0,
"message": "Category updated successfully",
"category": {
"category_id": "1706707000000068758",
"name": "Chic",
"description": "",
"url": "chic",
"parent_category_id": "1706707000000068764",
"parent_category_name": "",
"visibility": true,
"show_in_menu": true,
"seo_title": "",
"seo_keyword": "",
"seo_description": "",
"created_time": "2019-01-17T02:09:45-0700",
"last_modified_time": "2019-12-16T22:53:42-0700",
"ancestors": [],
"children": [],
"documents": []
}
}

Failure Response

Copied{
"code": 250001,
"message":"A parent category cannot be moved under its own subcategory."
}
Use this API to change the parent of the specific category.