POST api/user/changeemployment

Change company for resource. A new resource is created for the target company and sets its valid from date. Previous resource will get its valid from set to valid fron -1 day.

Request Information

URI Parameters

None.

Body Parameters

Unit4ChangeEmployment
NameDescriptionTypeAdditional information
SamAccountName

string

Required

TargetCompanyId

string

Required

ValidFrom

date

None.

ValidTo

date

None.

Request Formats

application/json, text/json

Sample:
{
  "SamAccountName": "sample string 1",
  "TargetCompanyId": "sample string 2",
  "ValidFrom": "2024-09-19T23:53:38.8420579+00:00",
  "ValidTo": "2024-09-19T23:53:38.8420579+00:00"
}

application/xml, text/xml

Sample:
<Unit4ChangeEmployment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Unit4Helper.Models">
  <SamAccountName>sample string 1</SamAccountName>
  <TargetCompanyId>sample string 2</TargetCompanyId>
  <ValidFrom>2024-09-19T23:53:38.8420579+00:00</ValidFrom>
  <ValidTo>2024-09-19T23:53:38.8420579+00:00</ValidTo>
</Unit4ChangeEmployment>

application/x-www-form-urlencoded

Sample:

Sample not available.

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.