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 java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Retrieve links to a contact (connections/roles/emailAddressBook
    */
    @Api(Description="Retrieve links to a contact (connections/roles/emailAddressBook")
    public static class ContactConnectedLinks
    {
        public UUID ContactId = null;
        
        public UUID getContactId() { return ContactId; }
        public ContactConnectedLinks setContactId(UUID value) { this.ContactId = value; return this; }
    }

    public static class ContactConnectedLinksResponse
    {
        /**
        * 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 ArrayList<UserRoleModel> Roles = null;

        /**
        * 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 ArrayList<UserContactConnectionModel> ContactConnections = null;

        /**
        * 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 ArrayList<ContactEmailAddress> EmailAddressBook = null;

        public ResponseStatus ResponseStatus = null;
        
        public ArrayList<UserRoleModel> getRoles() { return Roles; }
        public ContactConnectedLinksResponse setRoles(ArrayList<UserRoleModel> value) { this.Roles = value; return this; }
        public ArrayList<UserContactConnectionModel> getContactConnections() { return ContactConnections; }
        public ContactConnectedLinksResponse setContactConnections(ArrayList<UserContactConnectionModel> value) { this.ContactConnections = value; return this; }
        public ArrayList<ContactEmailAddress> getEmailAddressBook() { return EmailAddressBook; }
        public ContactConnectedLinksResponse setEmailAddressBook(ArrayList<ContactEmailAddress> value) { this.EmailAddressBook = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public ContactConnectedLinksResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class UserRoleModel
    {
        /**
        * 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 UUID ContactRoleId = null;

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

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

        /**
        * 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 String RolePrimaryImageURL = null;

        /**
        * 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 String RolePrimaryImageThumbnailURL = null;

        /**
        * 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 UUID RolePrimaryImageId = null;

        /**
        * 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 Date StartDate = null;

        /**
        * 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 Date EndDate = null;
        
        public UUID getContactRoleId() { return ContactRoleId; }
        public UserRoleModel setContactRoleId(UUID value) { this.ContactRoleId = value; return this; }
        public UUID getRoleId() { return RoleId; }
        public UserRoleModel setRoleId(UUID value) { this.RoleId = value; return this; }
        public String getRoleName() { return RoleName; }
        public UserRoleModel setRoleName(String value) { this.RoleName = value; return this; }
        public String getRolePrimaryImageURL() { return RolePrimaryImageURL; }
        public UserRoleModel setRolePrimaryImageURL(String value) { this.RolePrimaryImageURL = value; return this; }
        public String getRolePrimaryImageThumbnailURL() { return RolePrimaryImageThumbnailURL; }
        public UserRoleModel setRolePrimaryImageThumbnailURL(String value) { this.RolePrimaryImageThumbnailURL = value; return this; }
        public UUID getRolePrimaryImageId() { return RolePrimaryImageId; }
        public UserRoleModel setRolePrimaryImageId(UUID value) { this.RolePrimaryImageId = value; return this; }
        public Date getStartDate() { return StartDate; }
        public UserRoleModel setStartDate(Date value) { this.StartDate = value; return this; }
        public Date getEndDate() { return EndDate; }
        public UserRoleModel setEndDate(Date value) { this.EndDate = value; return this; }
    }

    public static class UserContactConnectionModel
    {
        /**
        * 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 UUID ContactRoleId = null;

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

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

        /**
        * 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 String ContactRolePrimaryImageURL = null;

        /**
        * 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 String ContactRolePrimaryImageThumbnailURL = null;

        /**
        * 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 UUID ContactRolePrimaryImageId = null;

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

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

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

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

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

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

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

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

        /**
        * 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 Boolean IsConnectionLicenseeRole = null;

        /**
        * 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 String ConnectionStatusName = null;

        /**
        * 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 UUID ConnectionStatusId = null;

        /**
        * 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 UUID ConnectionId = null;

        /**
        * 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 UUID ConnectionRequestId = null;
        
        public UUID getContactRoleId() { return ContactRoleId; }
        public UserContactConnectionModel setContactRoleId(UUID value) { this.ContactRoleId = value; return this; }
        public String getContactRoleName() { return ContactRoleName; }
        public UserContactConnectionModel setContactRoleName(String value) { this.ContactRoleName = value; return this; }
        public UUID getContactListItemRoleId() { return ContactListItemRoleId; }
        public UserContactConnectionModel setContactListItemRoleId(UUID value) { this.ContactListItemRoleId = value; return this; }
        public String getContactRolePrimaryImageURL() { return ContactRolePrimaryImageURL; }
        public UserContactConnectionModel setContactRolePrimaryImageURL(String value) { this.ContactRolePrimaryImageURL = value; return this; }
        public String getContactRolePrimaryImageThumbnailURL() { return ContactRolePrimaryImageThumbnailURL; }
        public UserContactConnectionModel setContactRolePrimaryImageThumbnailURL(String value) { this.ContactRolePrimaryImageThumbnailURL = value; return this; }
        public UUID getContactRolePrimaryImageId() { return ContactRolePrimaryImageId; }
        public UserContactConnectionModel setContactRolePrimaryImageId(UUID value) { this.ContactRolePrimaryImageId = value; return this; }
        public UUID getConnectionContactId() { return ConnectionContactId; }
        public UserContactConnectionModel setConnectionContactId(UUID value) { this.ConnectionContactId = value; return this; }
        public String getConnectionContactName() { return ConnectionContactName; }
        public UserContactConnectionModel setConnectionContactName(String value) { this.ConnectionContactName = value; return this; }
        public String getConnectionContactRoleName() { return ConnectionContactRoleName; }
        public UserContactConnectionModel setConnectionContactRoleName(String value) { this.ConnectionContactRoleName = value; return this; }
        public UUID getConnectionContactRoleId() { return ConnectionContactRoleId; }
        public UserContactConnectionModel setConnectionContactRoleId(UUID value) { this.ConnectionContactRoleId = value; return this; }
        public UUID getConnectionContactListItemRoleId() { return ConnectionContactListItemRoleId; }
        public UserContactConnectionModel setConnectionContactListItemRoleId(UUID value) { this.ConnectionContactListItemRoleId = value; return this; }
        public String getContactTypeName() { return ContactTypeName; }
        public UserContactConnectionModel setContactTypeName(String value) { this.ContactTypeName = value; return this; }
        public String getConnectionContactPhotoURL() { return ConnectionContactPhotoURL; }
        public UserContactConnectionModel setConnectionContactPhotoURL(String value) { this.ConnectionContactPhotoURL = value; return this; }
        public Boolean getIsContactLicenseeRole() { return IsContactLicenseeRole; }
        public UserContactConnectionModel setIsContactLicenseeRole(Boolean value) { this.IsContactLicenseeRole = value; return this; }
        public Boolean getIsConnectionLicenseeRole() { return IsConnectionLicenseeRole; }
        public UserContactConnectionModel setIsConnectionLicenseeRole(Boolean value) { this.IsConnectionLicenseeRole = value; return this; }
        public String getConnectionStatusName() { return ConnectionStatusName; }
        public UserContactConnectionModel setConnectionStatusName(String value) { this.ConnectionStatusName = value; return this; }
        public UUID getConnectionStatusId() { return ConnectionStatusId; }
        public UserContactConnectionModel setConnectionStatusId(UUID value) { this.ConnectionStatusId = value; return this; }
        public UUID getConnectionId() { return ConnectionId; }
        public UserContactConnectionModel setConnectionId(UUID value) { this.ConnectionId = value; return this; }
        public UUID getConnectionRequestId() { return ConnectionRequestId; }
        public UserContactConnectionModel setConnectionRequestId(UUID value) { this.ConnectionRequestId = value; return this; }
    }

    public static class ContactEmailAddress
    {
        /**
        * The Contact Id of the contact.
        */
        @ApiMember(DataType="Guid", Description="The Contact Id of the contact.", Name="ContactId", ParameterType="query")
        public UUID ContactId = null;

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

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

        /**
        * The Contact Photo URL
        */
        @ApiMember(DataType="string", Description="The Contact Photo URL", Name="ContactPhotoURL", ParameterType="query")
        public String ContactPhotoURL = null;
        
        public UUID getContactId() { return ContactId; }
        public ContactEmailAddress setContactId(UUID value) { this.ContactId = value; return this; }
        public String getContactName() { return ContactName; }
        public ContactEmailAddress setContactName(String value) { this.ContactName = value; return this; }
        public String getEmailAddress() { return EmailAddress; }
        public ContactEmailAddress setEmailAddress(String value) { this.EmailAddress = value; return this; }
        public String getContactPhotoURL() { return ContactPhotoURL; }
        public ContactEmailAddress setContactPhotoURL(String value) { this.ContactPhotoURL = value; return this; }
    }

}

Java ContactConnectedLinks 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.

POST /api/contacts/{ContactId}/links HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Roles: 
	[
		{
			RoleName: String,
			RolePrimaryImageURL: String,
			RolePrimaryImageThumbnailURL: String,
			StartDate: 0001-01-01,
			EndDate: 0001-01-01
		}
	],
	ContactConnections: 
	[
		{
			ContactRoleName: String,
			ContactRolePrimaryImageURL: String,
			ContactRolePrimaryImageThumbnailURL: String,
			ConnectionContactName: String,
			ConnectionContactRoleName: String,
			ContactTypeName: String,
			ConnectionContactPhotoURL: String,
			IsContactLicenseeRole: False,
			IsConnectionLicenseeRole: False,
			ConnectionStatusName: String
		}
	],
	EmailAddressBook: 
	[
		{
			ContactName: String,
			EmailAddress: String,
			ContactPhotoURL: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}