Trendsic Platform Service

<back to all web services

ContactConnectionRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET,POST,PUT,OPTIONS/v1/ContactConnections/{ContactId}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class Contact implements IConvertible
{
    int? ContactId;
    int? ContactType;
    String? FirstName;
    String? LastName;
    String? Name;
    String? Role;
    String? Title;
    String? EmailWork;
    String? EmailPersonal;
    String? District;
    int? DistrictID;
    String? School;
    int? SchoolID;
    String? State;
    String? StateName;
    int? StateID;
    int? CountyID;
    String? County;
    String? Phone;
    String? Department;
    String? Flow;
    DateTime? LastContact;
    bool? DoNotContact;
    bool? Active;
    int? AgentId;
    String? PhoneAlt;
    int? PeraContactId;
    String? RoomNumber;
    int? SourceTypeId;
    String? SourceTypeDesc;
    String? SourceNote;
    int? ContactStatusId;
    String? ContactStatusDesc;
    String? SSN;
    DateTime? DateOfBirth;
    bool? Deleted;
    bool? IsShared;
    String? address_line1;
    String? address_city;
    String? address_state;
    String? address_zip;
    String? DeletedBy;
    DateTime? DeletedDateTimeUtc;
    bool? HasNBC;
    bool? HasFactFinderSheet;
    String? MiddleInitial;
    String? Tags;
    DateTime? DateCreated;
    String? PhoneLabel;
    String? AltPhoneLabel;
    String? Carriers;
    String? ContactImage;
    String? CompanyAffiliation;
    String? AdditionalInformation;
    bool? HasGiftCard;
    int? ContactCategory;
    int? WritingAgentId;
    String? WritingAgentName;
    String? MaritalStatus;
    double? TotalDebtAmount;
    int? NumberOfDebtAccounts;
    int? FactFinderCodeId;
    String? BusinessName;
    String? DBA;
    String? ContactGUID;
    DateTime? ProjectEndDate;
    int? Rate;
    int? JobID;
    String? JobName;
    int? JobCount;
    bool? Locked;
    int? LockedByAgentId;
    DateTime? LockedTimestamp;
    String? Initials;
    String? ContactCategoryName;
    bool? SMSOptIn;

    Contact({this.ContactId,this.ContactType,this.FirstName,this.LastName,this.Name,this.Role,this.Title,this.EmailWork,this.EmailPersonal,this.District,this.DistrictID,this.School,this.SchoolID,this.State,this.StateName,this.StateID,this.CountyID,this.County,this.Phone,this.Department,this.Flow,this.LastContact,this.DoNotContact,this.Active,this.AgentId,this.PhoneAlt,this.PeraContactId,this.RoomNumber,this.SourceTypeId,this.SourceTypeDesc,this.SourceNote,this.ContactStatusId,this.ContactStatusDesc,this.SSN,this.DateOfBirth,this.Deleted,this.IsShared,this.address_line1,this.address_city,this.address_state,this.address_zip,this.DeletedBy,this.DeletedDateTimeUtc,this.HasNBC,this.HasFactFinderSheet,this.MiddleInitial,this.Tags,this.DateCreated,this.PhoneLabel,this.AltPhoneLabel,this.Carriers,this.ContactImage,this.CompanyAffiliation,this.AdditionalInformation,this.HasGiftCard,this.ContactCategory,this.WritingAgentId,this.WritingAgentName,this.MaritalStatus,this.TotalDebtAmount,this.NumberOfDebtAccounts,this.FactFinderCodeId,this.BusinessName,this.DBA,this.ContactGUID,this.ProjectEndDate,this.Rate,this.JobID,this.JobName,this.JobCount,this.Locked,this.LockedByAgentId,this.LockedTimestamp,this.Initials,this.ContactCategoryName,this.SMSOptIn});
    Contact.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContactId = json['ContactId'];
        ContactType = json['ContactType'];
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        Name = json['Name'];
        Role = json['Role'];
        Title = json['Title'];
        EmailWork = json['EmailWork'];
        EmailPersonal = json['EmailPersonal'];
        District = json['District'];
        DistrictID = json['DistrictID'];
        School = json['School'];
        SchoolID = json['SchoolID'];
        State = json['State'];
        StateName = json['StateName'];
        StateID = json['StateID'];
        CountyID = json['CountyID'];
        County = json['County'];
        Phone = json['Phone'];
        Department = json['Department'];
        Flow = json['Flow'];
        LastContact = JsonConverters.fromJson(json['LastContact'],'DateTime',context!);
        DoNotContact = json['DoNotContact'];
        Active = json['Active'];
        AgentId = json['AgentId'];
        PhoneAlt = json['PhoneAlt'];
        PeraContactId = json['PeraContactId'];
        RoomNumber = json['RoomNumber'];
        SourceTypeId = json['SourceTypeId'];
        SourceTypeDesc = json['SourceTypeDesc'];
        SourceNote = json['SourceNote'];
        ContactStatusId = json['ContactStatusId'];
        ContactStatusDesc = json['ContactStatusDesc'];
        SSN = json['SSN'];
        DateOfBirth = JsonConverters.fromJson(json['DateOfBirth'],'DateTime',context!);
        Deleted = json['Deleted'];
        IsShared = json['IsShared'];
        address_line1 = json['address_line1'];
        address_city = json['address_city'];
        address_state = json['address_state'];
        address_zip = json['address_zip'];
        DeletedBy = json['DeletedBy'];
        DeletedDateTimeUtc = JsonConverters.fromJson(json['DeletedDateTimeUtc'],'DateTime',context!);
        HasNBC = json['HasNBC'];
        HasFactFinderSheet = json['HasFactFinderSheet'];
        MiddleInitial = json['MiddleInitial'];
        Tags = json['Tags'];
        DateCreated = JsonConverters.fromJson(json['DateCreated'],'DateTime',context!);
        PhoneLabel = json['PhoneLabel'];
        AltPhoneLabel = json['AltPhoneLabel'];
        Carriers = json['Carriers'];
        ContactImage = json['ContactImage'];
        CompanyAffiliation = json['CompanyAffiliation'];
        AdditionalInformation = json['AdditionalInformation'];
        HasGiftCard = json['HasGiftCard'];
        ContactCategory = json['ContactCategory'];
        WritingAgentId = json['WritingAgentId'];
        WritingAgentName = json['WritingAgentName'];
        MaritalStatus = json['MaritalStatus'];
        TotalDebtAmount = JsonConverters.toDouble(json['TotalDebtAmount']);
        NumberOfDebtAccounts = json['NumberOfDebtAccounts'];
        FactFinderCodeId = json['FactFinderCodeId'];
        BusinessName = json['BusinessName'];
        DBA = json['DBA'];
        ContactGUID = json['ContactGUID'];
        ProjectEndDate = JsonConverters.fromJson(json['ProjectEndDate'],'DateTime',context!);
        Rate = json['Rate'];
        JobID = json['JobID'];
        JobName = json['JobName'];
        JobCount = json['JobCount'];
        Locked = json['Locked'];
        LockedByAgentId = json['LockedByAgentId'];
        LockedTimestamp = JsonConverters.fromJson(json['LockedTimestamp'],'DateTime',context!);
        Initials = json['Initials'];
        ContactCategoryName = json['ContactCategoryName'];
        SMSOptIn = json['SMSOptIn'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContactId': ContactId,
        'ContactType': ContactType,
        'FirstName': FirstName,
        'LastName': LastName,
        'Name': Name,
        'Role': Role,
        'Title': Title,
        'EmailWork': EmailWork,
        'EmailPersonal': EmailPersonal,
        'District': District,
        'DistrictID': DistrictID,
        'School': School,
        'SchoolID': SchoolID,
        'State': State,
        'StateName': StateName,
        'StateID': StateID,
        'CountyID': CountyID,
        'County': County,
        'Phone': Phone,
        'Department': Department,
        'Flow': Flow,
        'LastContact': JsonConverters.toJson(LastContact,'DateTime',context!),
        'DoNotContact': DoNotContact,
        'Active': Active,
        'AgentId': AgentId,
        'PhoneAlt': PhoneAlt,
        'PeraContactId': PeraContactId,
        'RoomNumber': RoomNumber,
        'SourceTypeId': SourceTypeId,
        'SourceTypeDesc': SourceTypeDesc,
        'SourceNote': SourceNote,
        'ContactStatusId': ContactStatusId,
        'ContactStatusDesc': ContactStatusDesc,
        'SSN': SSN,
        'DateOfBirth': JsonConverters.toJson(DateOfBirth,'DateTime',context!),
        'Deleted': Deleted,
        'IsShared': IsShared,
        'address_line1': address_line1,
        'address_city': address_city,
        'address_state': address_state,
        'address_zip': address_zip,
        'DeletedBy': DeletedBy,
        'DeletedDateTimeUtc': JsonConverters.toJson(DeletedDateTimeUtc,'DateTime',context!),
        'HasNBC': HasNBC,
        'HasFactFinderSheet': HasFactFinderSheet,
        'MiddleInitial': MiddleInitial,
        'Tags': Tags,
        'DateCreated': JsonConverters.toJson(DateCreated,'DateTime',context!),
        'PhoneLabel': PhoneLabel,
        'AltPhoneLabel': AltPhoneLabel,
        'Carriers': Carriers,
        'ContactImage': ContactImage,
        'CompanyAffiliation': CompanyAffiliation,
        'AdditionalInformation': AdditionalInformation,
        'HasGiftCard': HasGiftCard,
        'ContactCategory': ContactCategory,
        'WritingAgentId': WritingAgentId,
        'WritingAgentName': WritingAgentName,
        'MaritalStatus': MaritalStatus,
        'TotalDebtAmount': TotalDebtAmount,
        'NumberOfDebtAccounts': NumberOfDebtAccounts,
        'FactFinderCodeId': FactFinderCodeId,
        'BusinessName': BusinessName,
        'DBA': DBA,
        'ContactGUID': ContactGUID,
        'ProjectEndDate': JsonConverters.toJson(ProjectEndDate,'DateTime',context!),
        'Rate': Rate,
        'JobID': JobID,
        'JobName': JobName,
        'JobCount': JobCount,
        'Locked': Locked,
        'LockedByAgentId': LockedByAgentId,
        'LockedTimestamp': JsonConverters.toJson(LockedTimestamp,'DateTime',context!),
        'Initials': Initials,
        'ContactCategoryName': ContactCategoryName,
        'SMSOptIn': SMSOptIn
    };

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

class ContactResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<Contact>? Contact = [];

    ContactResponse({this.ResponseStatus,this.Contact});
    ContactResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class ContactConnectionRequest implements IConvertible
{
    List<Contact>? Contact = [];
    int? ContactId;
    int? AgentId;

    ContactConnectionRequest({this.Contact,this.ContactId,this.AgentId});
    ContactConnectionRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

Dart ContactConnectionRequest DTOs

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

HTTP + XML

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

POST /v1/ContactConnections/{ContactId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ContactConnectionRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <AgentId>0</AgentId>
  <Contact>
    <Contact>
      <Active>false</Active>
      <AdditionalInformation>String</AdditionalInformation>
      <AgentId>0</AgentId>
      <AltPhoneLabel>String</AltPhoneLabel>
      <BusinessName>String</BusinessName>
      <Carriers>String</Carriers>
      <CompanyAffiliation>String</CompanyAffiliation>
      <ContactCategory>0</ContactCategory>
      <ContactCategoryName>String</ContactCategoryName>
      <ContactGUID>00000000-0000-0000-0000-000000000000</ContactGUID>
      <ContactId>0</ContactId>
      <ContactImage>String</ContactImage>
      <ContactStatusDesc>String</ContactStatusDesc>
      <ContactStatusId>0</ContactStatusId>
      <ContactType>0</ContactType>
      <County>String</County>
      <CountyID>0</CountyID>
      <DBA>String</DBA>
      <DateCreated>0001-01-01T00:00:00</DateCreated>
      <DateOfBirth>0001-01-01T00:00:00</DateOfBirth>
      <Deleted>false</Deleted>
      <DeletedBy>String</DeletedBy>
      <DeletedDateTimeUtc>0001-01-01T00:00:00</DeletedDateTimeUtc>
      <Department>String</Department>
      <District>String</District>
      <DistrictID>0</DistrictID>
      <DoNotContact>false</DoNotContact>
      <EmailPersonal>String</EmailPersonal>
      <EmailWork>String</EmailWork>
      <FactFinderCodeId>0</FactFinderCodeId>
      <FirstName>String</FirstName>
      <Flow>String</Flow>
      <HasFactFinderSheet>false</HasFactFinderSheet>
      <HasGiftCard>false</HasGiftCard>
      <HasNBC>false</HasNBC>
      <Initials>String</Initials>
      <IsShared>false</IsShared>
      <JobCount>0</JobCount>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <LastContact>0001-01-01T00:00:00</LastContact>
      <LastName>String</LastName>
      <Locked>false</Locked>
      <LockedByAgentId>0</LockedByAgentId>
      <LockedTimestamp>0001-01-01T00:00:00</LockedTimestamp>
      <MaritalStatus>String</MaritalStatus>
      <MiddleInitial>String</MiddleInitial>
      <Name>String</Name>
      <NumberOfDebtAccounts>0</NumberOfDebtAccounts>
      <PeraContactId>0</PeraContactId>
      <Phone>String</Phone>
      <PhoneAlt>String</PhoneAlt>
      <PhoneLabel>String</PhoneLabel>
      <ProjectEndDate>0001-01-01T00:00:00</ProjectEndDate>
      <Rate>0</Rate>
      <Role>String</Role>
      <RoomNumber>String</RoomNumber>
      <SMSOptIn>false</SMSOptIn>
      <SSN>String</SSN>
      <School>String</School>
      <SchoolID>0</SchoolID>
      <SourceNote>String</SourceNote>
      <SourceTypeDesc>String</SourceTypeDesc>
      <SourceTypeId>0</SourceTypeId>
      <State>String</State>
      <StateID>0</StateID>
      <StateName>String</StateName>
      <Tags>String</Tags>
      <Title>String</Title>
      <TotalDebtAmount>0</TotalDebtAmount>
      <WritingAgentId>0</WritingAgentId>
      <WritingAgentName>String</WritingAgentName>
      <address_city>String</address_city>
      <address_line1>String</address_line1>
      <address_state>String</address_state>
      <address_zip>String</address_zip>
    </Contact>
  </Contact>
  <ContactId>0</ContactId>
</ContactConnectionRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ContactResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Contact>
    <Contact>
      <Active>false</Active>
      <AdditionalInformation>String</AdditionalInformation>
      <AgentId>0</AgentId>
      <AltPhoneLabel>String</AltPhoneLabel>
      <BusinessName>String</BusinessName>
      <Carriers>String</Carriers>
      <CompanyAffiliation>String</CompanyAffiliation>
      <ContactCategory>0</ContactCategory>
      <ContactCategoryName>String</ContactCategoryName>
      <ContactGUID>00000000-0000-0000-0000-000000000000</ContactGUID>
      <ContactId>0</ContactId>
      <ContactImage>String</ContactImage>
      <ContactStatusDesc>String</ContactStatusDesc>
      <ContactStatusId>0</ContactStatusId>
      <ContactType>0</ContactType>
      <County>String</County>
      <CountyID>0</CountyID>
      <DBA>String</DBA>
      <DateCreated>0001-01-01T00:00:00</DateCreated>
      <DateOfBirth>0001-01-01T00:00:00</DateOfBirth>
      <Deleted>false</Deleted>
      <DeletedBy>String</DeletedBy>
      <DeletedDateTimeUtc>0001-01-01T00:00:00</DeletedDateTimeUtc>
      <Department>String</Department>
      <District>String</District>
      <DistrictID>0</DistrictID>
      <DoNotContact>false</DoNotContact>
      <EmailPersonal>String</EmailPersonal>
      <EmailWork>String</EmailWork>
      <FactFinderCodeId>0</FactFinderCodeId>
      <FirstName>String</FirstName>
      <Flow>String</Flow>
      <HasFactFinderSheet>false</HasFactFinderSheet>
      <HasGiftCard>false</HasGiftCard>
      <HasNBC>false</HasNBC>
      <Initials>String</Initials>
      <IsShared>false</IsShared>
      <JobCount>0</JobCount>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <LastContact>0001-01-01T00:00:00</LastContact>
      <LastName>String</LastName>
      <Locked>false</Locked>
      <LockedByAgentId>0</LockedByAgentId>
      <LockedTimestamp>0001-01-01T00:00:00</LockedTimestamp>
      <MaritalStatus>String</MaritalStatus>
      <MiddleInitial>String</MiddleInitial>
      <Name>String</Name>
      <NumberOfDebtAccounts>0</NumberOfDebtAccounts>
      <PeraContactId>0</PeraContactId>
      <Phone>String</Phone>
      <PhoneAlt>String</PhoneAlt>
      <PhoneLabel>String</PhoneLabel>
      <ProjectEndDate>0001-01-01T00:00:00</ProjectEndDate>
      <Rate>0</Rate>
      <Role>String</Role>
      <RoomNumber>String</RoomNumber>
      <SMSOptIn>false</SMSOptIn>
      <SSN>String</SSN>
      <School>String</School>
      <SchoolID>0</SchoolID>
      <SourceNote>String</SourceNote>
      <SourceTypeDesc>String</SourceTypeDesc>
      <SourceTypeId>0</SourceTypeId>
      <State>String</State>
      <StateID>0</StateID>
      <StateName>String</StateName>
      <Tags>String</Tags>
      <Title>String</Title>
      <TotalDebtAmount>0</TotalDebtAmount>
      <WritingAgentId>0</WritingAgentId>
      <WritingAgentName>String</WritingAgentName>
      <address_city>String</address_city>
      <address_line1>String</address_line1>
      <address_state>String</address_state>
      <address_zip>String</address_zip>
    </Contact>
  </Contact>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</ContactResponse>