DigiOffice Gateway Web Services

<back to all web services

GetDocumentUploadDetails

Requires Authentication
The following routes are available for this service:
GET/api/documentuploads/{ID}
<?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 DocumentUpload implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ID=0,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $Notes=null,
        /** @var string|null */
        public ?string $FileName=null,
        /** @var string|null */
        public ?string $Extension=null,
        /** @var DateTime|null */
        public ?DateTime $FileDate=null,
        /** @var string|null */
        public ?string $AssignedTo=null,
        /** @var string|null */
        public ?string $AssignedToGroup=null,
        /** @var string|null */
        public ?string $UploadedBy=null,
        /** @var bool|null */
        public ?bool $HasPreview=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ID'])) $this->ID = $o['ID'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Notes'])) $this->Notes = $o['Notes'];
        if (isset($o['FileName'])) $this->FileName = $o['FileName'];
        if (isset($o['Extension'])) $this->Extension = $o['Extension'];
        if (isset($o['FileDate'])) $this->FileDate = JsonConverters::from('DateTime', $o['FileDate']);
        if (isset($o['AssignedTo'])) $this->AssignedTo = $o['AssignedTo'];
        if (isset($o['AssignedToGroup'])) $this->AssignedToGroup = $o['AssignedToGroup'];
        if (isset($o['UploadedBy'])) $this->UploadedBy = $o['UploadedBy'];
        if (isset($o['HasPreview'])) $this->HasPreview = $o['HasPreview'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ID)) $o['ID'] = $this->ID;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Notes)) $o['Notes'] = $this->Notes;
        if (isset($this->FileName)) $o['FileName'] = $this->FileName;
        if (isset($this->Extension)) $o['Extension'] = $this->Extension;
        if (isset($this->FileDate)) $o['FileDate'] = JsonConverters::to('DateTime', $this->FileDate);
        if (isset($this->AssignedTo)) $o['AssignedTo'] = $this->AssignedTo;
        if (isset($this->AssignedToGroup)) $o['AssignedToGroup'] = $this->AssignedToGroup;
        if (isset($this->UploadedBy)) $o['UploadedBy'] = $this->UploadedBy;
        if (isset($this->HasPreview)) $o['HasPreview'] = $this->HasPreview;
        return empty($o) ? new class(){} : $o;
    }
}

class GetDocumentUploadDetails implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ID=0
    ) {
    }

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

PHP GetDocumentUploadDetails DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /api/documentuploads/{ID} HTTP/1.1 
Host: dogw.klokgroep.nl 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ID":0,"Description":"String","Notes":"String","FileName":"String","Extension":"String","FileDate":"0001-01-01T00:00:00.0000000","AssignedTo":"String","AssignedToGroup":"String","UploadedBy":"String","HasPreview":false}