POST api/user/createuser
Create a user and personnel resource
Request Information
URI Parameters
None.
Body Parameters
Create a user with mininmal data decorated with default values
Unit4UserName | Description | Type | Additional information |
---|---|---|---|
C |
AddressCountryCode (User) |
string |
None. |
Language |
Language (User) |
string |
None. |
CompanyId | string |
Required |
|
SamAccountName | string |
Required |
|
Manager |
Manager UserId/Shortname (Resource) |
string |
Required |
DisplayName |
Description (User) |
string |
None. |
ValidFrom | date |
None. |
|
ValidTo | date |
None. |
|
Status | Unit4UserStatus |
None. |
|
UserPrincipalName | string |
None. |
|
Mobile | string |
None. |
|
PostalCode |
ZipCode (User) |
string |
None. |
City | string |
None. |
|
GivenName | string |
None. |
|
SurName | string |
None. |
|
MiddleName | string |
None. |
|
Gender | GenderEnum |
None. |
|
EmployeeType | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "C": "sample string 1", "Language": "sample string 2", "CompanyId": "sample string 3", "SamAccountName": "sample string 4", "Manager": "sample string 5", "DisplayName": "sample string 6", "ValidFrom": "2024-11-25T17:38:35.1979441+00:00", "ValidTo": "2024-11-25T17:38:35.1979441+00:00", "Status": 0, "UserPrincipalName": "sample string 7", "Mobile": "sample string 8", "PostalCode": "sample string 9", "City": "sample string 10", "GivenName": "sample string 11", "SurName": "sample string 12", "MiddleName": "sample string 13", "Gender": 0, "EmployeeType": "sample string 14" }
application/xml, text/xml
Sample:
<Unit4User xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Unit4Helper.Models"> <C>sample string 1</C> <City>sample string 10</City> <CompanyId>sample string 3</CompanyId> <DisplayName>sample string 6</DisplayName> <EmployeeType>sample string 14</EmployeeType> <Gender>Male</Gender> <GivenName>sample string 11</GivenName> <Language>sample string 2</Language> <Manager>sample string 5</Manager> <MiddleName>sample string 13</MiddleName> <Mobile>sample string 8</Mobile> <PostalCode>sample string 9</PostalCode> <SamAccountName>sample string 4</SamAccountName> <Status>Active</Status> <SurName>sample string 12</SurName> <UserPrincipalName>sample string 7</UserPrincipalName> <ValidFrom>2024-11-25T17:38:35.1979441+00:00</ValidFrom> <ValidTo>2024-11-25T17:38:35.1979441+00:00</ValidTo> </Unit4User>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
HttpResponseMessageName | Description | Type | Additional information |
---|---|---|---|
Version | Version |
None. |
|
Content | HttpContent |
None. |
|
StatusCode | HttpStatusCode |
None. |
|
ReasonPhrase | string |
None. |
|
Headers | Collection of Object |
None. |
|
RequestMessage | HttpRequestMessage |
None. |
|
IsSuccessStatusCode | boolean |
None. |