Versions Compared

Key

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

Description

...

Note:

  • This is an upgraded version of the GetDocumentsByProject method with more metadata. Use this method as the previous is now obsolete.

  • GetDocumentsByProjectInput 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.

  • A new method GetDocumentsByProject3 has been introduced which is improved in performance but does not contain DocumentCopiedPropertyDetails field in the output. if this field is not required please integrate GetDocumentsByProject3 method.


Description

This method is used to return a list of documents added to a project. Any of the users belonging All users that belong to a company which that is associated with the project can access all the project documents.

Note:

  • This web method is an upgraded version of GetDocumentsByProject web method with more meta data.
  • A single Input parameter (GetDocumentsByProjectInput) is introduced in this web method in order to enclose all the existing input parameters of the old web method except for the Application name in a single place. 


Request

Parameter
Type
Mandatory/Optional
Comments
Input
Maximum character length/limit
Description
inputGetDocumentsByProjectInputMandatoryNot RelevantGetDocumentsByProject input model
applicationNamestringMandatory
Third party application identifier, identifying the client consuming the web service – (Length of the ApplicationName should
Should be less than or equal to 10
)
charactersThe name of the integration partner

GetDocumentsByProjectInput

Parameter
Type
Mandatory/Optional
Comments
Description
ProjectIdlongMandatory/OptionalThe
project
Id of the project
ProjectCodestringOptional/Mandatory
Project
The code of the project E.g. ABC0001-A1 

Note :

Need to provide at least one of these fields (project Id, project code)

 


NOTE: It is mandatory to provide either the projectCode or projectId. First preference is always given to the projectId, if both the projectCode and projectId are provided.


Request - sample input

<GetDocumentsByProject2>
  <MethodParameters>
    <UserAuthentication>
      <UserName>username</UserName>
      <Password>password</Password>
      <AnyAttr attr0="XmlAttributeArray" isNull="false">
        <XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
      </AnyAttr>
    </UserAuthentication>
    <input>
      <ProjectId>1109</ProjectId>
      <ProjectCode isNull="false" />
    </input>
    <applicationName>test</applicationName>
  </MethodParameters>
</GetDocumentsByProject2>

Response

TypeDescription
GetDocumentsByProjectOutputGetDocumentsByProjectOutput Model

...


GetDocumentsByProjectOutput

Parameter
Type
Comments
Description
ProjectDocumentsList<ProjectDocument>Project Document
response
Response model list


Response - sample output

<GetDocumentsByProject2>
  <MethodParameters>
    <GetDocumentsByProjectOutput>
      <ProjectDocuments attr0="ProjectDocumentArray" isNull="false">
        <ProjectDocumentArray0>
          <DocumentId>54618</DocumentId>
          <FileName>infoland-org.png</FileName>
          <FileTypeId>10</FileTypeId>
          <DocumentTypeId>2</DocumentTypeId>
          <Title>test</Title>
          <Description>test test</Description>
          <OrderNumber>23423424</OrderNumber>
          <IsVisibleInBoligmappa>False</IsVisibleInBoligmappa>
          <UpdatedDate>7/26/2017 12:15:35 PM</UpdatedDate>
          <Url>http://172.20.1.183:8080/Document/DownloadDocumentWebService/DownloadDocWithSessionKey?sessionKey=5EF%2fpT8WL%2f6uSd9XlcGF2kE5L%2bZezIt3fi7ZP81WJRXOI9rczHDDxnpJhYyoK%2bGz</Url>
          <PdfDocId>54619</PdfDocId>
          <ApplicationTag>test</ApplicationTag>
          <CompanyId>197</CompanyId>
          <ProfessionId>-1</ProfessionId>
          <ProfessionName>Ikke spesifisert</ProfessionName>
          <BuildingId>0</BuildingId>
          <RoomIds isNull="true" />
          <DeviceIds isNull="true" />
          <OrganizationNumber>914350840</OrganizationNumber>
          <UpdatedBy>hellen</UpdatedBy>
          <ChapterTags attr0="ChapterTagOutputArray" isNull="false">
            <ChapterTagOutputArray0>
              <Id>10</Id>
              <TagName>Annet nyttig</TagName>
              <TagDescription isNull="true" />
            </ChapterTagOutputArray0>
          </ChapterTags>
          <Company>
            <Id>197</Id>
            <OrganizationNumber>914350840</OrganizationNumber>
            <CompanyName>VEGA 1 AS Avdeling Admninistrasjon</CompanyName>
          </Company>
          <ApartmentTags attr0="ApartmentTagsOutputArray" isNull="false" />
          <DocumentCopiedPropertyDetails attr0="PropertyDetailsOfCopiedDocumentsArray" isNull="false" />
        </ProjectDocumentArray0>
        <ProjectDocumentArray1>
          <DocumentId>54620</DocumentId>
          <FileName>2017-07-12_06-13-46.jpg</FileName>
          <FileTypeId>9</FileTypeId>
          <DocumentTypeId>0</DocumentTypeId>
          <Title>2017-07-12_06-13-46.jpg</Title>
          <Description isNull="true" />
          <OrderNumber isNull="true" />
          <IsVisibleInBoligmappa>True</IsVisibleInBoligmappa>
          <UpdatedDate>7/27/2017 12:39:56 PM</UpdatedDate>
          <Url>http://172.20.1.183:8080/Document/DownloadDocumentWebService/DownloadDocWithSessionKey?sessionKey=5EF%2fpT8WL%2f6uSd9XlcGF2mCYfIo55cQDAP4yBWROlLdcrGyhrwFDNmEWJYbuDeEL</Url>
          <PdfDocId>54621</PdfDocId>
          <ApplicationTag>test</ApplicationTag>
          <CompanyId>197</CompanyId>
          <ProfessionId>8</ProfessionId>
          <ProfessionName>Tak/blikkenslager</ProfessionName>
          <BuildingId>0</BuildingId>
          <RoomIds isNull="true" />
          <DeviceIds isNull="true" />
          <OrganizationNumber>914350840</OrganizationNumber>
          <UpdatedBy>hellen</UpdatedBy>
          <ChapterTags attr0="ChapterTagOutputArray" isNull="false">
            <ChapterTagOutputArray0>
              <Id>3</Id>
              <TagName>Informasjon om tekniske anlegg i boligen</TagName>
              <TagDescription isNull="true" />
            </ChapterTagOutputArray0>
            <ChapterTagOutputArray1>
              <Id>4</Id>
              <TagName>Samsvarserklæringer og garantibevis</TagName>
              <TagDescription isNull="true" />
            </ChapterTagOutputArray1>
            <ChapterTagOutputArray2>
              <Id>5</Id>
              <TagName>Sjekklister, målinger og kontrollskjema</TagName>
              <TagDescription isNull="true" />
            </ChapterTagOutputArray2>
          </ChapterTags>
          <Company>
            <Id>197</Id>
            <OrganizationNumber>914350840</OrganizationNumber>
            <CompanyName>VEGA 1 AS Avdeling Admninistrasjon</CompanyName>
          </Company>
          <ApartmentTags attr0="ApartmentTagsOutputArray" isNull="false" />
          <DocumentCopiedPropertyDetails attr0="PropertyDetailsOfCopiedDocumentsArray" isNull="false" />
        </ProjectDocumentArray1>
      </ProjectDocuments>
    </GetDocumentsByProjectOutput>
  </MethodParameters>
</GetDocumentsByProject2>


Exceptions

Error CodeDescription

110

Input parameters contain null or invalid

data

data 

123An exception occurred while processing your request
138 
ApplicationName
applicationName length
is
has exceeded the maximum
allowed
character limit allowed (10) 
146The
application name
applicationName is not set
167You are not authorized to use this web method
227The project does not exist or the company is not connected to the given project or your license does not authorize you to access this project
252 

No input is provided

to project Id or project code. Need atleast one of them 

for ProjectId or ProjectCode. Provide the input for at least one of these fields 

253 

Ambiguous inputs. Make sure

projet code and project id referred

the ProjectCode and projectId refer to the same project 

254 

Invalid

project code 

ProjectCode