DigiOffice Gateway Web Services

<back to all web services

GetDocuments

Requires Authentication
The following routes are available for this service:
GET POST/api/documents
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class RegistrationProfileFieldValue implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $DocumentFieldID='',
        /** @var string|null */
        public ?string $Value=null,
        /** @var string|null */
        public ?string $ShadowValue=null,
        /** @var bool|null */
        public ?bool $IsModifiedByUser=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['DocumentFieldID'])) $this->DocumentFieldID = $o['DocumentFieldID'];
        if (isset($o['Value'])) $this->Value = $o['Value'];
        if (isset($o['ShadowValue'])) $this->ShadowValue = $o['ShadowValue'];
        if (isset($o['IsModifiedByUser'])) $this->IsModifiedByUser = $o['IsModifiedByUser'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->DocumentFieldID)) $o['DocumentFieldID'] = $this->DocumentFieldID;
        if (isset($this->Value)) $o['Value'] = $this->Value;
        if (isset($this->ShadowValue)) $o['ShadowValue'] = $this->ShadowValue;
        if (isset($this->IsModifiedByUser)) $o['IsModifiedByUser'] = $this->IsModifiedByUser;
        return empty($o) ? new class(){} : $o;
    }
}

class GetDocuments implements IPageOptions, IModifiedSince, ISearchCriteria, JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ViewID=null,
        /** @var int */
        public int $PageSize=0,
        /** @var int */
        public int $PageNumber=0,
        /** @var string|null */
        public ?string $SearchCriteria=null,
        /** @var string|null */
        public ?string $ExplorerID=null,
        /** @var string|null */
        public ?string $Path=null,
        /** @var string|null */
        public ?string $ExternalNumber=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedSince=null,
        /** @var bool|null */
        public ?bool $AllVersions=null,
        /** @var string|null */
        public ?string $OrderBy=null,
        /** @var bool|null */
        public ?bool $Archived=null,
        /** @var string|null */
        public ?string $FilterName=null,
        /** @var string|null */
        public ?string $ProgCode=null,
        /** @var string */
        public string $RegistrationProfileFieldID='',
        /** @var array<RegistrationProfileFieldValue>|null */
        public ?array $DependableFields=null,
        /** @var bool|null */
        public ?bool $IncludeCustomProperties=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ViewID'])) $this->ViewID = $o['ViewID'];
        if (isset($o['PageSize'])) $this->PageSize = $o['PageSize'];
        if (isset($o['PageNumber'])) $this->PageNumber = $o['PageNumber'];
        if (isset($o['SearchCriteria'])) $this->SearchCriteria = $o['SearchCriteria'];
        if (isset($o['ExplorerID'])) $this->ExplorerID = $o['ExplorerID'];
        if (isset($o['Path'])) $this->Path = $o['Path'];
        if (isset($o['ExternalNumber'])) $this->ExternalNumber = $o['ExternalNumber'];
        if (isset($o['ModifiedSince'])) $this->ModifiedSince = JsonConverters::from('DateTime', $o['ModifiedSince']);
        if (isset($o['AllVersions'])) $this->AllVersions = $o['AllVersions'];
        if (isset($o['OrderBy'])) $this->OrderBy = $o['OrderBy'];
        if (isset($o['Archived'])) $this->Archived = $o['Archived'];
        if (isset($o['FilterName'])) $this->FilterName = $o['FilterName'];
        if (isset($o['ProgCode'])) $this->ProgCode = $o['ProgCode'];
        if (isset($o['RegistrationProfileFieldID'])) $this->RegistrationProfileFieldID = $o['RegistrationProfileFieldID'];
        if (isset($o['DependableFields'])) $this->DependableFields = JsonConverters::fromArray('RegistrationProfileFieldValue', $o['DependableFields']);
        if (isset($o['IncludeCustomProperties'])) $this->IncludeCustomProperties = $o['IncludeCustomProperties'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ViewID)) $o['ViewID'] = $this->ViewID;
        if (isset($this->PageSize)) $o['PageSize'] = $this->PageSize;
        if (isset($this->PageNumber)) $o['PageNumber'] = $this->PageNumber;
        if (isset($this->SearchCriteria)) $o['SearchCriteria'] = $this->SearchCriteria;
        if (isset($this->ExplorerID)) $o['ExplorerID'] = $this->ExplorerID;
        if (isset($this->Path)) $o['Path'] = $this->Path;
        if (isset($this->ExternalNumber)) $o['ExternalNumber'] = $this->ExternalNumber;
        if (isset($this->ModifiedSince)) $o['ModifiedSince'] = JsonConverters::to('DateTime', $this->ModifiedSince);
        if (isset($this->AllVersions)) $o['AllVersions'] = $this->AllVersions;
        if (isset($this->OrderBy)) $o['OrderBy'] = $this->OrderBy;
        if (isset($this->Archived)) $o['Archived'] = $this->Archived;
        if (isset($this->FilterName)) $o['FilterName'] = $this->FilterName;
        if (isset($this->ProgCode)) $o['ProgCode'] = $this->ProgCode;
        if (isset($this->RegistrationProfileFieldID)) $o['RegistrationProfileFieldID'] = $this->RegistrationProfileFieldID;
        if (isset($this->DependableFields)) $o['DependableFields'] = JsonConverters::toArray('RegistrationProfileFieldValue', $this->DependableFields);
        if (isset($this->IncludeCustomProperties)) $o['IncludeCustomProperties'] = $this->IncludeCustomProperties;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetDocuments DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/documents HTTP/1.1 
Host: dogw.klokgroep.nl 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetDocuments xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
  <AllVersions>false</AllVersions>
  <Archived>false</Archived>
  <DependableFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Registrationprofile">
    <d2p1:RegistrationProfileFieldValue>
      <d2p1:DocumentFieldID>00000000-0000-0000-0000-000000000000</d2p1:DocumentFieldID>
      <d2p1:IsModifiedByUser>false</d2p1:IsModifiedByUser>
      <d2p1:ShadowValue>String</d2p1:ShadowValue>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:RegistrationProfileFieldValue>
  </DependableFields>
  <ExplorerID>00000000-0000-0000-0000-000000000000</ExplorerID>
  <ExternalNumber>String</ExternalNumber>
  <FilterName>String</FilterName>
  <IncludeCustomProperties>false</IncludeCustomProperties>
  <ModifiedSince>0001-01-01T00:00:00</ModifiedSince>
  <OrderBy>String</OrderBy>
  <PageNumber>0</PageNumber>
  <PageSize>0</PageSize>
  <Path>String</Path>
  <ProgCode>String</ProgCode>
  <RegistrationProfileFieldID>00000000-0000-0000-0000-000000000000</RegistrationProfileFieldID>
  <SearchCriteria>String</SearchCriteria>
  <ViewID>00000000-0000-0000-0000-000000000000</ViewID>
</GetDocuments>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ArrayOfDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document">
  <Document>
    <AllowDigitalSigningOnlyOnPrimaryVersions>false</AllowDigitalSigningOnlyOnPrimaryVersions>
    <CommentsCount>0</CommentsCount>
    <CustomProperties xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringanyType>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value />
      </d3p1:KeyValueOfstringanyType>
    </CustomProperties>
    <Date>0001-01-01T00:00:00</Date>
    <DirectUrl>String</DirectUrl>
    <DocumentcategoryText>String</DocumentcategoryText>
    <Extension>String</Extension>
    <ExternalNumber>String</ExternalNumber>
    <ExternalVersion>String</ExternalVersion>
    <ExtraField>String</ExtraField>
    <FileDate>0001-01-01T00:00:00</FileDate>
    <FileExtension>String</FileExtension>
    <FileSize>0</FileSize>
    <FileUrl>String</FileUrl>
    <FullTitle>String</FullTitle>
    <HasPreview>false</HasPreview>
    <Hash>String</Hash>
    <HashType>String</HashType>
    <ID>00000000-0000-0000-0000-000000000000</ID>
    <InternalCompanyID>0</InternalCompanyID>
    <InternalInvoiceNumber>String</InternalInvoiceNumber>
    <InternalLocationID>0</InternalLocationID>
    <InternalNumber>String</InternalNumber>
    <IsCorporateIdentity>false</IsCorporateIdentity>
    <IsFavorite>false</IsFavorite>
    <IsFrozen>false</IsFrozen>
    <IsPrimaryVersion>false</IsPrimaryVersion>
    <LanguageID>0</LanguageID>
    <Number>String</Number>
    <PersonID>0</PersonID>
    <ProjectID>0</ProjectID>
    <ProjectTitle>String</ProjectTitle>
    <RegistrationprofileID>00000000-0000-0000-0000-000000000000</RegistrationprofileID>
    <RelationID>0</RelationID>
    <RelationTitle>String</RelationTitle>
    <RootDocumentID>00000000-0000-0000-0000-000000000000</RootDocumentID>
    <StandardDocumentUrl>String</StandardDocumentUrl>
    <Title>String</Title>
    <UserTitle>String</UserTitle>
    <Version>String</Version>
  </Document>
</ArrayOfDocument>