POST api/Admin/ChangeEmployeeStatus

Request Information

URI Parameters

None.

Body Parameters

D_Employee
NameDescriptionTypeAdditional information
AccStatus

AccountStatus

Required

EmployeeID

integer

Required

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

StatusChangeReason

string

Required

FirstName

string

Required

String length: inclusive between 2 and 45

LastName

string

Required

String length: inclusive between 2 and 60

OtherNames

string

None.

Email

string

Required

Gender

Gender

Required

AddressID

integer

Required

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

Status

AccountStatus

Required

PhoneNumber

string

Required

BirthDay

date

Required

Data type: DateTime

StartDate

date

Required

Data type: DateTime

Request Formats

application/json, text/json

Sample:
{
  "accStatus": "SUBMITTED",
  "employeeID": 1,
  "statusChangeReason": "sample string 2",
  "firstName": "sample string 3",
  "lastName": "sample string 4",
  "otherNames": "sample string 5",
  "email": "sample string 6",
  "gender": "MALE",
  "addressID": 7,
  "status": "SUBMITTED",
  "phoneNumber": "sample string 8",
  "birthDay": "2019-05-21T14:26:48.3114788-07:00",
  "startDate": "2019-05-21T14:26:48.3114788-07:00"
}

application/xml, text/xml

Sample:
<D_Employee xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <AddressID>7</AddressID>
  <BirthDay>2019-05-21T14:26:48.3114788-07:00</BirthDay>
  <Email>sample string 6</Email>
  <FirstName>sample string 3</FirstName>
  <Gender>MALE</Gender>
  <LastName>sample string 4</LastName>
  <OtherNames>sample string 5</OtherNames>
  <PhoneNumber>sample string 8</PhoneNumber>
  <StartDate>2019-05-21T14:26:48.3114788-07:00</StartDate>
  <Status>SUBMITTED</Status>
  <EmployeeID>1</EmployeeID>
  <StatusChangeReason>sample string 2</StatusChangeReason>
  <AccStatus>SUBMITTED</AccStatus>
</D_Employee>

multipart/form-data

Sample:
<D_Employee xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><AddressID>7</AddressID><BirthDay>2019-05-21T14:26:48.3114788-07:00</BirthDay><Email>sample string 6</Email><FirstName>sample string 3</FirstName><Gender>MALE</Gender><LastName>sample string 4</LastName><OtherNames>sample string 5</OtherNames><PhoneNumber>sample string 8</PhoneNumber><StartDate>2019-05-21T14:26:48.3114788-07:00</StartDate><Status>SUBMITTED</Status><EmployeeID>1</EmployeeID><StatusChangeReason>sample string 2</StatusChangeReason><AccStatus>SUBMITTED</AccStatus></D_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 'D_Employee'.

Response Information

Resource Description

DBStatus
NameDescriptionTypeAdditional information
Type

DBOperation

None.

Message

Collection of DBMessageType

None.

InnerException

Collection of string

None.

Response Formats

application/json, text/json

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

application/xml, text/xml

Sample:
<DBStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <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.datacontract.org/2004/07/DBEnumStructure">
    <d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType>
    <d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType>
  </Message>
  <Type>ERROR</Type>
</DBStatus>

multipart/form-data

Sample:
<DBStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><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.datacontract.org/2004/07/DBEnumStructure"><d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType><d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType></Message><Type>ERROR</Type></DBStatus>