AssociateProjectDocumentsToTenant

Description

This method is used by the project owner to associate documents of a project to a relevant tenant. GetTenants service can be used to get all the tenants. 

Request

ParameterTypeMandatory/OptionalMaximum character length/limitDescription
documentIdListList<long>Mandatory Not relevantIds of the list of documents to be associated to the building
tenantIdlongMandatory Not relevanttenantId of the selected tenant to get the tenant company
applicationNamestringMandatory Should be less than or equal to 10 charactersThe name of the integration partner

Request - sample input

<AssociateProjectDocumentsToTenant>
  <MethodParameters>
    <UserAuthentication>
      <UserName>userName</UserName>
      <Password>password</Password>
      <AnyAttr attr0="XmlAttributeArray" isNull="false">
        <XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
      </AnyAttr>
    </UserAuthentication>
    <documentIdList attr0="Int64Array" isNull="false">
      <Int64Array0>89420</Int64Array0>
      <Int64Array1>52233</Int64Array1>
    </documentIdList>
    <tenantId>40</tenantId>
    <applicationName>test</applicationName>
  </MethodParameters>
</AssociateProjectDocumentsToTenant>

Response

TypeDescription
List<DocumentAssociationStatus>List of document association statuses

Response - sample output

<AssociateProjectDocumentsToTenant>
  <MethodParameters>
    <DocumentAssociationStatusArray>
      <DocumentAssociationStatusArray0>
        <DocumentId>89420</DocumentId>
        <CompanyId>197</CompanyId>
        <Status>True</Status>
      </DocumentAssociationStatusArray0>
      <DocumentAssociationStatusArray1>
        <DocumentId>52233</DocumentId>
        <CompanyId>197</CompanyId>
        <Status>True</Status>
      </DocumentAssociationStatusArray1>
    </DocumentAssociationStatusArray>
  </MethodParameters>
</AssociateProjectDocumentsToTenant>

Exceptions

Error CodeDescription
123An exception occurred while processing your request
134Document does not exist for the given documentId
138applicationName length has exceeded the maximum character limit allowed (10) 
146The applicationName is not set
167You are not authorized to use this method
223The given project is not owned by the company or does not exist, therefore this action cannot be performed
240Documents to be copied are not provided
242Provide documents from a single project at a time
250A document provided does not belong to a project
251Documents provided do not belong to a valid project
396You have to upgrade your license to do this operation
411You need to have the Tenants Add-on to perform this action
416tenant Id is not valid (zero or negative)
417tenantCompany can not be found for given tenant ID and user's company ID
418document Id is not valid (zero or negative)