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.
Parameter | Type | Mandatory/Optional | Maximum character length/limit | Description |
---|---|---|---|---|
projectId | long | Mandatory | Not relevant | The 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. |
companies | List<CompanyInput> | Mandatory | Not 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 |
<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>
Type | Description |
---|---|
List<AddCompanyToProjectStatus> | A status list of companies that were either successfully added or not added. |
<AddCompaniesToProject>
<MethodParameters>
<AddCompanyToProjectStatusArray>
<AddCompanyToProjectStatusArray0>
<Status>0</Status>
<ErrorCode>225</ErrorCode>
</AddCompanyToProjectStatusArray0>
</AddCompanyToProjectStatusArray>
</MethodParameters>
</AddCompaniesToProject>
Error Code | Description |
---|---|
123 | An exception occurred while processing your request |
138 | applicationName length has exceeded the maximum character limit allowed (10) |
146 | The applicationName is not set |
167 | You 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 |
224 | Invalid CompanyId |
225 | Company already exists in the project |
227 | The project does not exist or the company is not connected to the given project |
258 | Unable to find a company registered to the given OrganizationNumber |
259 | Either a CompanyId or an OrganizationNumber must be provided to identify a company |
260 | The ContactPersonEmail is not valid |
261 | Neither CompanyId or OrganizationNumber is provided |
264 | The ContactPersonEmail is required |
265 | Company is added to the project, but the notification mail submission has failed |
295 | Third party company search services are unavailable |
336 | ContactPersonName length has exceeded the maximum character limit allowed (50) |