POST api/Department/Department

Request Information

URI Parameters

None.

Body Parameters

CustomDepartment
NameDescriptionTypeAdditional information
DepartmentId

integer

None.

ParentId

integer

None.

DivisionId

integer

None.

DepartmentCode

string

None.

NameTh

string

None.

NameEn

string

None.

CreatedDate

string

None.

CreatedBy

string

None.

ModifiedDate

string

None.

ModifiedBy

string

None.

IsActive

boolean

None.

LeaderId

integer

None.

ReportToId

string

None.

ReportToName

string

None.

ReportToOfManagerId

string

None.

ReportToOfManagerName

string

None.

CompanyCode

string

None.

userPrincipalName

string

None.

connectionString

string

None.

SecretId

string

None.

Request Formats

application/json, text/json

Sample:
{
  "DepartmentId": 1,
  "ParentId": 1,
  "DivisionId": 1,
  "DepartmentCode": "sample string 1",
  "NameTh": "sample string 2",
  "NameEn": "sample string 3",
  "CreatedDate": "sample string 4",
  "CreatedBy": "sample string 5",
  "ModifiedDate": "sample string 6",
  "ModifiedBy": "sample string 7",
  "IsActive": true,
  "LeaderId": 1,
  "ReportToId": "sample string 8",
  "ReportToName": "sample string 9",
  "ReportToOfManagerId": "sample string 10",
  "ReportToOfManagerName": "sample string 11",
  "CompanyCode": "sample string 12",
  "userPrincipalName": "sample string 13",
  "connectionString": "sample string 14",
  "SecretId": null
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Type 'System.Security.Cryptography.CryptoStream' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Type 'System.Security.Cryptography.CryptoStream' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

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 'CustomDepartment'.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.