CreateUser
Description
This method is used to create a Bedrift user when all the given mandatory fields are accurate. Upon user creation this method returns the UserId of the newly created user.
Request
Parameter | Type | Mandatory/Optional | Maximum character length/limit | Description |
---|---|---|---|---|
input | Mandatory | Not relevant | Model that contains details of the user being created | |
applicationName | string | Mandatory | Should be less than or equal to 10 characters | The name of the integration partner |
Request - sample input
<CreateUser>
<MethodParameters>
<UserAuthentication>
<UserName>username</UserName>
<Password>password</Password>
<AnyAttr attr0="XmlAttributeArray" isNull="false">
<XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
</AnyAttr>
</UserAuthentication>
<input>
<UserName>charlizeT</UserName>
<Password>password</Password>
<FirstName>Charlize</FirstName>
<LastName>Theron</LastName>
<Email>charlize@boligmappa.no</Email>
<IsActive>True</IsActive>
<TelephoneNumber isNull="false" />
<UserRole>1</UserRole>
<Profession>1</Profession>
<Specializations>1</Specializations>
<IsAuthorizedtoUseFinnit>True</IsAuthorizedtoUseFinnit>
</input>
<applicationName>test</applicationName>
</MethodParameters>
</CreateUser>
Response
Type | Description |
---|---|
The UserId of the created user |
Response - sample output
<CreateUser>
<MethodParameters>
<CreateUserOutput>
<UserId>2144</UserId>
</CreateUserOutput>
</MethodParameters>
</CreateUser>
Exceptions
Error Code | Description |
---|---|
113 | One or more mandatory fields have not been provided |
123 | An exception occurred while processing your request |
165 | The given profession is not registered to your company |
167 | You are not authorized to use this method |
260 | The ContactPersonEmail is not valid |
362 | UserName does not follow the proper format |
363 | TelephoneNumber is invalid |
364 | User already exists |
365 | UserRole is invalid |
367 | FirstName/LastName length has exceeded the maximum character limit allowed (50) |
368 | UserName length has exceeded the maximum character limit allowed (50) |
369 | Email length has exceeded the maximum character limit allowed (50) |
370 | Specializations length has exceeded the maximum character limit allowed (250) |