DigiOffice Gateway Web Services

<back to all web services

GetCompanyLookupDetails

Requires Authentication
The following routes are available for this service:
GET/api/companies/lookup/{ChamberNr}
<?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 CompanyLookupDetails implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ChamberNr=null,
        /** @var string|null */
        public ?string $ChamberEstablishmentNumber=null,
        /** @var string|null */
        public ?string $CompanyLegalName=null,
        /** @var string|null */
        public ?string $CompanyTradeName=null,
        /** @var string|null */
        public ?string $ChamberCity=null,
        /** @var DateTime|null */
        public ?DateTime $ChamberFoundingDate=null,
        /** @var string|null */
        public ?string $EstablishmentStreet=null,
        /** @var string|null */
        public ?string $EstablishmentHouseNr=null,
        /** @var string|null */
        public ?string $EstablishmentHouseNrAddition=null,
        /** @var string|null */
        public ?string $EstablishmentPostalCode=null,
        /** @var string|null */
        public ?string $EstablishmentCity=null,
        /** @var string|null */
        public ?string $EstablishmentCountryTLA=null,
        /** @var string|null */
        public ?string $CorrespondenceStreet=null,
        /** @var string|null */
        public ?string $CorrespondenceHouseNr=null,
        /** @var string|null */
        public ?string $CorrespondenceHouseNrAddition=null,
        /** @var string|null */
        public ?string $CorrespondencePostalCode=null,
        /** @var string|null */
        public ?string $CorrespondenceCity=null,
        /** @var string|null */
        public ?string $CorrespondenceCountryTLA=null,
        /** @var string|null */
        public ?string $Website=null,
        /** @var string|null */
        public ?string $Telephone=null,
        /** @var string|null */
        public ?string $Mobile=null,
        /** @var string|null */
        public ?string $EMail=null,
        /** @var bool|null */
        public ?bool $DebtorInPossession=null,
        /** @var bool|null */
        public ?bool $Bankrupt=null,
        /** @var array<string,Object>|null */
        public ?array $ExtraFields=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ChamberNr'])) $this->ChamberNr = $o['ChamberNr'];
        if (isset($o['ChamberEstablishmentNumber'])) $this->ChamberEstablishmentNumber = $o['ChamberEstablishmentNumber'];
        if (isset($o['CompanyLegalName'])) $this->CompanyLegalName = $o['CompanyLegalName'];
        if (isset($o['CompanyTradeName'])) $this->CompanyTradeName = $o['CompanyTradeName'];
        if (isset($o['ChamberCity'])) $this->ChamberCity = $o['ChamberCity'];
        if (isset($o['ChamberFoundingDate'])) $this->ChamberFoundingDate = JsonConverters::from('DateTime', $o['ChamberFoundingDate']);
        if (isset($o['EstablishmentStreet'])) $this->EstablishmentStreet = $o['EstablishmentStreet'];
        if (isset($o['EstablishmentHouseNr'])) $this->EstablishmentHouseNr = $o['EstablishmentHouseNr'];
        if (isset($o['EstablishmentHouseNrAddition'])) $this->EstablishmentHouseNrAddition = $o['EstablishmentHouseNrAddition'];
        if (isset($o['EstablishmentPostalCode'])) $this->EstablishmentPostalCode = $o['EstablishmentPostalCode'];
        if (isset($o['EstablishmentCity'])) $this->EstablishmentCity = $o['EstablishmentCity'];
        if (isset($o['EstablishmentCountryTLA'])) $this->EstablishmentCountryTLA = $o['EstablishmentCountryTLA'];
        if (isset($o['CorrespondenceStreet'])) $this->CorrespondenceStreet = $o['CorrespondenceStreet'];
        if (isset($o['CorrespondenceHouseNr'])) $this->CorrespondenceHouseNr = $o['CorrespondenceHouseNr'];
        if (isset($o['CorrespondenceHouseNrAddition'])) $this->CorrespondenceHouseNrAddition = $o['CorrespondenceHouseNrAddition'];
        if (isset($o['CorrespondencePostalCode'])) $this->CorrespondencePostalCode = $o['CorrespondencePostalCode'];
        if (isset($o['CorrespondenceCity'])) $this->CorrespondenceCity = $o['CorrespondenceCity'];
        if (isset($o['CorrespondenceCountryTLA'])) $this->CorrespondenceCountryTLA = $o['CorrespondenceCountryTLA'];
        if (isset($o['Website'])) $this->Website = $o['Website'];
        if (isset($o['Telephone'])) $this->Telephone = $o['Telephone'];
        if (isset($o['Mobile'])) $this->Mobile = $o['Mobile'];
        if (isset($o['EMail'])) $this->EMail = $o['EMail'];
        if (isset($o['DebtorInPossession'])) $this->DebtorInPossession = $o['DebtorInPossession'];
        if (isset($o['Bankrupt'])) $this->Bankrupt = $o['Bankrupt'];
        if (isset($o['ExtraFields'])) $this->ExtraFields = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','Object']), $o['ExtraFields']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ChamberNr)) $o['ChamberNr'] = $this->ChamberNr;
        if (isset($this->ChamberEstablishmentNumber)) $o['ChamberEstablishmentNumber'] = $this->ChamberEstablishmentNumber;
        if (isset($this->CompanyLegalName)) $o['CompanyLegalName'] = $this->CompanyLegalName;
        if (isset($this->CompanyTradeName)) $o['CompanyTradeName'] = $this->CompanyTradeName;
        if (isset($this->ChamberCity)) $o['ChamberCity'] = $this->ChamberCity;
        if (isset($this->ChamberFoundingDate)) $o['ChamberFoundingDate'] = JsonConverters::to('DateTime', $this->ChamberFoundingDate);
        if (isset($this->EstablishmentStreet)) $o['EstablishmentStreet'] = $this->EstablishmentStreet;
        if (isset($this->EstablishmentHouseNr)) $o['EstablishmentHouseNr'] = $this->EstablishmentHouseNr;
        if (isset($this->EstablishmentHouseNrAddition)) $o['EstablishmentHouseNrAddition'] = $this->EstablishmentHouseNrAddition;
        if (isset($this->EstablishmentPostalCode)) $o['EstablishmentPostalCode'] = $this->EstablishmentPostalCode;
        if (isset($this->EstablishmentCity)) $o['EstablishmentCity'] = $this->EstablishmentCity;
        if (isset($this->EstablishmentCountryTLA)) $o['EstablishmentCountryTLA'] = $this->EstablishmentCountryTLA;
        if (isset($this->CorrespondenceStreet)) $o['CorrespondenceStreet'] = $this->CorrespondenceStreet;
        if (isset($this->CorrespondenceHouseNr)) $o['CorrespondenceHouseNr'] = $this->CorrespondenceHouseNr;
        if (isset($this->CorrespondenceHouseNrAddition)) $o['CorrespondenceHouseNrAddition'] = $this->CorrespondenceHouseNrAddition;
        if (isset($this->CorrespondencePostalCode)) $o['CorrespondencePostalCode'] = $this->CorrespondencePostalCode;
        if (isset($this->CorrespondenceCity)) $o['CorrespondenceCity'] = $this->CorrespondenceCity;
        if (isset($this->CorrespondenceCountryTLA)) $o['CorrespondenceCountryTLA'] = $this->CorrespondenceCountryTLA;
        if (isset($this->Website)) $o['Website'] = $this->Website;
        if (isset($this->Telephone)) $o['Telephone'] = $this->Telephone;
        if (isset($this->Mobile)) $o['Mobile'] = $this->Mobile;
        if (isset($this->EMail)) $o['EMail'] = $this->EMail;
        if (isset($this->DebtorInPossession)) $o['DebtorInPossession'] = $this->DebtorInPossession;
        if (isset($this->Bankrupt)) $o['Bankrupt'] = $this->Bankrupt;
        if (isset($this->ExtraFields)) $o['ExtraFields'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','Object']), $this->ExtraFields);
        return empty($o) ? new class(){} : $o;
    }
}

class GetCompanyLookupDetails implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ChamberNr=null,
        /** @var string|null */
        public ?string $ChamberEstablishmentNumber=null
    ) {
    }

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

PHP GetCompanyLookupDetails 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.

GET /api/companies/lookup/{ChamberNr} HTTP/1.1 
Host: dogw.klokgroep.nl 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ChamberNr: String,
	ChamberEstablishmentNumber: String,
	CompanyLegalName: String,
	CompanyTradeName: String,
	ChamberCity: String,
	ChamberFoundingDate: 0001-01-01,
	EstablishmentStreet: String,
	EstablishmentHouseNr: String,
	EstablishmentHouseNrAddition: String,
	EstablishmentPostalCode: String,
	EstablishmentCity: String,
	EstablishmentCountryTLA: String,
	CorrespondenceStreet: String,
	CorrespondenceHouseNr: String,
	CorrespondenceHouseNrAddition: String,
	CorrespondencePostalCode: String,
	CorrespondenceCity: String,
	CorrespondenceCountryTLA: String,
	Website: String,
	Telephone: String,
	Mobile: String,
	EMail: String,
	DebtorInPossession: False,
	Bankrupt: False,
	ExtraFields: 
	{
		String: {}
	}
}