GET productcategories/{categoryID}
This call allows you to return a single category and its immediate children.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
categoryID | The category ID you wish to return | integer | Required |
Body Parameters
None.
Response Information
Resource Description
This call allows you to return a single category and its immediate children.
CategoryModelName | Description | Type | Additional 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>