POST api/organization/employees

Add a new employee.

Request Information

URI Parameters

None.

Body Parameters

AddEmployeeDTO
NameDescriptionTypeAdditional information
Name

Name

string

None.

Phone

Phone number

string

None.

AccountId

ID of an existing account

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Phone": "sample string 2",
  "AccountId": 1
}

text/html

Sample:
{"Name":"sample string 1","Phone":"sample string 2","AccountId":1}

application/xml, text/xml

Sample:
<AddEmployeeDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Common.WebAPI.DTOs">
  <AccountId>1</AccountId>
  <Name>sample string 1</Name>
  <Phone>sample string 2</Phone>
</AddEmployeeDTO>

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

Response Information

Resource Description

integer

Response Formats

application/json, text/json, text/html

Sample:
1

application/xml, text/xml

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