DigiOffice API Services Services

<back to all web services

RepairWordDocument

Repair a (corporate identity) MS Word document based on an existing document registration.

Requires Authentication
<?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 RepairWordDocumentResponse implements IGenerateDocumentResponse, JsonSerializable
{
    public function __construct(
        /** @description Contains the registration ID of the generated (corporate identity) document */
        // @ApiMember(Description="Contains the registration ID of the generated (corporate identity) document", IsRequired=true)
        /** @var string */
        public string $DocumentID=''
    ) {
    }

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

/** @description Repair a (corporate identity) MS Word document based on an existing document registration. */
// @Api(Description="Repair a (corporate identity) MS Word document based on an existing document registration.")
class RepairWordDocument implements IRepairOfficeDocument, JsonSerializable
{
    public function __construct(
        /** @description ID of the current document registration */
        // @ApiMember(Description="ID of the current document registration", IsRequired=true)
        /** @var string */
        public string $RegisteredDocumentID=''
    ) {
    }

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

PHP RepairWordDocument DTOs

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

HTTP + CSV

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

POST /csv/reply/RepairWordDocument HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"RegisteredDocumentID":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"DocumentID":"00000000-0000-0000-0000-000000000000"}