POST productcategories

This call allows you to create a category.

Request Information

URI Parameters

None.

Body Parameters

CategoryCreateModel
NameDescriptionTypeAdditional information
ParentCategoryID The parent category id for the category. Leave null if root category. integer None.
CategoryName The Categories Name string Required

Request Formats

application/json, text/json

Sample:
{
  "ParentCategoryID": 1,
  "CategoryName": "sample string 1"
}

application/xml, text/xml

Sample:
<CategoryCreateModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ParentCategoryID>1</ParentCategoryID>
  <CategoryName>sample string 1</CategoryName>
</CategoryCreateModel>

Response Information

Resource Description

This call allows you to create a category.

CategoryModel
NameDescriptionTypeAdditional information
ParentCategory The parent category CategoryBaseModel None.
ChildCategories This only goes down a depth of one category Collection of CategoryBaseModel None.
CategoryFullPath The full path of the category. For instance Category 1 > Category 2 > Category 3 string None.
CategoryID The ID of the category. integer None.
CategoryName The Categories Name string None.

Response Formats

application/json, text/json

Sample:
{
  "ParentCategory": {
    "CategoryID": 8,
    "CategoryName": "Electronics"
  },
  "ChildCategories": [
    {
      "CategoryID": 10,
      "CategoryName": "Accessories"
    },
    {
      "CategoryID": 11,
      "CategoryName": "Digital Cameras"
    }
  ],
  "CategoryID": 9,
  "CategoryName": "Cameras"
}

application/xml, text/xml

Sample:
<CategoryModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CategoryID>9</CategoryID>
  <CategoryName>Cameras</CategoryName>
  <ParentCategory>
    <CategoryID>8</CategoryID>
    <CategoryName>Electronics</CategoryName>
  </ParentCategory>
  <ChildCategories>
    <CategoryBaseModel>
      <CategoryID>10</CategoryID>
      <CategoryName>Accessories</CategoryName>
    </CategoryBaseModel>
    <CategoryBaseModel>
      <CategoryID>11</CategoryID>
      <CategoryName>Digital Cameras</CategoryName>
    </CategoryBaseModel>
  </ChildCategories>
</CategoryModel>