Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.  

...

ParameterTypeMandatory/OptionalMaximum character length/limitDescription

input

GetDocumentInput

Mandatory

Not Relevant

GetDocumentInput model

applicationNamestringMandatoryShould be less than or equal to 10 characters

The name of the integration partner

...


GetDocumentInput

ParameterTypeMandatory/OptionalDescription

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

TypeDescription
GetDocumentOutputGetDocumentOutput model

 


GetDocumentOutput 


ParameterTypeDescription

Document

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://172482.2022.1.183:80807080/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 CodeDescription
110Input 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

138applicationName length has exceeded the maximum character limit allowed (10)
146The applicationName is not set
167You are not authorized to use this web method

...