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 Foundation
import ServiceStack

/**
* Retrieve links to a contact (connections/roles/emailAddressBook
*/
// @Api(Description="Retrieve links to a contact (connections/roles/emailAddressBook")
public class ContactConnectedLinks : Codable
{
    public var contactId:String

    required public init(){}
}

public class ContactConnectedLinksResponse : Codable
{
    /**
    * 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")
    public var roles:[UserRoleModel]

    /**
    * 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")
    public var contactConnections:[UserContactConnectionModel]

    /**
    * 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")
    public var emailAddressBook:[ContactEmailAddress]

    public var responseStatus:ResponseStatus

    required public init(){}
}

public class UserRoleModel : Codable
{
    /**
    * 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")
    public var contactRoleId:String

    /**
    * The Role Id.
    */
    // @ApiMember(DataType="Guid", Description="The Role Id.", Name="RoleId", ParameterType="query")
    public var roleId:String

    /**
    * The role name.
    */
    // @ApiMember(DataType="string", Description="The role name.", Name="RoleName", ParameterType="query")
    public var roleName:String

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

    /**
    * 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")
    public var rolePrimaryImageThumbnailURL:String

    /**
    * 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")
    public var rolePrimaryImageId:String

    /**
    * The date the contact started having this role.
    */
    // @ApiMember(DataType="DateTime", Description="The date the contact started having this role.", Name="StartDate", ParameterType="query")
    public var startDate:Date

    /**
    * 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")
    public var endDate:Date?

    required public init(){}
}

public class UserContactConnectionModel : Codable
{
    /**
    * 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")
    public var contactRoleId:String

    /**
    * The role name.
    */
    // @ApiMember(DataType="string", Description="The role name.", Name="ContactRoleName", ParameterType="query")
    public var contactRoleName:String

    /**
    * The list item role Id.
    */
    // @ApiMember(DataType="Guid", Description="The list item role Id.", Name="ContactListItemRoleId", ParameterType="query")
    public var contactListItemRoleId:String

    /**
    * 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")
    public var contactRolePrimaryImageURL:String

    /**
    * 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")
    public var contactRolePrimaryImageThumbnailURL:String

    /**
    * 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")
    public var contactRolePrimaryImageId:String

    /**
    * The connected contacts Id. (licensee)
    */
    // @ApiMember(DataType="string", Description="The connected contacts Id. (licensee)", Name="ConnectionContactId", ParameterType="query")
    public var connectionContactId:String

    /**
    * The connected contacts Full Name.
    */
    // @ApiMember(DataType="string", Description="The connected contacts Full Name.", Name="ConnectionContactName", ParameterType="query")
    public var connectionContactName:String

    /**
    * The connected contacts role.
    */
    // @ApiMember(DataType="string", Description="The connected contacts role.", Name="ConnectionContactRoleName", ParameterType="query")
    public var connectionContactRoleName:String

    /**
    * The connected contacts role Id.
    */
    // @ApiMember(DataType="Guid", Description="The connected contacts role Id.", Name="ConnectionContactRoleId", ParameterType="query")
    public var connectionContactRoleId:String

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

    /**
    * The Contacts Type.
    */
    // @ApiMember(DataType="string", Description="The Contacts Type.", Name="ContactTypeName", ParameterType="query")
    public var contactTypeName:String

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

    /**
    * .
    */
    // @ApiMember(DataType="bool", Description=".", Name="IsContactLicenseeRole", ParameterType="query")
    public var isContactLicenseeRole:Bool

    /**
    * 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")
    public var isConnectionLicenseeRole:Bool

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

    /**
    * 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")
    public var connectionStatusId:String

    /**
    * 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")
    public var connectionId:String

    /**
    * 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")
    public var connectionRequestId:String

    required public init(){}
}

public class ContactEmailAddress : Codable
{
    /**
    * The Contact Id of the contact.
    */
    // @ApiMember(DataType="Guid", Description="The Contact Id of the contact.", Name="ContactId", ParameterType="query")
    public var contactId:String

    /**
    * The Contact Full Name
    */
    // @ApiMember(DataType="string", Description="The Contact Full Name", Name="ContactName", ParameterType="query")
    public var contactName:String

    /**
    * The Contact Email Address.
    */
    // @ApiMember(DataType="string", Description="The Contact Email Address.", Name="EmailAddress", ParameterType="query")
    public var emailAddress:String

    /**
    * The Contact Photo URL
    */
    // @ApiMember(DataType="string", Description="The Contact Photo URL", Name="ContactPhotoURL", ParameterType="query")
    public var contactPhotoURL:String

    required public init(){}
}


Swift 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>