Trendsic Platform Service

<back to all web services

BranchApptContactsRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/queue/appointments/contacts
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class BranchApptContact implements IConvertible
{
    int? ContactId;
    String? ContactGuid;
    String? Name;
    String? Phone;
    String? Email;
    int? PastVisits;
    DateTime? LastVisitLocal;
    DateTime? NextLocal;
    bool? PhoneMatch;
    bool? EmailMatch;

    BranchApptContact({this.ContactId,this.ContactGuid,this.Name,this.Phone,this.Email,this.PastVisits,this.LastVisitLocal,this.NextLocal,this.PhoneMatch,this.EmailMatch});
    BranchApptContact.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContactId = json['ContactId'];
        ContactGuid = json['ContactGuid'];
        Name = json['Name'];
        Phone = json['Phone'];
        Email = json['Email'];
        PastVisits = json['PastVisits'];
        LastVisitLocal = JsonConverters.fromJson(json['LastVisitLocal'],'DateTime',context!);
        NextLocal = JsonConverters.fromJson(json['NextLocal'],'DateTime',context!);
        PhoneMatch = json['PhoneMatch'];
        EmailMatch = json['EmailMatch'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContactId': ContactId,
        'ContactGuid': ContactGuid,
        'Name': Name,
        'Phone': Phone,
        'Email': Email,
        'PastVisits': PastVisits,
        'LastVisitLocal': JsonConverters.toJson(LastVisitLocal,'DateTime',context!),
        'NextLocal': JsonConverters.toJson(NextLocal,'DateTime',context!),
        'PhoneMatch': PhoneMatch,
        'EmailMatch': EmailMatch
    };

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

class BranchApptContactsResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<BranchApptContact>? Contacts = [];
    BranchApptContact? Duplicate;

    BranchApptContactsResponse({this.ResponseStatus,this.Contacts,this.Duplicate});
    BranchApptContactsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Contacts': JsonConverters.toJson(Contacts,'List<BranchApptContact>',context!),
        'Duplicate': JsonConverters.toJson(Duplicate,'BranchApptContact',context!)
    };

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

class BranchApptContactsRequest implements IConvertible
{
    String? LocationId;
    String? Q;
    String? Phone;
    String? Email;

    BranchApptContactsRequest({this.LocationId,this.Q,this.Phone,this.Email});
    BranchApptContactsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        LocationId = json['LocationId'];
        Q = json['Q'];
        Phone = json['Phone'];
        Email = json['Email'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'LocationId': LocationId,
        'Q': Q,
        'Phone': Phone,
        'Email': Email
    };

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'BranchApptContact': TypeInfo(TypeOf.Class, create:() => BranchApptContact()),
    'BranchApptContactsResponse': TypeInfo(TypeOf.Class, create:() => BranchApptContactsResponse()),
    'List<BranchApptContact>': TypeInfo(TypeOf.Class, create:() => <BranchApptContact>[]),
    'BranchApptContactsRequest': TypeInfo(TypeOf.Class, create:() => BranchApptContactsRequest()),
});

Dart BranchApptContactsRequest 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 /v1/queue/appointments/contacts HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Contacts: 
	[
		{
			ContactId: 0,
			ContactGuid: 00000000000000000000000000000000,
			Name: String,
			Phone: String,
			Email: String,
			PastVisits: 0,
			LastVisitLocal: 0001-01-01,
			NextLocal: 0001-01-01,
			PhoneMatch: False,
			EmailMatch: False
		}
	],
	Duplicate: 
	{
		ContactId: 0,
		ContactGuid: 00000000000000000000000000000000,
		Name: String,
		Phone: String,
		Email: String,
		PastVisits: 0,
		LastVisitLocal: 0001-01-01,
		NextLocal: 0001-01-01,
		PhoneMatch: False,
		EmailMatch: False
	}
}