<back to all web services

TouchpointRequestDto

The following routes are available for this service:
GET/RestApi/sitefinity/data-intelligence/touchpoint
import 'package:servicestack/servicestack.dart';

class TouchpointRequestDto implements IConvertible
{
    String? Filter;

    TouchpointRequestDto({this.Filter});
    TouchpointRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Filter = json['Filter'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Filter': Filter
    };

    getTypeName() => "TouchpointRequestDto";
    TypeContext? context = _ctx;
}

enum MatchingOperator
{
    ExactMatch,
    Contains,
    StartsWith,
    EndsWith,
    UrlStrippedMatch,
}

class ConditionPart implements IConvertible
{
    int? Id;
    String? Predicate;
    bool? IsNegated;
    MatchingOperator? PredicateOperator;
    MatchingOperator? ObjectOperator;
    List<String>? Objects;
    String? ClientAttribute;
    String? ContactPropertyId;
    Map<String,String?>? ObjectMetadata;
    Map<String,String?>? UrlParameters;

    ConditionPart({this.Id,this.Predicate,this.IsNegated,this.PredicateOperator,this.ObjectOperator,this.Objects,this.ClientAttribute,this.ContactPropertyId,this.ObjectMetadata,this.UrlParameters});
    ConditionPart.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Predicate = json['Predicate'];
        IsNegated = json['IsNegated'];
        PredicateOperator = JsonConverters.fromJson(json['PredicateOperator'],'MatchingOperator',context!);
        ObjectOperator = JsonConverters.fromJson(json['ObjectOperator'],'MatchingOperator',context!);
        Objects = JsonConverters.fromJson(json['Objects'],'List<String>',context!);
        ClientAttribute = json['ClientAttribute'];
        ContactPropertyId = json['ContactPropertyId'];
        ObjectMetadata = JsonConverters.toStringMap(json['ObjectMetadata']);
        UrlParameters = JsonConverters.toStringMap(json['UrlParameters']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Predicate': Predicate,
        'IsNegated': IsNegated,
        'PredicateOperator': JsonConverters.toJson(PredicateOperator,'MatchingOperator',context!),
        'ObjectOperator': JsonConverters.toJson(ObjectOperator,'MatchingOperator',context!),
        'Objects': JsonConverters.toJson(Objects,'List<String>',context!),
        'ClientAttribute': ClientAttribute,
        'ContactPropertyId': ContactPropertyId,
        'ObjectMetadata': ObjectMetadata,
        'UrlParameters': UrlParameters
    };

    getTypeName() => "ConditionPart";
    TypeContext? context = _ctx;
}

class ConditionExpression implements IConvertible
{
    String? Relation;
    List<ConditionPart>? Parts;

    ConditionExpression({this.Relation,this.Parts});
    ConditionExpression.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Relation = json['Relation'];
        Parts = JsonConverters.fromJson(json['Parts'],'List<ConditionPart>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Relation': Relation,
        'Parts': JsonConverters.toJson(Parts,'List<ConditionPart>',context!)
    };

    getTypeName() => "ConditionExpression";
    TypeContext? context = _ctx;
}

enum CalculationState
{
    Inactive,
    Initializing,
    Active,
    ToBeDeleted,
    Error,
    Pending,
    Expired,
}

enum TouchpointType
{
    Touchpoint,
    Discovered,
    Personalization,
    AbVariant,
    AbGoal,
    Content,
}

class Touchpoint implements IConvertible
{
    int? Id;
    String? Name;
    ConditionExpression? Definition;
    CalculationState? State;
    DateTime? CreatedOn;
    String? CreatedByUserId;
    DateTime? ModifiedOn;
    String? ModifiedByUserId;
    int? TotalHits;
    int? TotalMetaClientHits;
    int? AbsoluteHits;
    DateTime? AttributionsCalculatedOn;
    DateTime? StatisticsCalculatedOn;
    String? Errors;
    TouchpointType? TouchpointType;

    Touchpoint({this.Id,this.Name,this.Definition,this.State,this.CreatedOn,this.CreatedByUserId,this.ModifiedOn,this.ModifiedByUserId,this.TotalHits,this.TotalMetaClientHits,this.AbsoluteHits,this.AttributionsCalculatedOn,this.StatisticsCalculatedOn,this.Errors,this.TouchpointType});
    Touchpoint.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Definition = JsonConverters.fromJson(json['Definition'],'ConditionExpression',context!);
        State = JsonConverters.fromJson(json['State'],'CalculationState',context!);
        CreatedOn = JsonConverters.fromJson(json['CreatedOn'],'DateTime',context!);
        CreatedByUserId = json['CreatedByUserId'];
        ModifiedOn = JsonConverters.fromJson(json['ModifiedOn'],'DateTime',context!);
        ModifiedByUserId = json['ModifiedByUserId'];
        TotalHits = json['TotalHits'];
        TotalMetaClientHits = json['TotalMetaClientHits'];
        AbsoluteHits = json['AbsoluteHits'];
        AttributionsCalculatedOn = JsonConverters.fromJson(json['AttributionsCalculatedOn'],'DateTime',context!);
        StatisticsCalculatedOn = JsonConverters.fromJson(json['StatisticsCalculatedOn'],'DateTime',context!);
        Errors = json['Errors'];
        TouchpointType = JsonConverters.fromJson(json['TouchpointType'],'TouchpointType',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Definition': JsonConverters.toJson(Definition,'ConditionExpression',context!),
        'State': JsonConverters.toJson(State,'CalculationState',context!),
        'CreatedOn': JsonConverters.toJson(CreatedOn,'DateTime',context!),
        'CreatedByUserId': CreatedByUserId,
        'ModifiedOn': JsonConverters.toJson(ModifiedOn,'DateTime',context!),
        'ModifiedByUserId': ModifiedByUserId,
        'TotalHits': TotalHits,
        'TotalMetaClientHits': TotalMetaClientHits,
        'AbsoluteHits': AbsoluteHits,
        'AttributionsCalculatedOn': JsonConverters.toJson(AttributionsCalculatedOn,'DateTime',context!),
        'StatisticsCalculatedOn': JsonConverters.toJson(StatisticsCalculatedOn,'DateTime',context!),
        'Errors': Errors,
        'TouchpointType': JsonConverters.toJson(TouchpointType,'TouchpointType',context!)
    };

    getTypeName() => "Touchpoint";
    TypeContext? context = _ctx;
}

class TouchpointsViewModel implements IConvertible
{
    List<Touchpoint>? Touchpoints;

    TouchpointsViewModel({this.Touchpoints});
    TouchpointsViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Touchpoints = JsonConverters.fromJson(json['Touchpoints'],'List<Touchpoint>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Touchpoints': JsonConverters.toJson(Touchpoints,'List<Touchpoint>',context!)
    };

    getTypeName() => "TouchpointsViewModel";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'TouchpointRequestDto': TypeInfo(TypeOf.Class, create:() => TouchpointRequestDto()),
    'MatchingOperator': TypeInfo(TypeOf.Enum, enumValues:MatchingOperator.values),
    'ConditionPart': TypeInfo(TypeOf.Class, create:() => ConditionPart()),
    'ConditionExpression': TypeInfo(TypeOf.Class, create:() => ConditionExpression()),
    'List<ConditionPart>': TypeInfo(TypeOf.Class, create:() => <ConditionPart>[]),
    'CalculationState': TypeInfo(TypeOf.Enum, enumValues:CalculationState.values),
    'TouchpointType': TypeInfo(TypeOf.Enum, enumValues:TouchpointType.values),
    'Touchpoint': TypeInfo(TypeOf.Class, create:() => Touchpoint()),
    'TouchpointsViewModel': TypeInfo(TypeOf.Class, create:() => TouchpointsViewModel()),
    'List<Touchpoint>': TypeInfo(TypeOf.Class, create:() => <Touchpoint>[]),
});

Dart TouchpointRequestDto DTOs

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

HTTP + CSV

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

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

{}