SendDocumentsToTenant

Description


Important

Professionals are required to have purchased a valid license consisting of the 'Tenant' feature in order to use this web method. Please contact per.christian@boligmappa.no or yohanw@99x.lk to get a license set up for your company.

This method is used to send documents to a tenant. User should have a valid work-space for the given tenant in order to send documents for that particular tenant/office space. Documents can be tagged with related tenant devices, tenant rooms, and chapters.   

Request

ParameterTypeMandatory/OptionalComments
inputSendDocumentsToTenantInputMandatoryNot relevant
applicationNamestringMandatoryShould be less than or equal to 10 character

Note: Use GetTenants web method to find the TenantId.

Sample Input 

<SendDocumentsToTenant>
  <MethodParameters>
    <UserAuthentication>
      <UserName>username</UserName>
      <Password>password</Password>
      <AnyAttr attr0="XmlAttributeArray" isNull="false">
        <XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
      </AnyAttr>
    </UserAuthentication>
    <input>
      <Documents attr0="TenantDocumentInputArray" isNull="false">
        <TenantDocumentInputArray0>
          <FileName>sample.pdf</FileName>
          <DocumentTypeId>4</DocumentTypeId>
          <Url>http://www.pdf995.com/samples/pdf.pdf</Url>
          <Data isNull="false" />
          <Title>test document</Title>
          <Description>test</Description>
          <OrderNumber>345678</OrderNumber>
          <IsVisibleInBoligmappa>True</IsVisibleInBoligmappa>
          <ProfessionId>-1</ProfessionId>
          <RoomIds attr0="Int64Array" isNull="false">
            <Int64Array0>4</Int64Array0>
          </RoomIds>
          <DeviceId>20</DeviceId>
          <ChapterTagIds attr0="Int32Array" isNull="false">
            <Int32Array0>5</Int32Array0>
          </ChapterTagIds>
        </TenantDocumentInputArray0>
      </Documents>
      <TenantId>193</TenantId>
    </input>
    <applicationName>test</applicationName>
  </MethodParameters>
</SendDocumentsToTenant>

Response

TypeDescription
SendDocumentsToTenantOutputSendDocumentsToTenant Output model

 Sample Output

<SendDocumentsToTenant>
  <MethodParameters>
    <SendDocumentsToTenantOutput>
      <Status attr0="TenantDocumentUploadStatusArray" isNull="false">
        <TenantDocumentUploadStatusArray0>
          <DocumentTitle>test document</DocumentTitle>
          <DocumentId>63714</DocumentId>
          <UploadStatusCode>1</UploadStatusCode>
          <ErrorCode>0</ErrorCode>
        </TenantDocumentUploadStatusArray0>
      </Status>
    </SendDocumentsToTenantOutput>
  </MethodParameters>
</SendDocumentsToTenant>

Exceptions

Error CodeDescription

110

Input parameters contain null or invalid data

112There is no document to upload
113One or more mandatory fields have not been provided 
114File name contains invalid charactor(s)
115Given ProfessionId(s) are not valid
116Invalid DocumentTypeId
123An exception occurred while processing your request
126File extension is not specified or file extension is not valid
133Url or Data must be provided to create a document file
136Invalid document Url
138applicationName length has exceeded the maximum character limit allowed (10)
146The applicationName is not set

165

The given profession is not registered to your company

167

You are not authorized to use this method

310One or more input ChapterTags are invalid
311Professionals are not allowed to tag ChapterTagId 1 (Generell brukerveiledning bolig) 
330Document Description has exceeded the maximum character limit of 360
331Document Title has exceeded the maximum character limit of 260
332Document FileName has exceeded the maximum character limit of 260
333OrderNo has exceeded the maximum character limit of 50
335Either DocumentType or ChapterTag is mandatory
376The given Base64 string is invalid
401Tenant does not exist
402

You are not Authorized for this Tenant

403One or more of the attached RoomIds are either invalid or does not belong to the Tenant
404Attached DeviceId does not belong to the tenant
411You need to have the Tenants Addon to perform this action
412The office space (tenant) no longer exists and this workspace has been deactivated.