<back to all web services

ContactPropertiesRequestDto

The following routes are available for this service:
GET/RestApi/sitefinity/data-intelligence/contact-properties
<?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 ContactPropertiesRequestDto implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Filter=null
    ) {
    }

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

enum ContactPropertyState : int
{
    case Initialized = 1;
    case Processing = 2;
    case Active = 3;
    case Updated = 4;
    case Deleted = 5;
    case Error = 6;
    case HiddenInUI = 7;
}

class ContactPropertyAlias implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var string */
        public string $PropId='',
        /** @var string|null */
        public ?string $Name=null,
        /** @var float */
        public float $Priority=0.0
    ) {
    }

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

class ContactProperty implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var string */
        public string $DatacenterId='',
        /** @var bool|null */
        public ?bool $IsIdentifier=null,
        /** @var bool|null */
        public ?bool $IsIndexed=null,
        /** @var int|null */
        public ?int $DataVolumeRank=null,
        /** @var float */
        public float $Order=0.0,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $ColumnName=null,
        /** @var string|null */
        public ?string $TableName=null,
        /** @var ContactPropertyState|null */
        public ?ContactPropertyState $State=null,
        /** @var int */
        public int $DataType=0,
        /** @var array<ContactPropertyAlias>|null */
        public ?array $Aliases=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['DatacenterId'])) $this->DatacenterId = $o['DatacenterId'];
        if (isset($o['IsIdentifier'])) $this->IsIdentifier = $o['IsIdentifier'];
        if (isset($o['IsIndexed'])) $this->IsIndexed = $o['IsIndexed'];
        if (isset($o['DataVolumeRank'])) $this->DataVolumeRank = $o['DataVolumeRank'];
        if (isset($o['Order'])) $this->Order = $o['Order'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['ColumnName'])) $this->ColumnName = $o['ColumnName'];
        if (isset($o['TableName'])) $this->TableName = $o['TableName'];
        if (isset($o['State'])) $this->State = JsonConverters::from('ContactPropertyState', $o['State']);
        if (isset($o['DataType'])) $this->DataType = $o['DataType'];
        if (isset($o['Aliases'])) $this->Aliases = JsonConverters::fromArray('ContactPropertyAlias', $o['Aliases']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->DatacenterId)) $o['DatacenterId'] = $this->DatacenterId;
        if (isset($this->IsIdentifier)) $o['IsIdentifier'] = $this->IsIdentifier;
        if (isset($this->IsIndexed)) $o['IsIndexed'] = $this->IsIndexed;
        if (isset($this->DataVolumeRank)) $o['DataVolumeRank'] = $this->DataVolumeRank;
        if (isset($this->Order)) $o['Order'] = $this->Order;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->ColumnName)) $o['ColumnName'] = $this->ColumnName;
        if (isset($this->TableName)) $o['TableName'] = $this->TableName;
        if (isset($this->State)) $o['State'] = JsonConverters::to('ContactPropertyState', $this->State);
        if (isset($this->DataType)) $o['DataType'] = $this->DataType;
        if (isset($this->Aliases)) $o['Aliases'] = JsonConverters::toArray('ContactPropertyAlias', $this->Aliases);
        return empty($o) ? new class(){} : $o;
    }
}

class ContactPropertiesViewModel implements JsonSerializable
{
    public function __construct(
        /** @var array<ContactProperty>|null */
        public ?array $ContactProperties=null,
        /** @var string|null */
        public ?string $DecAppUrl=null
    ) {
    }

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

PHP ContactPropertiesRequestDto DTOs

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

HTTP + OTHER

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

GET /RestApi/sitefinity/data-intelligence/contact-properties HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"DecAppUrl":"String"}