DigiOffice Gateway Web Services

<back to all web services

IDB_4PSBC_Import_Project

Import project record vanuit 4PS

Requires Authentication
The following routes are available for this service:
POST/api/4PSBC/ImportProject
<?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 Header implements JsonSerializable
{
    public function __construct(
        /** @description Inhoud van het bericht */
        // @ApiMember(Description="Inhoud van het bericht")
        /** @var string|null */
        public ?string $Contains=null,

        /** @description Datum aanmaak bericht */
        // @ApiMember(Description="Datum aanmaak bericht")
        /** @var string|null */
        public ?string $Date=null,

        /** @description ID voor het bericht */
        // @ApiMember(Description="ID voor het bericht")
        /** @var string|null */
        public ?string $MessageID=null,

        /** @description Verzender van het bericht */
        // @ApiMember(Description="Verzender van het bericht")
        /** @var string|null */
        public ?string $Sender=null
    ) {
    }

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

class Response_Project implements JsonSerializable
{
    public function __construct(
        /** @description Reponse status (Ok/Error) */
        // @ApiMember(Description="Reponse status (Ok/Error)", IsRequired=true)
        /** @var string */
        public string $Status='',

        /** @description Errors summary */
        // @ApiMember(Description="Errors summary")
        /** @var string|null */
        public ?string $Errors=null,

        /** @description ID of the project in DigiOffice */
        // @ApiMember(Description="ID of the project in DigiOffice", IsRequired=true)
        /** @var string */
        public string $DigiOfficeProjectID='',

        /** @description GlobalID (digiOfficeId) of the project in DigiOffice */
        // @ApiMember(Description="GlobalID (digiOfficeId) of the project in DigiOffice", IsRequired=true)
        /** @var string */
        public string $DigiOfficeGlobalID=''
    ) {
    }

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

class IDB_4PSBC_Response_Project implements JsonSerializable
{
    public function __construct(
        /** @description Header of the response */
        // @ApiMember(Description="Header of the response", IsRequired=true)
        /** @var Header|null */
        public ?Header $Header=null,

        /** @description Response body */
        // @ApiMember(Description="Response body", IsRequired=true)
        /** @var Response_Project|null */
        public ?Response_Project $Response=null
    ) {
    }

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

class Data_Project implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $systemId=null,
        /** @var string|null */
        public ?string $digiOfficeId=null,
        /** @var string|null */
        public ?string $companyId=null,
        /** @var string|null */
        public ?string $no=null,
        /** @var string|null */
        public ?string $description=null,
        /** @var string|null */
        public ?string $description2=null,
        /** @var string|null */
        public ?string $visitAddress=null,
        /** @var string|null */
        public ?string $visitAddress2=null,
        /** @var string|null */
        public ?string $visitAddressPostCode=null,
        /** @var string|null */
        public ?string $visitAddressCity=null,
        /** @var string|null */
        public ?string $visitAddressCountryRegionId=null,
        /** @var string|null */
        public ?string $address=null,
        /** @var string|null */
        public ?string $postCode=null,
        /** @var string|null */
        public ?string $city=null,
        /** @var string|null */
        public ?string $countryRegionId=null,
        /** @var string|null */
        public ?string $projectStatus=null,
        /** @var DateTime|null */
        public ?DateTime $startingDate=null,
        /** @var DateTime|null */
        public ?DateTime $endingDate=null,
        /** @var string|null */
        public ?string $contactId=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['systemId'])) $this->systemId = $o['systemId'];
        if (isset($o['digiOfficeId'])) $this->digiOfficeId = $o['digiOfficeId'];
        if (isset($o['companyId'])) $this->companyId = $o['companyId'];
        if (isset($o['no'])) $this->no = $o['no'];
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['description2'])) $this->description2 = $o['description2'];
        if (isset($o['visitAddress'])) $this->visitAddress = $o['visitAddress'];
        if (isset($o['visitAddress2'])) $this->visitAddress2 = $o['visitAddress2'];
        if (isset($o['visitAddressPostCode'])) $this->visitAddressPostCode = $o['visitAddressPostCode'];
        if (isset($o['visitAddressCity'])) $this->visitAddressCity = $o['visitAddressCity'];
        if (isset($o['visitAddressCountryRegionId'])) $this->visitAddressCountryRegionId = $o['visitAddressCountryRegionId'];
        if (isset($o['address'])) $this->address = $o['address'];
        if (isset($o['postCode'])) $this->postCode = $o['postCode'];
        if (isset($o['city'])) $this->city = $o['city'];
        if (isset($o['countryRegionId'])) $this->countryRegionId = $o['countryRegionId'];
        if (isset($o['projectStatus'])) $this->projectStatus = $o['projectStatus'];
        if (isset($o['startingDate'])) $this->startingDate = JsonConverters::from('DateTime', $o['startingDate']);
        if (isset($o['endingDate'])) $this->endingDate = JsonConverters::from('DateTime', $o['endingDate']);
        if (isset($o['contactId'])) $this->contactId = $o['contactId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->systemId)) $o['systemId'] = $this->systemId;
        if (isset($this->digiOfficeId)) $o['digiOfficeId'] = $this->digiOfficeId;
        if (isset($this->companyId)) $o['companyId'] = $this->companyId;
        if (isset($this->no)) $o['no'] = $this->no;
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->description2)) $o['description2'] = $this->description2;
        if (isset($this->visitAddress)) $o['visitAddress'] = $this->visitAddress;
        if (isset($this->visitAddress2)) $o['visitAddress2'] = $this->visitAddress2;
        if (isset($this->visitAddressPostCode)) $o['visitAddressPostCode'] = $this->visitAddressPostCode;
        if (isset($this->visitAddressCity)) $o['visitAddressCity'] = $this->visitAddressCity;
        if (isset($this->visitAddressCountryRegionId)) $o['visitAddressCountryRegionId'] = $this->visitAddressCountryRegionId;
        if (isset($this->address)) $o['address'] = $this->address;
        if (isset($this->postCode)) $o['postCode'] = $this->postCode;
        if (isset($this->city)) $o['city'] = $this->city;
        if (isset($this->countryRegionId)) $o['countryRegionId'] = $this->countryRegionId;
        if (isset($this->projectStatus)) $o['projectStatus'] = $this->projectStatus;
        if (isset($this->startingDate)) $o['startingDate'] = JsonConverters::to('DateTime', $this->startingDate);
        if (isset($this->endingDate)) $o['endingDate'] = JsonConverters::to('DateTime', $this->endingDate);
        if (isset($this->contactId)) $o['contactId'] = $this->contactId;
        return empty($o) ? new class(){} : $o;
    }
}

/** @description Import project record vanuit 4PS */
// @Api(Description="Import project record vanuit 4PS")
class IDB_4PSBC_Import_Project implements JsonSerializable
{
    public function __construct(
        /** @description Message header */
        // @ApiMember(Description="Message header", IsRequired=true)
        /** @var Header|null */
        public ?Header $Header=null,

        /** @description Message data */
        // @ApiMember(Description="Message data", IsRequired=true)
        /** @var Data_Project|null */
        public ?Data_Project $Data=null
    ) {
    }

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

PHP IDB_4PSBC_Import_Project DTOs

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

HTTP + JSV

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

POST /api/4PSBC/ImportProject HTTP/1.1 
Host: dogw.klokgroep.nl 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Header: 
	{
		Contains: String,
		Date: String,
		MessageID: String,
		Sender: String
	},
	Data: 
	{
		systemId: 00000000-0000-0000-0000-000000000000,
		digiOfficeId: 00000000-0000-0000-0000-000000000000,
		companyId: 00000000-0000-0000-0000-000000000000,
		no: String,
		description: String,
		description2: String,
		visitAddress: String,
		visitAddress2: String,
		visitAddressPostCode: String,
		visitAddressCity: String,
		visitAddressCountryRegionId: String,
		address: String,
		postCode: String,
		city: String,
		countryRegionId: String,
		projectStatus: String,
		startingDate: 0001-01-01,
		endingDate: 0001-01-01,
		contactId: 00000000-0000-0000-0000-000000000000
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Header: 
	{
		Contains: String,
		Date: String,
		MessageID: String,
		Sender: String
	},
	Response: 
	{
		Status: String,
		Errors: String,
		DigiOfficeProjectID: String
	}
}