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

ParameterTypeMandatory/OptionalMaximum character length/limitDescription

input

UserInput

Mandatory

Not relevant

Model that contains details of the user being created

applicationNamestringMandatoryShould be less than or equal to 10 charactersThe 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

TypeDescription

CreateUserOutput

The UserId of the created user


Response - sample output

<CreateUser>
  <MethodParameters>
    <CreateUserOutput>
      <UserId>2144</UserId>
    </CreateUserOutput>
  </MethodParameters>
</CreateUser>

Exceptions

Error CodeDescription

113

One or more mandatory fields have not been provided 

123

An exception occurred while processing your request

165The given profession is not registered to your company

167

You are not authorized to use this method

260The ContactPersonEmail is not valid

362

UserName does not follow the proper format

363TelephoneNumber is invalid
364User already exists
365UserRole is invalid
367FirstName/LastName length has exceeded the maximum character limit allowed (50)  
368UserName length has exceeded the maximum character limit allowed (50) 
369Email length has exceeded the maximum character limit allowed (50) 
370Specializations length has exceeded the maximum character limit allowed (250)