POST api/Department/{employeeNo}/{startDate}

Update a Department for an Employee. The key for updates is the Start Date

Request Information

URI Parameters

NameDescriptionTypeAdditional information
employeeNo

Employee Number

string

Required

startDate

Start Date

date

Required

Body Parameters

In request Body: Employee Department Details

DepartmentDetail
NameDescriptionTypeAdditional information
StartDate

date

Required

EndDate

Must be after StartDate if present

date

None.

Division

string

None.

HomeDepartment

string

None.

Location

string

None.

Department1

string

None.

Department1Percentage

decimal number

None.

Department2

string

None.

Department2Percentage

decimal number

None.

Department3

string

None.

Department3Percentage

decimal number

None.

CostCentre1

string

None.

CostCentre1Percentage

decimal number

None.

CostCentre2

string

None.

CostCentre2Percentage

decimal number

None.

CostCentre3

string

None.

CostCentre3Percentage

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "StartDate": "2024-12-23T06:23:01.7632057+00:00",
  "EndDate": "2024-12-23T06:23:01.7632057+00:00",
  "Division": "sample string 2",
  "HomeDepartment": "sample string 3",
  "Location": "sample string 4",
  "Department1": "sample string 5",
  "Department1Percentage": 1.0,
  "Department2": "sample string 6",
  "Department2Percentage": 1.0,
  "Department3": "sample string 7",
  "Department3Percentage": 1.0,
  "CostCentre1": "sample string 8",
  "CostCentre1Percentage": 1.0,
  "CostCentre2": "sample string 9",
  "CostCentre2Percentage": 1.0,
  "CostCentre3": "sample string 10",
  "CostCentre3Percentage": 1.0
}

application/xml, text/xml

Sample:
<DepartmentDetail xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebServicesRESTful.Models">
  <CostCentre1>sample string 8</CostCentre1>
  <CostCentre1Percentage>1</CostCentre1Percentage>
  <CostCentre2>sample string 9</CostCentre2>
  <CostCentre2Percentage>1</CostCentre2Percentage>
  <CostCentre3>sample string 10</CostCentre3>
  <CostCentre3Percentage>1</CostCentre3Percentage>
  <Department1>sample string 5</Department1>
  <Department1Percentage>1</Department1Percentage>
  <Department2>sample string 6</Department2>
  <Department2Percentage>1</Department2Percentage>
  <Department3>sample string 7</Department3>
  <Department3Percentage>1</Department3Percentage>
  <Division>sample string 2</Division>
  <EndDate>2024-12-23T06:23:01.7632057+00:00</EndDate>
  <HomeDepartment>sample string 3</HomeDepartment>
  <Location>sample string 4</Location>
  <StartDate>2024-12-23T06:23:01.7632057+00:00</StartDate>
</DepartmentDetail>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Result

ResultWithMessage
NameDescriptionTypeAdditional information
result

'OK', 'Error'

string

None.

message

Returns if result is Error

string

None.

returnValue

string

None.

Response Formats

application/json, text/json

Sample:
{
    "result": "OK"
}

{
    "result": "Error",
    "message": "Unable to save: the..."
}

application/xml, text/xml

Sample:
<ResultWithMessage>
    <result>OK</result>
</ResultWithMessage>

<ResultWithMessage>  
    <result>Error</result>
    <message>Unable to save: the...</message>
</ResultWithMessage>