DigiOffice Gateway Web Services

<back to all web services

IDB_4PSBC_Import_Persoon

Import persoon record vanuit 4PS

Requires Authentication
The following routes are available for this service:
POST/api/4PSBC/ImportPersoon
<?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_Person 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 person in DigiOffice */
        // @ApiMember(Description="ID of the person in DigiOffice", IsRequired=true)
        /** @var string */
        public string $DigiOfficePersoonID='',

        /** @description GlobalID (digiOfficeId) of the person in DigiOffice */
        // @ApiMember(Description="GlobalID (digiOfficeId) of the person 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['DigiOfficePersoonID'])) $this->DigiOfficePersoonID = $o['DigiOfficePersoonID'];
        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->DigiOfficePersoonID)) $o['DigiOfficePersoonID'] = $this->DigiOfficePersoonID;
        if (isset($this->DigiOfficeGlobalID)) $o['DigiOfficeGlobalID'] = $this->DigiOfficeGlobalID;
        return empty($o) ? new class(){} : $o;
    }
}

class IDB_4PSBC_Response_Persoon 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_Person|null */
        public ?Response_Person $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_Person', $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_Person', $this->Response);
        return empty($o) ? new class(){} : $o;
    }
}

class Data_Person implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $systemId=null,
        /** @var string|null */
        public ?string $digiOfficeId=null,
        /** @var string|null */
        public ?string $companyName4ps=null,
        /** @var string|null */
        public ?string $no=null,
        /** @var string|null */
        public ?string $firstName=null,
        /** @var string|null */
        public ?string $middleName=null,
        /** @var string|null */
        public ?string $surname=null,
        /** @var string|null */
        public ?string $gender=null,
        /** @var string|null */
        public ?string $initials=null,
        /** @var string|null */
        public ?string $nameAbbreviation=null,
        /** @var string|null */
        public ?string $title=null,
        /** @var string|null */
        public ?string $titleBehindTheName=null,
        /** @var string|null */
        public ?string $phoneNo=null,
        /** @var string|null */
        public ?string $mobilePhoneNo=null,
        /** @var string|null */
        public ?string $eMail=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 $companyId=null,
        /** @var bool|null */
        public ?bool $blocked=null,
        /** @var string|null */
        public ?string $cocCity=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['companyName4ps'])) $this->companyName4ps = $o['companyName4ps'];
        if (isset($o['no'])) $this->no = $o['no'];
        if (isset($o['firstName'])) $this->firstName = $o['firstName'];
        if (isset($o['middleName'])) $this->middleName = $o['middleName'];
        if (isset($o['surname'])) $this->surname = $o['surname'];
        if (isset($o['gender'])) $this->gender = $o['gender'];
        if (isset($o['initials'])) $this->initials = $o['initials'];
        if (isset($o['nameAbbreviation'])) $this->nameAbbreviation = $o['nameAbbreviation'];
        if (isset($o['title'])) $this->title = $o['title'];
        if (isset($o['titleBehindTheName'])) $this->titleBehindTheName = $o['titleBehindTheName'];
        if (isset($o['phoneNo'])) $this->phoneNo = $o['phoneNo'];
        if (isset($o['mobilePhoneNo'])) $this->mobilePhoneNo = $o['mobilePhoneNo'];
        if (isset($o['eMail'])) $this->eMail = $o['eMail'];
        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['companyId'])) $this->companyId = $o['companyId'];
        if (isset($o['blocked'])) $this->blocked = $o['blocked'];
        if (isset($o['cocCity'])) $this->cocCity = $o['cocCity'];
    }
    
    /** @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->companyName4ps)) $o['companyName4ps'] = $this->companyName4ps;
        if (isset($this->no)) $o['no'] = $this->no;
        if (isset($this->firstName)) $o['firstName'] = $this->firstName;
        if (isset($this->middleName)) $o['middleName'] = $this->middleName;
        if (isset($this->surname)) $o['surname'] = $this->surname;
        if (isset($this->gender)) $o['gender'] = $this->gender;
        if (isset($this->initials)) $o['initials'] = $this->initials;
        if (isset($this->nameAbbreviation)) $o['nameAbbreviation'] = $this->nameAbbreviation;
        if (isset($this->title)) $o['title'] = $this->title;
        if (isset($this->titleBehindTheName)) $o['titleBehindTheName'] = $this->titleBehindTheName;
        if (isset($this->phoneNo)) $o['phoneNo'] = $this->phoneNo;
        if (isset($this->mobilePhoneNo)) $o['mobilePhoneNo'] = $this->mobilePhoneNo;
        if (isset($this->eMail)) $o['eMail'] = $this->eMail;
        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->companyId)) $o['companyId'] = $this->companyId;
        if (isset($this->blocked)) $o['blocked'] = $this->blocked;
        if (isset($this->cocCity)) $o['cocCity'] = $this->cocCity;
        return empty($o) ? new class(){} : $o;
    }
}

/** @description Import persoon record vanuit 4PS */
// @Api(Description="Import persoon record vanuit 4PS")
class IDB_4PSBC_Import_Persoon 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_Person|null */
        public ?Data_Person $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_Person', $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_Person', $this->Data);
        return empty($o) ? new class(){} : $o;
    }
}

PHP IDB_4PSBC_Import_Persoon 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/ImportPersoon 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,
		companyName4ps: String,
		no: String,
		firstName: String,
		middleName: String,
		surname: String,
		gender: String,
		initials: String,
		nameAbbreviation: String,
		title: String,
		titleBehindTheName: String,
		phoneNo: String,
		mobilePhoneNo: String,
		eMail: String,
		visitAddress: String,
		visitAddress2: String,
		visitAddressPostCode: String,
		visitAddressCity: String,
		visitAddressCountryRegionId: String,
		companyId: 00000000-0000-0000-0000-000000000000,
		blocked: False,
		cocCity: String
	}
}
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,
		DigiOfficePersoonID: String
	}
}