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.

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": "New 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>New category item</Name>
  <ParentId i:nil="true" />
</AddCategoryItemPost>

Response Information

Resource Description

Returns id

IHttpActionResult

None.