AddCompaniesToProject

Description

This method is used to add a list of companies to a project. Only the company that owns the project can execute this method. If a given company successfully adds a project, an email is sent to the project contact person notifying them that their company has been added to the project. The status for each company is returned in the output.

Request

ParameterTypeMandatory/OptionalMaximum character length/limitDescription
projectIdlongMandatoryNot relevantThe Id of the project to which the companies are added. Note that only a user of the company that created the project can execute this method.
companiesList<CompanyInput>MandatoryNot relevant

List of companies to be added.

A company can be provided either by giving the CompanyId or an OrganizationNumber. (Use GetCompanies method to get a list of all the available CompanyIds). If an OrganizationNumber that does not exist in the Boligmappa system is entered, third party services like Brønnøysundregisteret is used to retrieve the required details for the company and added to the system.

It is mandatory to provide either the CompanyId or the OrganizationNumber. Preference is given to the CompanyId, if both the CompanyId and the OrganizationNumber is provided.

applicationName

string

Mandatory

Should be less than or equal to 10 characters

The name of the integration partner


Request - sample input

<AddCompaniesToProject>
  <MethodParameters>
    <UserAuthentication>
      <UserName>username</UserName>
      <Password>password</Password>
      <AnyAttr attr0="XmlAttributeArray" isNull="false">
        <XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
      </AnyAttr>
    </UserAuthentication>
    <projectId>1211</projectId>
    <companies attr0="CompanyInputArray" isNull="false">
      <CompanyInputArray0>
        <CompanyId>197</CompanyId>
        <OrganizationNumber>914350840</OrganizationNumber>
        <ContactPersonEmail>helena@test.no</ContactPersonEmail>
        <ContactPersonName isNull="false" />
      </CompanyInputArray0>
    </companies>
    <applicationName>test</applicationName>
  </MethodParameters>
</AddCompaniesToProject>


Response

TypeDescription
List<AddCompanyToProjectStatus>A status list of companies that were either successfully added or not added.


Response - sample output

<AddCompaniesToProject>
  <MethodParameters>
    <AddCompanyToProjectStatusArray>
      <AddCompanyToProjectStatusArray0>
        <Status>0</Status>
        <ErrorCode>225</ErrorCode>
      </AddCompanyToProjectStatusArray0>
    </AddCompanyToProjectStatusArray>
  </MethodParameters>
</AddCompaniesToProject>

Exceptions

Error CodeDescription
123An exception occurred while processing your request

138

applicationName length has exceeded the maximum character limit allowed (10) 

146The applicationName is not set
167You are not authorized to use this web method
223

The given project is not owned by the company or does not exist, therefore this action cannot be performed

224Invalid CompanyId
225Company already exists in the project 
227The project does not exist or the company is not connected to the given project
258Unable to find a company registered to the given OrganizationNumber
259Either a CompanyId or an OrganizationNumber must be provided to identify a company
260The ContactPersonEmail is not valid
261Neither CompanyId or OrganizationNumber is provided
264The ContactPersonEmail is required
265Company is added to the project, but the notification mail submission has failed
295Third party company search services are unavailable
336ContactPersonName length has exceeded the maximum character limit allowed (50)