DigiOffice API Services Services

<back to all web services

IDB_4PSBC_Import_ContactPerson

Import bedrijf record vanuit 4PS

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

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

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

class Data_ContactPerson 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 */
        public string $crmCompanyId='',
        /** @var string */
        public string $crmPersonId='',
        /** @var string|null */
        public ?string $jobTitle=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 $companyId=null,
        /** @var bool|null */
        public ?bool $blocked=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['crmCompanyId'])) $this->crmCompanyId = $o['crmCompanyId'];
        if (isset($o['crmPersonId'])) $this->crmPersonId = $o['crmPersonId'];
        if (isset($o['jobTitle'])) $this->jobTitle = $o['jobTitle'];
        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['companyId'])) $this->companyId = $o['companyId'];
        if (isset($o['blocked'])) $this->blocked = $o['blocked'];
    }
    
    /** @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->crmCompanyId)) $o['crmCompanyId'] = $this->crmCompanyId;
        if (isset($this->crmPersonId)) $o['crmPersonId'] = $this->crmPersonId;
        if (isset($this->jobTitle)) $o['jobTitle'] = $this->jobTitle;
        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->companyId)) $o['companyId'] = $this->companyId;
        if (isset($this->blocked)) $o['blocked'] = $this->blocked;
        return empty($o) ? new class(){} : $o;
    }
}

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

PHP IDB_4PSBC_Import_ContactPerson 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/4PSBC/ImportContactpersoon HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<IDB_4PSBC_Import_ContactPerson xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DO.Synchronization.IDB_4PSBC.DTO">
  <Data>
    <blocked>false</blocked>
    <companyId>00000000-0000-0000-0000-000000000000</companyId>
    <companyName4ps>String</companyName4ps>
    <crmCompanyId>00000000-0000-0000-0000-000000000000</crmCompanyId>
    <crmPersonId>00000000-0000-0000-0000-000000000000</crmPersonId>
    <digiOfficeId>00000000-0000-0000-0000-000000000000</digiOfficeId>
    <eMail>String</eMail>
    <jobTitle>String</jobTitle>
    <mobilePhoneNo>String</mobilePhoneNo>
    <no>String</no>
    <phoneNo>String</phoneNo>
    <systemId>00000000-0000-0000-0000-000000000000</systemId>
  </Data>
  <Header>
    <Contains>String</Contains>
    <Date>String</Date>
    <MessageID>String</MessageID>
    <Sender>String</Sender>
  </Header>
</IDB_4PSBC_Import_ContactPerson>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<IDB_4PSBC_Response_ContactPerson xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DO.Synchronization.IDB_4PSBC.DTO">
  <Header>
    <Contains>String</Contains>
    <Date>String</Date>
    <MessageID>String</MessageID>
    <Sender>String</Sender>
  </Header>
  <Response>
    <DigiOfficeContactPersonID>String</DigiOfficeContactPersonID>
    <DigiOfficeGlobalID>00000000-0000-0000-0000-000000000000</DigiOfficeGlobalID>
    <Errors>String</Errors>
    <Status>String</Status>
  </Response>
</IDB_4PSBC_Response_ContactPerson>