SendDocument - Obsolete

This method is obsolete and will be completely removed in the near future. Use the new method, SendDocumentsToPlant which provides more metadata.

Description

This method is used when a single document needs to be uploaded to Boligmappa. A document is associated with a specific property and a company through the plantId. It can also be tagged with related rooms and devices.

The only difference between this method and SendDocuments is; it allows you to upload multiple documents.

Request

ParameterTypeMandatory/OptionalMaximum character length/limitDescription
plantIdlongMandatoryNot RelevantId of the plant (Building/Property) to where the documents should be uploaded
documentDocumentInputMandatoryNot RelevantThe document to be uploaded
propertyOwnerEmailstringOptionalNot Relevant

A notification is sent to the given email address when a document is uploaded to the property

applicationNamestringMandatoryShould be less than or equal to 10 charactersThe name of the integration partner

Request - input sample

<SendDocument>
  <MethodParameters>
    <UserAuthentication>
      <UserName>username</UserName>
      <Password>password</Password>
      <AnyAttr attr0="XmlAttributeArray" isNull="false">
        <XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
      </AnyAttr>
    </UserAuthentication>
    <plantId>6731</plantId>
    <applicationName>test</applicationName>
    <document>
      <FileName>test.pdf</FileName>
      <DocumentTypeId>2</DocumentTypeId>
      <Url>http://barwonmedicalimaging.com.au/wp-content/uploads/2015/07/Sample-PDF.pdf</Url>
      <Title>Tester</Title>
      <Description isNull="false" />
      <OrderNumber isNull="false" />
      <Data isNull="false" />
      <IsVisibleInBoligmappa>False</IsVisibleInBoligmappa>
      <ProfessionId>1</ProfessionId>
      <BuildingId>0</BuildingId>
      <RoomIds isNull="true" />
      <DeviceId>0</DeviceId>
      <ChapterTagIds isNull="true" />
      <ApartmentTagIds isNull="true" />
    </document>
    <propertyOwnerEmail isNull="false" />
  </MethodParameters>
</SendDocument>


Notes:

The plantId is mandatory. If the plant does not exist, the method returns an exception (Error code 111). The client is notified to create the Plant first, using any of the two methods provided for Plant creation.

See: 

  1. CreateBuildingPlant
  2. CreatePropertyPlant

Response

Once the document is successfully uploaded, a Document response model is sent back to the client.

TypeDescription
DocumentUploadStatusDocument response model


Response - output sample

<SendDocument>
  <MethodParameters>
    <DocumentUploadStatus>
      <DocumentTitle>Tester</DocumentTitle>
      <DocumentId>57488</DocumentId>
      <UploadStatusCode>1</UploadStatusCode>
      <ErrorCode>0</ErrorCode>
    </DocumentUploadStatus>
  </MethodParameters>
</SendDocument>

Exceptions

Error CodeDescription
111plantId does not exist for your company or your license does not authorize you to access this plantId
112There is no document to upload
113One or more mandatory fields have not been supplied in input
114 Invalid file name provided for the document in the FileName parameter
115 Given ProfessionId(s) are not valid
116 Invalid DocumentTypeId
123 An exception occurred while processing your request  
126 File extension is not specified or file extension is not valid
133 Url or Data must be provided to create a document file
138 aapplicationName length has exceeded the maximum character limit allowed (10) 
146 applicationName is missing
165 The given profession is not registered to your company
167You are not authorized to use this web method
179 One or more of the attached RoomIds do not belong to the given plant
180 One or more of the attached DeviceIds does not belong to the given plant 
181 For a document to be tagged with a room or a device, the given plant needs to be connected to a property 
182 One or more of the attached BuildingIds do not belong to the given plant
203 

BuildingId of the document should be either 0 or match the building plant provided  

217An error occurred while sending the notification mail to the user
218The PropertyOwnerEmail provided is not valid