POST api/organization/departments

Add a new department.

Request Information

URI Parameters

None.

Body Parameters

AddDepartmentDTO
NameDescriptionTypeAdditional information
Name

Name

string

None.

DepartmentType

Type

DepartmentTypeDTO

None.

DepartmentStatus

Status

DepartmentStatusDTO

None.

TimeZone

Department's timezone.

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "DepartmentType": 0,
  "DepartmentStatus": 0,
  "TimeZone": 2
}

text/html

Sample:
{"Name":"sample string 1","DepartmentType":0,"DepartmentStatus":0,"TimeZone":2}

application/xml, text/xml

Sample:
<AddDepartmentDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Common.WebAPI.DTOs">
  <DepartmentStatus>Active</DepartmentStatus>
  <DepartmentType>Department</DepartmentType>
  <Name>sample string 1</Name>
  <TimeZone>2</TimeZone>
</AddDepartmentDTO>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AddDepartmentDTO'.

Response Information

Resource Description

string

Response Formats

application/json, text/json, text/html

Sample:
"sample string 1"

application/xml, text/xml

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