Platform API

<back to all web services

ContactConnectedLinks

Retrieve links to a contact (connections/roles/emailAddressBook

Requires Authentication
The following routes are available for this service:
All Verbs/api/contacts/{ContactId}/links
import 'package:servicestack/servicestack.dart';

class UserRoleModel implements IConvertible
{
    /**
    * The Contact Role Id, that links the Contact to their role.
    */
    // @ApiMember(DataType="Guid", Description="The Contact Role Id, that links the Contact to their role.", Name="ContactRoleId", ParameterType="query")
    String? ContactRoleId;

    /**
    * The Role Id.
    */
    // @ApiMember(DataType="Guid", Description="The Role Id.", Name="RoleId", ParameterType="query")
    String? RoleId;

    /**
    * The role name.
    */
    // @ApiMember(DataType="string", Description="The role name.", Name="RoleName", ParameterType="query")
    String? RoleName;

    /**
    * The URL of the role's image icon.
    */
    // @ApiMember(DataType="string", Description="The URL of the role's image icon.", Name="RolePrimaryImageURL", ParameterType="query")
    String? RolePrimaryImageURL;

    /**
    * The URL of the role's thumbnail image icon.
    */
    // @ApiMember(DataType="string", Description="The URL of the role's thumbnail image icon.", Name="RolePrimaryImageThumbnailURL", ParameterType="query")
    String? RolePrimaryImageThumbnailURL;

    /**
    * The Guid of the role's media file containing the image icon details.
    */
    // @ApiMember(DataType="string", Description="The Guid of the role's media file containing the image icon details.", Name="RolePrimaryImageId", ParameterType="query")
    String? RolePrimaryImageId;

    /**
    * The date the contact started having this role.
    */
    // @ApiMember(DataType="DateTime", Description="The date the contact started having this role.", Name="StartDate", ParameterType="query")
    DateTime? StartDate;

    /**
    * The date the contact will end having this role.
    */
    // @ApiMember(DataType="DateTime?", Description="The date the contact will end having this role.", Name="EndDate", ParameterType="query")
    DateTime? EndDate;

    UserRoleModel({this.ContactRoleId,this.RoleId,this.RoleName,this.RolePrimaryImageURL,this.RolePrimaryImageThumbnailURL,this.RolePrimaryImageId,this.StartDate,this.EndDate});
    UserRoleModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContactRoleId = json['ContactRoleId'];
        RoleId = json['RoleId'];
        RoleName = json['RoleName'];
        RolePrimaryImageURL = json['RolePrimaryImageURL'];
        RolePrimaryImageThumbnailURL = json['RolePrimaryImageThumbnailURL'];
        RolePrimaryImageId = json['RolePrimaryImageId'];
        StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!);
        EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContactRoleId': ContactRoleId,
        'RoleId': RoleId,
        'RoleName': RoleName,
        'RolePrimaryImageURL': RolePrimaryImageURL,
        'RolePrimaryImageThumbnailURL': RolePrimaryImageThumbnailURL,
        'RolePrimaryImageId': RolePrimaryImageId,
        'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!),
        'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!)
    };

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

class UserContactConnectionModel implements IConvertible
{
    /**
    * The Contact Role Id, that links the Contact to their role.
    */
    // @ApiMember(DataType="Guid", Description="The Contact Role Id, that links the Contact to their role.", Name="ContactRoleId", ParameterType="query")
    String? ContactRoleId;

    /**
    * The role name.
    */
    // @ApiMember(DataType="string", Description="The role name.", Name="ContactRoleName", ParameterType="query")
    String? ContactRoleName;

    /**
    * The list item role Id.
    */
    // @ApiMember(DataType="Guid", Description="The list item role Id.", Name="ContactListItemRoleId", ParameterType="query")
    String? ContactListItemRoleId;

    /**
    * The URL of the contact role's image icon.
    */
    // @ApiMember(DataType="string", Description="The URL of the contact role's image icon.", Name="ContactRolePrimaryImageURL", ParameterType="query")
    String? ContactRolePrimaryImageURL;

    /**
    * The URL of the contact role's thumbnail image icon.
    */
    // @ApiMember(DataType="string", Description="The URL of the contact role's thumbnail image icon.", Name="ContactRolePrimaryImageThumbnailURL", ParameterType="query")
    String? ContactRolePrimaryImageThumbnailURL;

    /**
    * The Guid of the contact role's media file containing the image icon details.
    */
    // @ApiMember(DataType="string", Description="The Guid of the contact role's media file containing the image icon details.", Name="ContactRolePrimaryImageId", ParameterType="query")
    String? ContactRolePrimaryImageId;

    /**
    * The connected contacts Id. (licensee)
    */
    // @ApiMember(DataType="string", Description="The connected contacts Id. (licensee)", Name="ConnectionContactId", ParameterType="query")
    String? ConnectionContactId;

    /**
    * The connected contacts Full Name.
    */
    // @ApiMember(DataType="string", Description="The connected contacts Full Name.", Name="ConnectionContactName", ParameterType="query")
    String? ConnectionContactName;

    /**
    * The connected contacts role.
    */
    // @ApiMember(DataType="string", Description="The connected contacts role.", Name="ConnectionContactRoleName", ParameterType="query")
    String? ConnectionContactRoleName;

    /**
    * The connected contacts role Id.
    */
    // @ApiMember(DataType="Guid", Description="The connected contacts role Id.", Name="ConnectionContactRoleId", ParameterType="query")
    String? ConnectionContactRoleId;

    /**
    * The connected contacts list item role Id.
    */
    // @ApiMember(DataType="Guid", Description="The connected contacts list item role Id.", Name="ConnectionContactListItemRoleId", ParameterType="query")
    String? ConnectionContactListItemRoleId;

    /**
    * The Contacts Type.
    */
    // @ApiMember(DataType="string", Description="The Contacts Type.", Name="ContactTypeName", ParameterType="query")
    String? ContactTypeName;

    /**
    * The URL to the Connected Contacts Photo.
    */
    // @ApiMember(DataType="string", Description="The URL to the Connected Contacts Photo.", Name="ConnectionContactPhotoURL", ParameterType="query")
    String? ConnectionContactPhotoURL;

    /**
    * .
    */
    // @ApiMember(DataType="bool", Description=".", Name="IsContactLicenseeRole", ParameterType="query")
    bool? IsContactLicenseeRole;

    /**
    * If the connection is as a licensee this is true.
    */
    // @ApiMember(DataType="bool", Description="If the connection is as a licensee this is true.", Name="IsConnectionLicenseeRole", ParameterType="query")
    bool? IsConnectionLicenseeRole;

    /**
    * The status of the connection with the contact.
    */
    // @ApiMember(DataType="string", Description="The status of the connection with the contact.", Name="ConnectionStatusName", ParameterType="query")
    String? ConnectionStatusName;

    /**
    * The status Id of the connection with the contact.
    */
    // @ApiMember(DataType="Guid", Description="The status Id of the connection with the contact.", Name="ConnectionStatusId", ParameterType="query")
    String? ConnectionStatusId;

    /**
    * The ContactRoleConnectionId of an active connection with the contact.
    */
    // @ApiMember(DataType="Guid", Description="The ContactRoleConnectionId of an active connection with the contact.", Name="ConnectionId", ParameterType="query")
    String? ConnectionId;

    /**
    * The ContactRoleConnectionRequest of a pending connection with the contact.
    */
    // @ApiMember(DataType="Guid", Description="The ContactRoleConnectionRequest of a pending connection with the contact.", Name="ConnectionRequestId", ParameterType="query")
    String? ConnectionRequestId;

    UserContactConnectionModel({this.ContactRoleId,this.ContactRoleName,this.ContactListItemRoleId,this.ContactRolePrimaryImageURL,this.ContactRolePrimaryImageThumbnailURL,this.ContactRolePrimaryImageId,this.ConnectionContactId,this.ConnectionContactName,this.ConnectionContactRoleName,this.ConnectionContactRoleId,this.ConnectionContactListItemRoleId,this.ContactTypeName,this.ConnectionContactPhotoURL,this.IsContactLicenseeRole,this.IsConnectionLicenseeRole,this.ConnectionStatusName,this.ConnectionStatusId,this.ConnectionId,this.ConnectionRequestId});
    UserContactConnectionModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContactRoleId = json['ContactRoleId'];
        ContactRoleName = json['ContactRoleName'];
        ContactListItemRoleId = json['ContactListItemRoleId'];
        ContactRolePrimaryImageURL = json['ContactRolePrimaryImageURL'];
        ContactRolePrimaryImageThumbnailURL = json['ContactRolePrimaryImageThumbnailURL'];
        ContactRolePrimaryImageId = json['ContactRolePrimaryImageId'];
        ConnectionContactId = json['ConnectionContactId'];
        ConnectionContactName = json['ConnectionContactName'];
        ConnectionContactRoleName = json['ConnectionContactRoleName'];
        ConnectionContactRoleId = json['ConnectionContactRoleId'];
        ConnectionContactListItemRoleId = json['ConnectionContactListItemRoleId'];
        ContactTypeName = json['ContactTypeName'];
        ConnectionContactPhotoURL = json['ConnectionContactPhotoURL'];
        IsContactLicenseeRole = json['IsContactLicenseeRole'];
        IsConnectionLicenseeRole = json['IsConnectionLicenseeRole'];
        ConnectionStatusName = json['ConnectionStatusName'];
        ConnectionStatusId = json['ConnectionStatusId'];
        ConnectionId = json['ConnectionId'];
        ConnectionRequestId = json['ConnectionRequestId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContactRoleId': ContactRoleId,
        'ContactRoleName': ContactRoleName,
        'ContactListItemRoleId': ContactListItemRoleId,
        'ContactRolePrimaryImageURL': ContactRolePrimaryImageURL,
        'ContactRolePrimaryImageThumbnailURL': ContactRolePrimaryImageThumbnailURL,
        'ContactRolePrimaryImageId': ContactRolePrimaryImageId,
        'ConnectionContactId': ConnectionContactId,
        'ConnectionContactName': ConnectionContactName,
        'ConnectionContactRoleName': ConnectionContactRoleName,
        'ConnectionContactRoleId': ConnectionContactRoleId,
        'ConnectionContactListItemRoleId': ConnectionContactListItemRoleId,
        'ContactTypeName': ContactTypeName,
        'ConnectionContactPhotoURL': ConnectionContactPhotoURL,
        'IsContactLicenseeRole': IsContactLicenseeRole,
        'IsConnectionLicenseeRole': IsConnectionLicenseeRole,
        'ConnectionStatusName': ConnectionStatusName,
        'ConnectionStatusId': ConnectionStatusId,
        'ConnectionId': ConnectionId,
        'ConnectionRequestId': ConnectionRequestId
    };

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

class ContactEmailAddress implements IConvertible
{
    /**
    * The Contact Id of the contact.
    */
    // @ApiMember(DataType="Guid", Description="The Contact Id of the contact.", Name="ContactId", ParameterType="query")
    String? ContactId;

    /**
    * The Contact Full Name
    */
    // @ApiMember(DataType="string", Description="The Contact Full Name", Name="ContactName", ParameterType="query")
    String? ContactName;

    /**
    * The Contact Email Address.
    */
    // @ApiMember(DataType="string", Description="The Contact Email Address.", Name="EmailAddress", ParameterType="query")
    String? EmailAddress;

    /**
    * The Contact Photo URL
    */
    // @ApiMember(DataType="string", Description="The Contact Photo URL", Name="ContactPhotoURL", ParameterType="query")
    String? ContactPhotoURL;

    ContactEmailAddress({this.ContactId,this.ContactName,this.EmailAddress,this.ContactPhotoURL});
    ContactEmailAddress.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContactId = json['ContactId'];
        ContactName = json['ContactName'];
        EmailAddress = json['EmailAddress'];
        ContactPhotoURL = json['ContactPhotoURL'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContactId': ContactId,
        'ContactName': ContactName,
        'EmailAddress': EmailAddress,
        'ContactPhotoURL': ContactPhotoURL
    };

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

class ContactConnectedLinksResponse implements IConvertible
{
    /**
    * A list of roles assigned to the contact/user.
    */
    // @ApiMember(DataType="List<UserRoleModel>", Description="A list of roles assigned to the contact/user.", Name="Roles", ParameterType="query")
    List<UserRoleModel>? Roles;

    /**
    * A list of contact connections assigned to the contact/user.
    */
    // @ApiMember(DataType="List<UserContactConnectionModel>", Description="A list of contact connections assigned to the contact/user.", Name="ContactConnections", ParameterType="query")
    List<UserContactConnectionModel>? ContactConnections;

    /**
    * A list of connected contacts and their email addresses.
    */
    // @ApiMember(DataType="List<ContactEmailAddressBook>", Description="A list of connected contacts and their email addresses.", Name="EmailAddressBook", ParameterType="query")
    List<ContactEmailAddress>? EmailAddressBook;

    ResponseStatus? ResponseStatus;

    ContactConnectedLinksResponse({this.Roles,this.ContactConnections,this.EmailAddressBook,this.ResponseStatus});
    ContactConnectedLinksResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Roles = JsonConverters.fromJson(json['Roles'],'List<UserRoleModel>',context!);
        ContactConnections = JsonConverters.fromJson(json['ContactConnections'],'List<UserContactConnectionModel>',context!);
        EmailAddressBook = JsonConverters.fromJson(json['EmailAddressBook'],'List<ContactEmailAddress>',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Roles': JsonConverters.toJson(Roles,'List<UserRoleModel>',context!),
        'ContactConnections': JsonConverters.toJson(ContactConnections,'List<UserContactConnectionModel>',context!),
        'EmailAddressBook': JsonConverters.toJson(EmailAddressBook,'List<ContactEmailAddress>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

/**
* Retrieve links to a contact (connections/roles/emailAddressBook
*/
// @Api(Description="Retrieve links to a contact (connections/roles/emailAddressBook")
class ContactConnectedLinks implements IConvertible
{
    String? ContactId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'pfapi.pstpf.com.au', types: <String, TypeInfo> {
    'UserRoleModel': TypeInfo(TypeOf.Class, create:() => UserRoleModel()),
    'UserContactConnectionModel': TypeInfo(TypeOf.Class, create:() => UserContactConnectionModel()),
    'ContactEmailAddress': TypeInfo(TypeOf.Class, create:() => ContactEmailAddress()),
    'ContactConnectedLinksResponse': TypeInfo(TypeOf.Class, create:() => ContactConnectedLinksResponse()),
    'List<UserRoleModel>': TypeInfo(TypeOf.Class, create:() => <UserRoleModel>[]),
    'List<UserContactConnectionModel>': TypeInfo(TypeOf.Class, create:() => <UserContactConnectionModel>[]),
    'List<ContactEmailAddress>': TypeInfo(TypeOf.Class, create:() => <ContactEmailAddress>[]),
    'ContactConnectedLinks': TypeInfo(TypeOf.Class, create:() => ContactConnectedLinks()),
});

Dart ContactConnectedLinks 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 /api/contacts/{ContactId}/links HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ContactConnectedLinks xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
  <ContactId>00000000-0000-0000-0000-000000000000</ContactId>
</ContactConnectedLinks>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ContactConnectedLinksResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
  <ContactConnections>
    <UserContactConnectionModel>
      <ConnectionContactId>00000000-0000-0000-0000-000000000000</ConnectionContactId>
      <ConnectionContactListItemRoleId>00000000-0000-0000-0000-000000000000</ConnectionContactListItemRoleId>
      <ConnectionContactName>String</ConnectionContactName>
      <ConnectionContactPhotoURL>String</ConnectionContactPhotoURL>
      <ConnectionContactRoleId>00000000-0000-0000-0000-000000000000</ConnectionContactRoleId>
      <ConnectionContactRoleName>String</ConnectionContactRoleName>
      <ConnectionId>00000000-0000-0000-0000-000000000000</ConnectionId>
      <ConnectionRequestId>00000000-0000-0000-0000-000000000000</ConnectionRequestId>
      <ConnectionStatusId>00000000-0000-0000-0000-000000000000</ConnectionStatusId>
      <ConnectionStatusName>String</ConnectionStatusName>
      <ContactListItemRoleId>00000000-0000-0000-0000-000000000000</ContactListItemRoleId>
      <ContactRoleId>00000000-0000-0000-0000-000000000000</ContactRoleId>
      <ContactRoleName>String</ContactRoleName>
      <ContactRolePrimaryImageId>00000000-0000-0000-0000-000000000000</ContactRolePrimaryImageId>
      <ContactRolePrimaryImageThumbnailURL>String</ContactRolePrimaryImageThumbnailURL>
      <ContactRolePrimaryImageURL>String</ContactRolePrimaryImageURL>
      <ContactTypeName>String</ContactTypeName>
      <IsConnectionLicenseeRole>false</IsConnectionLicenseeRole>
      <IsContactLicenseeRole>false</IsContactLicenseeRole>
    </UserContactConnectionModel>
  </ContactConnections>
  <EmailAddressBook>
    <ContactEmailAddress>
      <ContactId>00000000-0000-0000-0000-000000000000</ContactId>
      <ContactName>String</ContactName>
      <ContactPhotoURL>String</ContactPhotoURL>
      <EmailAddress>String</EmailAddress>
    </ContactEmailAddress>
  </EmailAddressBook>
  <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>
  <Roles>
    <UserRoleModel>
      <ContactRoleId>00000000-0000-0000-0000-000000000000</ContactRoleId>
      <EndDate>0001-01-01T00:00:00</EndDate>
      <RoleId>00000000-0000-0000-0000-000000000000</RoleId>
      <RoleName>String</RoleName>
      <RolePrimaryImageId>00000000-0000-0000-0000-000000000000</RolePrimaryImageId>
      <RolePrimaryImageThumbnailURL>String</RolePrimaryImageThumbnailURL>
      <RolePrimaryImageURL>String</RolePrimaryImageURL>
      <StartDate>0001-01-01T00:00:00</StartDate>
    </UserRoleModel>
  </Roles>
</ContactConnectedLinksResponse>