POST api/Categories/AddCategoryItem

Adds a category item. Only Administrator can do that.

Request Information

URI Parameters

None.

Body Parameters

AddCategoryItemPost
NameDescriptionTypeAdditional information
ParentId

(Required) The id of parent. If you set it to null the category item will be placed under the root.

integer

None.

IsFolder

(Required) If true the item is folder.

boolean

None.

Name

(Required) Name. Max length 256. At least one name for one language must be set.

string

None.

Color

(Required) Color in hex format.

string

None.

CategoryId

(Required) Category id.

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "ParentId": null,
  "IsFolder": false,
  "Name": "Category item",
  "Color": "#ffffff",
  "CategoryId": 1
}

application/xml, text/xml

Sample:
<AddCategoryItemPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Posts">
  <CategoryId>1</CategoryId>
  <Color>#ffffff</Color>
  <IsFolder>false</IsFolder>
  <Name>Category item</Name>
  <ParentId i:nil="true" />
</AddCategoryItemPost>

Response Information

Resource Description

Returns id

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>