Sanctions Search API: v1

<back to all web services

GetCompanySearch

Sanctions
The following routes are available for this service:
POST/sanctions/entity/getCreate a get a sanctions search for an entityThis will get a new sanctions search for an entity, such as a company, vessel, organisation, or group.
<?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};


// @DataContract
class ResponseError implements JsonSerializable
{
    public function __construct(
        // @DataMember(Order=1)
        /** @var string|null */
        public ?string $ErrorCode=null,

        // @DataMember(Order=2)
        /** @var string|null */
        public ?string $FieldName=null,

        // @DataMember(Order=3)
        /** @var string|null */
        public ?string $Message=null
    ) {
    }

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

/**
 * @template array of ResponseError
 */
class ArrayOfResponseError extends \ArrayObject implements JsonSerializable
{
    public function __construct(ResponseError ...$items) {
        parent::__construct($items, \ArrayObject::STD_PROP_LIST);
    }
    
    /** @throws \Exception */
    public function append($value): void {
        if ($value instanceof ResponseError)
            parent::append($value);
        else
            throw new \Exception("Can only append a ResponseError to " . __CLASS__);
    }
    
    /** @throws Exception */
    public function fromMap($o): void {
        foreach ($o as $item) {
            $el = new ResponseError();
            $el->fromMap($item);
            $this->append($el);
        }
    }
    
    /** @throws Exception */
    public function jsonSerialize(): array {
        return parent::getArrayCopy();
    }
}

// @DataContract
class ResponseStatus implements JsonSerializable
{
    public function __construct(
        // @DataMember(Order=1)
        /** @var string|null */
        public ?string $ErrorCode=null,

        // @DataMember(Order=2)
        /** @var string|null */
        public ?string $Message=null,

        // @DataMember(Order=3)
        /** @var string|null */
        public ?string $StackTrace=null,

        // @DataMember(Order=4)
        /** @var ArrayOfResponseError|null */
        public ?ArrayOfResponseError $Errors=null
    ) {
    }

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

class SearchCriteria implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $DateOfBirth=null,
        /** @var string|null */
        public ?string $CountryOfBirth=null,
        /** @var string|null */
        public ?string $Nationality=null,
        /** @var string|null */
        public ?string $Address=null
    ) {
    }

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

class SearchResultHmTreasury implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ResultStrength=0,
        /** @var float */
        public float $ResultSimilarity=0.0,
        /** @var bool|null */
        public ?bool $ResultResolved=null,
        /** @var string|null */
        public ?string $ResultType=null,
        /** @var DateTime */
        public DateTime $DateListed=new DateTime(),
        /** @var DateTime */
        public DateTime $DateUpdated=new DateTime(),
        /** @var string|null */
        public ?string $Name1=null,
        /** @var string|null */
        public ?string $Name2=null,
        /** @var string|null */
        public ?string $Name3=null,
        /** @var string|null */
        public ?string $Name4=null,
        /** @var string|null */
        public ?string $Name5=null,
        /** @var string|null */
        public ?string $Name6=null,
        /** @var string|null */
        public ?string $DateOfBirth=null,
        /** @var string|null */
        public ?string $CountryOfBirth=null,
        /** @var string|null */
        public ?string $Nationality=null,
        /** @var string|null */
        public ?string $Address1=null,
        /** @var string|null */
        public ?string $Address2=null,
        /** @var string|null */
        public ?string $Address3=null,
        /** @var string|null */
        public ?string $Address4=null,
        /** @var string|null */
        public ?string $Address5=null,
        /** @var string|null */
        public ?string $Address6=null,
        /** @var string|null */
        public ?string $PostCode=null,
        /** @var string|null */
        public ?string $Country=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ResultStrength'])) $this->ResultStrength = $o['ResultStrength'];
        if (isset($o['ResultSimilarity'])) $this->ResultSimilarity = $o['ResultSimilarity'];
        if (isset($o['ResultResolved'])) $this->ResultResolved = $o['ResultResolved'];
        if (isset($o['ResultType'])) $this->ResultType = $o['ResultType'];
        if (isset($o['DateListed'])) $this->DateListed = JsonConverters::from('DateTime', $o['DateListed']);
        if (isset($o['DateUpdated'])) $this->DateUpdated = JsonConverters::from('DateTime', $o['DateUpdated']);
        if (isset($o['Name1'])) $this->Name1 = $o['Name1'];
        if (isset($o['Name2'])) $this->Name2 = $o['Name2'];
        if (isset($o['Name3'])) $this->Name3 = $o['Name3'];
        if (isset($o['Name4'])) $this->Name4 = $o['Name4'];
        if (isset($o['Name5'])) $this->Name5 = $o['Name5'];
        if (isset($o['Name6'])) $this->Name6 = $o['Name6'];
        if (isset($o['DateOfBirth'])) $this->DateOfBirth = $o['DateOfBirth'];
        if (isset($o['CountryOfBirth'])) $this->CountryOfBirth = $o['CountryOfBirth'];
        if (isset($o['Nationality'])) $this->Nationality = $o['Nationality'];
        if (isset($o['Address1'])) $this->Address1 = $o['Address1'];
        if (isset($o['Address2'])) $this->Address2 = $o['Address2'];
        if (isset($o['Address3'])) $this->Address3 = $o['Address3'];
        if (isset($o['Address4'])) $this->Address4 = $o['Address4'];
        if (isset($o['Address5'])) $this->Address5 = $o['Address5'];
        if (isset($o['Address6'])) $this->Address6 = $o['Address6'];
        if (isset($o['PostCode'])) $this->PostCode = $o['PostCode'];
        if (isset($o['Country'])) $this->Country = $o['Country'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ResultStrength)) $o['ResultStrength'] = $this->ResultStrength;
        if (isset($this->ResultSimilarity)) $o['ResultSimilarity'] = $this->ResultSimilarity;
        if (isset($this->ResultResolved)) $o['ResultResolved'] = $this->ResultResolved;
        if (isset($this->ResultType)) $o['ResultType'] = $this->ResultType;
        if (isset($this->DateListed)) $o['DateListed'] = JsonConverters::to('DateTime', $this->DateListed);
        if (isset($this->DateUpdated)) $o['DateUpdated'] = JsonConverters::to('DateTime', $this->DateUpdated);
        if (isset($this->Name1)) $o['Name1'] = $this->Name1;
        if (isset($this->Name2)) $o['Name2'] = $this->Name2;
        if (isset($this->Name3)) $o['Name3'] = $this->Name3;
        if (isset($this->Name4)) $o['Name4'] = $this->Name4;
        if (isset($this->Name5)) $o['Name5'] = $this->Name5;
        if (isset($this->Name6)) $o['Name6'] = $this->Name6;
        if (isset($this->DateOfBirth)) $o['DateOfBirth'] = $this->DateOfBirth;
        if (isset($this->CountryOfBirth)) $o['CountryOfBirth'] = $this->CountryOfBirth;
        if (isset($this->Nationality)) $o['Nationality'] = $this->Nationality;
        if (isset($this->Address1)) $o['Address1'] = $this->Address1;
        if (isset($this->Address2)) $o['Address2'] = $this->Address2;
        if (isset($this->Address3)) $o['Address3'] = $this->Address3;
        if (isset($this->Address4)) $o['Address4'] = $this->Address4;
        if (isset($this->Address5)) $o['Address5'] = $this->Address5;
        if (isset($this->Address6)) $o['Address6'] = $this->Address6;
        if (isset($this->PostCode)) $o['PostCode'] = $this->PostCode;
        if (isset($this->Country)) $o['Country'] = $this->Country;
        return empty($o) ? new class(){} : $o;
    }
}

class SearchResultOfacAddress implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Address1=null,
        /** @var string|null */
        public ?string $Address2=null,
        /** @var string|null */
        public ?string $Address3=null,
        /** @var string|null */
        public ?string $City=null,
        /** @var string|null */
        public ?string $State=null,
        /** @var string|null */
        public ?string $PostCode=null,
        /** @var string|null */
        public ?string $Country=null
    ) {
    }

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

class SearchResultOfacAka implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $FirstName=null,
        /** @var string|null */
        public ?string $LastName=null,
        /** @var string|null */
        public ?string $Type=null,
        /** @var string|null */
        public ?string $Strength=null
    ) {
    }

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

class SearchResultOfacDateOfBirth implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $DateOfBirth=null
    ) {
    }

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

class SearchResultOfacNationality implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Country=null
    ) {
    }

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

class SearchResultOfacPlaceOfBirth implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $PlaceOfBirth=null
    ) {
    }

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

class SearchResultOfac implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ResultStrength=0,
        /** @var float */
        public float $ResultSimilarity=0.0,
        /** @var bool|null */
        public ?bool $ResultResolved=null,
        /** @var string|null */
        public ?string $ResultType=null,
        /** @var DateTime */
        public DateTime $DateUpdated=new DateTime(),
        /** @var string|null */
        public ?string $FirstName=null,
        /** @var string|null */
        public ?string $LastName=null,
        /** @var array<SearchResultOfacAddress>|null */
        public ?array $Addresses=null,
        /** @var array<SearchResultOfacAka>|null */
        public ?array $Akas=null,
        /** @var array<SearchResultOfacDateOfBirth>|null */
        public ?array $DateOfBirths=null,
        /** @var array<SearchResultOfacNationality>|null */
        public ?array $Nationalities=null,
        /** @var array<SearchResultOfacPlaceOfBirth>|null */
        public ?array $PlaceOfBirths=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ResultStrength'])) $this->ResultStrength = $o['ResultStrength'];
        if (isset($o['ResultSimilarity'])) $this->ResultSimilarity = $o['ResultSimilarity'];
        if (isset($o['ResultResolved'])) $this->ResultResolved = $o['ResultResolved'];
        if (isset($o['ResultType'])) $this->ResultType = $o['ResultType'];
        if (isset($o['DateUpdated'])) $this->DateUpdated = JsonConverters::from('DateTime', $o['DateUpdated']);
        if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
        if (isset($o['LastName'])) $this->LastName = $o['LastName'];
        if (isset($o['Addresses'])) $this->Addresses = JsonConverters::fromArray('SearchResultOfacAddress', $o['Addresses']);
        if (isset($o['Akas'])) $this->Akas = JsonConverters::fromArray('SearchResultOfacAka', $o['Akas']);
        if (isset($o['DateOfBirths'])) $this->DateOfBirths = JsonConverters::fromArray('SearchResultOfacDateOfBirth', $o['DateOfBirths']);
        if (isset($o['Nationalities'])) $this->Nationalities = JsonConverters::fromArray('SearchResultOfacNationality', $o['Nationalities']);
        if (isset($o['PlaceOfBirths'])) $this->PlaceOfBirths = JsonConverters::fromArray('SearchResultOfacPlaceOfBirth', $o['PlaceOfBirths']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ResultStrength)) $o['ResultStrength'] = $this->ResultStrength;
        if (isset($this->ResultSimilarity)) $o['ResultSimilarity'] = $this->ResultSimilarity;
        if (isset($this->ResultResolved)) $o['ResultResolved'] = $this->ResultResolved;
        if (isset($this->ResultType)) $o['ResultType'] = $this->ResultType;
        if (isset($this->DateUpdated)) $o['DateUpdated'] = JsonConverters::to('DateTime', $this->DateUpdated);
        if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
        if (isset($this->LastName)) $o['LastName'] = $this->LastName;
        if (isset($this->Addresses)) $o['Addresses'] = JsonConverters::toArray('SearchResultOfacAddress', $this->Addresses);
        if (isset($this->Akas)) $o['Akas'] = JsonConverters::toArray('SearchResultOfacAka', $this->Akas);
        if (isset($this->DateOfBirths)) $o['DateOfBirths'] = JsonConverters::toArray('SearchResultOfacDateOfBirth', $this->DateOfBirths);
        if (isset($this->Nationalities)) $o['Nationalities'] = JsonConverters::toArray('SearchResultOfacNationality', $this->Nationalities);
        if (isset($this->PlaceOfBirths)) $o['PlaceOfBirths'] = JsonConverters::toArray('SearchResultOfacPlaceOfBirth', $this->PlaceOfBirths);
        return empty($o) ? new class(){} : $o;
    }
}

class SearchResults implements JsonSerializable
{
    public function __construct(
        /** @var array<SearchResultHmTreasury>|null */
        public ?array $HMTResults=null,
        /** @var array<SearchResultOfac>|null */
        public ?array $OfacResults=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['HMTResults'])) $this->HMTResults = JsonConverters::fromArray('SearchResultHmTreasury', $o['HMTResults']);
        if (isset($o['OfacResults'])) $this->OfacResults = JsonConverters::fromArray('SearchResultOfac', $o['OfacResults']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->HMTResults)) $o['HMTResults'] = JsonConverters::toArray('SearchResultHmTreasury', $this->HMTResults);
        if (isset($this->OfacResults)) $o['OfacResults'] = JsonConverters::toArray('SearchResultOfac', $this->OfacResults);
        return empty($o) ? new class(){} : $o;
    }
}

class SearchRecord implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $SearchType=null,
        /** @var DateTime */
        public DateTime $DateSearched=new DateTime(),
        /** @var DateTime */
        public DateTime $DateUpdated=new DateTime(),
        /** @var int */
        public int $NumOfResults=0,
        /** @var bool|null */
        public ?bool $ClientInResults=null,
        /** @var bool|null */
        public ?bool $ClientNotInResults=null,
        /** @var bool|null */
        public ?bool $AffectedByUpdate=null,
        /** @var SearchCriteria|null */
        public ?SearchCriteria $SearchCriteria=null,
        /** @var SearchResults|null */
        public ?SearchResults $SearchResults=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['SearchType'])) $this->SearchType = $o['SearchType'];
        if (isset($o['DateSearched'])) $this->DateSearched = JsonConverters::from('DateTime', $o['DateSearched']);
        if (isset($o['DateUpdated'])) $this->DateUpdated = JsonConverters::from('DateTime', $o['DateUpdated']);
        if (isset($o['NumOfResults'])) $this->NumOfResults = $o['NumOfResults'];
        if (isset($o['ClientInResults'])) $this->ClientInResults = $o['ClientInResults'];
        if (isset($o['ClientNotInResults'])) $this->ClientNotInResults = $o['ClientNotInResults'];
        if (isset($o['AffectedByUpdate'])) $this->AffectedByUpdate = $o['AffectedByUpdate'];
        if (isset($o['SearchCriteria'])) $this->SearchCriteria = JsonConverters::from('SearchCriteria', $o['SearchCriteria']);
        if (isset($o['SearchResults'])) $this->SearchResults = JsonConverters::from('SearchResults', $o['SearchResults']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->SearchType)) $o['SearchType'] = $this->SearchType;
        if (isset($this->DateSearched)) $o['DateSearched'] = JsonConverters::to('DateTime', $this->DateSearched);
        if (isset($this->DateUpdated)) $o['DateUpdated'] = JsonConverters::to('DateTime', $this->DateUpdated);
        if (isset($this->NumOfResults)) $o['NumOfResults'] = $this->NumOfResults;
        if (isset($this->ClientInResults)) $o['ClientInResults'] = $this->ClientInResults;
        if (isset($this->ClientNotInResults)) $o['ClientNotInResults'] = $this->ClientNotInResults;
        if (isset($this->AffectedByUpdate)) $o['AffectedByUpdate'] = $this->AffectedByUpdate;
        if (isset($this->SearchCriteria)) $o['SearchCriteria'] = JsonConverters::to('SearchCriteria', $this->SearchCriteria);
        if (isset($this->SearchResults)) $o['SearchResults'] = JsonConverters::to('SearchResults', $this->SearchResults);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class GetCompanySearchData implements IBaseDataResponse, IHasResponseStatus, JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,

        // @DataMember
        /** @var SearchRecord|null */
        public ?SearchRecord $SearchRecord=null
    ) {
    }

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

// @DataContract
class GetCompanySearchResponse implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var GetCompanySearchData|null */
        public ?GetCompanySearchData $Data=null
    ) {
    }

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

// @DataContract
class Authentication implements IAuthentication, JsonSerializable
{
    public function __construct(
        /** @description The API User ID that will authenticate your request */
        // @DataMember
        // @ApiMember(DataType="string", Description="The API User ID that will authenticate your request", IsRequired=true)
        /** @var string */
        public string $ApiUserId='',

        /** @description The API User Key that will authenticate your request */
        // @DataMember
        // @ApiMember(DataType="string", Description="The API User Key that will authenticate your request", IsRequired=true)
        /** @var string */
        public string $ApiUserKey=''
    ) {
    }

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

// @ApiResponse(Description="Your request is successful if the \"<em>Data.ResponseStatus.Message</em>\" field is \"<b>Success</b>\".", StatusCode=200)
// @DataContract
class GetCompanySearch implements IBaseRequest, JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var Authentication|null */
        public ?Authentication $Authentication=null,

        // @DataMember
        /** @var int */
        public int $Id=0
    ) {
    }

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

PHP GetCompanySearch DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /sanctions/entity/get HTTP/1.1 
Host: api.sanctionssearch.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Authentication":{"ApiUserId":"String","ApiUserKey":"String"},"Id":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Data":{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String"}]},"SearchRecord":{"Id":0,"SearchType":"String","DateSearched":"\/Date(-62135596800000-0000)\/","DateUpdated":"\/Date(-62135596800000-0000)\/","NumOfResults":0,"ClientInResults":false,"ClientNotInResults":false,"AffectedByUpdate":false,"SearchCriteria":{"Name":"String","DateOfBirth":"String","CountryOfBirth":"String","Nationality":"String","Address":"String"},"SearchResults":{"HMTResults":[{"ResultStrength":0,"ResultSimilarity":0,"ResultResolved":false,"ResultType":"String","DateListed":"\/Date(-62135596800000-0000)\/","DateUpdated":"\/Date(-62135596800000-0000)\/","Name1":"String","Name2":"String","Name3":"String","Name4":"String","Name5":"String","Name6":"String","DateOfBirth":"String","CountryOfBirth":"String","Nationality":"String","Address1":"String","Address2":"String","Address3":"String","Address4":"String","Address5":"String","Address6":"String","PostCode":"String","Country":"String"}],"OfacResults":[{"ResultStrength":0,"ResultSimilarity":0,"ResultResolved":false,"ResultType":"String","DateUpdated":"\/Date(-62135596800000-0000)\/","FirstName":"String","LastName":"String","Addresses":[{"Address1":"String","Address2":"String","Address3":"String","City":"String","State":"String","PostCode":"String","Country":"String"}],"Akas":[{"FirstName":"String","LastName":"String","Type":"String","Strength":"String"}],"DateOfBirths":[{"DateOfBirth":"String"}],"Nationalities":[{"Country":"String"}],"PlaceOfBirths":[{"PlaceOfBirth":"String"}]}]}}}}