GetDocument - New
Note
This is an upgraded version of the GetDocumentById method with more metadata. Use this method as the previous is now obsolete.
GetDocumentInput is a single input parameter introduced in this method to enclose all the existing input parameters of the previous method in a single place with the exception of the applicationName.
Description
This method is used to return a document for the given documentId.
Request
Parameter | Type | Mandatory/Optional | Maximum character length/limit | Description |
---|---|---|---|---|
input | GetDocumentInput | Mandatory | Not Relevant | GetDocumentInput model |
applicationName | string | Mandatory | Should be less than or equal to 10 characters | The name of the integration partner |
GetDocumentInput
Parameter | Type | Mandatory/Optional | Description |
---|---|---|---|
DocumentId | long | Mandatory | documentId of the document to be retrieved |
Request - sample input
<GetDocument>
<MethodParameters>
<UserAuthentication>
<UserName>username</UserName>
<Password>password</Password>
<AnyAttr attr0="XmlAttributeArray" isNull="false">
<XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
</AnyAttr>
</UserAuthentication>
<input>
<DocumentId>57226</DocumentId>
</input>
<applicationName>test</applicationName>
</MethodParameters>
</GetDocument>
Response
Type | Description |
---|---|
GetDocumentOutput | GetDocumentOutput model |
GetDocumentOutput
Parameter | Type | Description |
---|---|---|
Document | Matching the document to the given id |
Response - sample output
<GetDocument>
<MethodParameters>
<GetDocumentOutput>
<Document>
<DocumentId>57226</DocumentId>
<FileName>Advanced-Test-Automation-Engineer-Syllabus-GA-2016 (1) (1).pdf</FileName>
<FileTypeId>4</FileTypeId>
<DocumentTypeId>13</DocumentTypeId>
<Title>download100.png</Title>
<Description>A new doc for chapter 2</Description>
<OrderNumber isNull="false" />
<UpdatedDate>11/15/2017 4:37:21 PM</UpdatedDate>
<Url>http://482.22.1.183:7080/Document/DownloadDocumentWebService/DownloadDocWithSessionKey?sessionKey=rl%2fL3WDK6Fs%2bCIaABAaVX6DrbcZOIaK71Wznacdq5afKfREEKI6CEv%2fD8dMRjDvP</Url>
<Path isNull="true" />
<Official>False</Official>
<OwnedById>44</OwnedById>
<ShowInBoligboken>True</ShowInBoligboken>
<Status>1</Status>
<PdfDocId>57226</PdfDocId>
<PdfDocPath isNull="true" />
<ApplicationTag isNull="true" />
<FolderId>0</FolderId>
<RoomIds isNull="true" />
<DeviceIds isNull="true" />
<ChapterTags attr0="ChapterTagOutputArray" isNull="false">
<ChapterTagOutputArray0>
<Id>2</Id>
<TagName>Informasjon om produkter i boligen</TagName>
<TagDescription isNull="true" />
</ChapterTagOutputArray0>
</ChapterTags>
<ProjectId>0</ProjectId>
</Document>
</GetDocumentOutput>
</MethodParameters>
</GetDocument>
Exceptions
Error Code | Description |
---|---|
110 | Input parameters contain null or invalid data |
123 | An exception occurred while processing your request |
134 | Document does not exist for the given documentId |
135 | User is not authorized to access the document with the given documentId or your license does not authorize you to access this documentId |
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 method |