POST api/Admin/InsertEmployee

Request Information

URI Parameters

None.

Body Parameters

W_Admin_Employee
NameDescriptionTypeAdditional information
EmployeeTitleID

integer

Required

Matching regular expression pattern: ^[0-9]{1,11}$

EmployeeType

EmployeeType

Required

StartDate

date

Required

Data type: Date

FirstName

string

Required

Matching regular expression pattern: ^[^\%\/\\\&\@\#\$\*\?\,\'\;\:\!\-]+$

String length: inclusive between 2 and 45

LastName

string

Required

Matching regular expression pattern: ^[^\%\/\\\&\@\#\$\*\?\,\'\;\:\!\-]+$

String length: inclusive between 2 and 60

OtherNames

string

Matching regular expression pattern: ^[^\%\/\\\&\@\#\$\*\?\,\'\;\:\!\-]+$

String length: inclusive between 0 and 60

Gender

Gender

Required

PhoneNumber

string

Required

BirthDate

date

Required

Data type: Date

Address

W_Address

Required

Request Formats

application/json, text/json

Sample:
{
  "employeeTitleID": 1,
  "employeeType": "EMPLOYEE",
  "startDate": "2019-12-10T09:36:34.8777445-07:00",
  "firstName": "sample string 3",
  "lastName": "sample string 4",
  "otherNames": "sample string 5",
  "gender": "MALE",
  "phoneNumber": "sample string 6",
  "birthDate": "2019-12-10T09:36:34.8777445-07:00",
  "address": {
    "addressStreetAddress1": "sample string 1",
    "addressStreetAddress2": "sample string 2",
    "addressCity": "sample string 3",
    "addressState": "sample string 4",
    "addressZipCode": "sample string 5",
    "addressCountry": "sample string 6"
  }
}

application/xml, text/xml

Sample:
<W_Admin_Employee xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <Address>
    <AddressCity>sample string 3</AddressCity>
    <AddressCountry>sample string 6</AddressCountry>
    <AddressState>sample string 4</AddressState>
    <AddressStreetAddress1>sample string 1</AddressStreetAddress1>
    <AddressStreetAddress2>sample string 2</AddressStreetAddress2>
    <AddressZipCode>sample string 5</AddressZipCode>
  </Address>
  <BirthDate>2019-12-10T09:36:34.8777445-07:00</BirthDate>
  <FirstName>sample string 3</FirstName>
  <Gender>MALE</Gender>
  <LastName>sample string 4</LastName>
  <OtherNames>sample string 5</OtherNames>
  <PhoneNumber>sample string 6</PhoneNumber>
  <EmployeeTitleID>1</EmployeeTitleID>
  <EmployeeType>EMPLOYEE</EmployeeType>
  <StartDate>2019-12-10T09:36:34.8777445-07:00</StartDate>
</W_Admin_Employee>

multipart/form-data

Sample:
<W_Admin_Employee xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><Address><AddressCity>sample string 3</AddressCity><AddressCountry>sample string 6</AddressCountry><AddressState>sample string 4</AddressState><AddressStreetAddress1>sample string 1</AddressStreetAddress1><AddressStreetAddress2>sample string 2</AddressStreetAddress2><AddressZipCode>sample string 5</AddressZipCode></Address><BirthDate>2019-12-10T09:36:34.8777445-07:00</BirthDate><FirstName>sample string 3</FirstName><Gender>MALE</Gender><LastName>sample string 4</LastName><OtherNames>sample string 5</OtherNames><PhoneNumber>sample string 6</PhoneNumber><EmployeeTitleID>1</EmployeeTitleID><EmployeeType>EMPLOYEE</EmployeeType><StartDate>2019-12-10T09:36:34.8777445-07:00</StartDate></W_Admin_Employee>

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

Response Information

Resource Description

DBStatusWithLastKey
NameDescriptionTypeAdditional information
LastUpdatedKey

string

None.

Type

DBOperation

None.

ErrorMessage

Collection of DBMessageType

None.

Message

Collection of string

None.

InnerException

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "lastUpdatedKey": "sample string 1",
  "type": "ERROR",
  "errorMessage": [
    "SUCCESSFULLY_DATA_INSERTED",
    "SUCCESSFULLY_DATA_INSERTED"
  ],
  "message": [
    "sample string 1",
    "sample string 2"
  ],
  "innerException": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<DBStatusWithLastKey xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <ErrorMessage xmlns:d2p1="http://schemas.datacontract.org/2004/07/DBEnumStructure">
    <d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType>
    <d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType>
  </ErrorMessage>
  <InnerException xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </InnerException>
  <Message xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Message>
  <Type>ERROR</Type>
  <LastUpdatedKey>sample string 1</LastUpdatedKey>
</DBStatusWithLastKey>

multipart/form-data

Sample:
<DBStatusWithLastKey xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><ErrorMessage xmlns:d2p1="http://schemas.datacontract.org/2004/07/DBEnumStructure"><d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType><d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType></ErrorMessage><InnerException xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><d2p1:string>sample string 1</d2p1:string><d2p1:string>sample string 2</d2p1:string></InnerException><Message xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><d2p1:string>sample string 1</d2p1:string><d2p1:string>sample string 2</d2p1:string></Message><Type>ERROR</Type><LastUpdatedKey>sample string 1</LastUpdatedKey></DBStatusWithLastKey>