MergeDocumentsAndSendToPlant
Description
This method is used to combine a set of files and submit them to a plant as a single PDF document. When the documents provided in the input are combined, a PDF document is created and attached to the specified plant.
Request
Parameter | Type | Mandatory/Optional | Maximum character length/limit | Description |
---|---|---|---|---|
plantId | long | Mandatory | Not relevant | Id of the plant to where the merged document should be uploaded |
documents | List<File> | Mandatory | Not relevant | The list of files to be combined |
fileName | string | Optional | Not relevant | If a name is not provided, the default name will be set to “Jobbdokumentasjon_+<Industry>” |
orderNumber | string | Optional | Not relevant | The job order number the document is associated with |
showlnBoligmappa | bool | Mandatory | Not relevant | Set the visibility of this document in boligmappa.no |
propertyOwnerEmail | string | Optional | Not relevant | A notification is sent to the given email address when a document is uploaded to the property |
applicationName | string | Mandatory | Should be less than or equal to 10 characters | The name of the integration partner |
Note
When the fileName is not provided “Jobbdokumentasjon_+<Industry>” is used as the default file name. The industry association is mapped with the profession of the authenticated user and used as the industry. E.g. Jobbdokumentasjon_Elektriker.pdf
Request - sample input
<MergeDocumentsAndSendToPlant>
<MethodParameters>
<UserAuthentication>
<UserName>username</UserName>
<Password>password</Password>
<AnyAttr attr0="XmlAttributeArray" isNull="false">
<XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
</AnyAttr>
</UserAuthentication>
<plantId>6731</plantId>
<documents attr0="FileArray" isNull="false">
<FileArray0>
<Url>http://gahp.net/wp-content/uploads/2017/09/sample.pdf</Url>
<Data isNull="false" />
</FileArray0>
</documents>
<fileName>test1</fileName>
<orderNumber isNull="false" />
<showInBoligmappa>False</showInBoligmappa>
<propertyOwnerEmail isNull="false" />
<applicationName>test</applicationName>
</MethodParameters>
</MergeDocumentsAndSendToPlant>
Response
Type | Description |
---|---|
A model containing the Url to the generated document, fileName and documentId. |
Response - sample output
<MergeDocumentsAndSendToPlant>
<MethodParameters>
<MergedDocument>
<BoligmappaDocId>57476</BoligmappaDocId>
<Url>http://172.20.1.183:8080/Document/DownloadDocumentWebService/DownloadDocWithSessionKey?sessionKey=rl%2fL3WDK6Fs%2bCIaABAaVXzAiICIem%2baxFe%2b0UzSXMYENrerYdM%2fKi7D8NAbn7RaR</Url>
<FileName>test1.pdf</FileName>
</MergedDocument>
</MethodParameters>
</MergeDocumentsAndSendToPlant>
Exceptions
Error Code | Description |
---|---|
111 | plantId does not exist for your company or your license does not authorize you to access this plantId |
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 |
157 | plantId is required |
162 | No files provided to combine |
163 | An error occurred while combining the files |
164 | One or more of the input file models does not contain adequate information (a Url or Base64 encoded data) |
167 | You are not authorized to use this web method |
217 | An error occurred while sending the notification mail to the user |
218 | The propertyOwnerEmail provided is not valid |