edit-icon download-icon

AddCategory

Last Updated: Apr 19, 2018

Description

The AddCategory API adds a category.

Request parameters

Parameter Type Required or not Description
Action String Yes API of the action, system required parameter. Set this parameter to AddCategory.
CateName String Yes Category name, which consists of up to 64 UTF-8 encoded bytes.
ParentId Long No Parent category ID. If this parameter is not set, a level 1 category is generated by default. The root node category ID is -1.

Return parameters

Name Type Description
Category Category Category information

Example

Request example

  1. http://mts.cn-hangzhou.aliyuncs.com?CateName=this%20is%20a%20new%20cate&&<public parameter>

Return example

XML

  1. <AddCategoryResponse>
  2. <Category>
  3. <CateId>7503631</CateId>
  4. <ParentId>-1</ParentId>
  5. <CateName>this is a new cate</CateName>
  6. <Level>0</Level>
  7. </Category>
  8. <RequestId>E0DB3781-F1D7-4D77-A1EA-137F87F16E2C</RequestId>
  9. </AddCategoryResponse>

JSON

  1. {
  2. "Category": {
  3. "CateId": 7503631,
  4. "ParentId": -1,
  5. "CateName": "this is a new cate",
  6. "Level": 0
  7. },
  8. "RequestId": "EFFE963A-5862-4CA2-A939-671DEFB35BF9"
  9. }
Thank you! We've received your feedback.