Platform API

<back to all web services

GetConnectionsToContact

Get connections to the specified contact for the requestor contact

Requires Authentication
The following routes are available for this service:
All Verbs/api/contacts/{ContactId}/connections
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Subtle.Canvara.WebAPIModel.ServiceModel
Imports Eros.Saguna.Common.WebAPIModel.Models

Namespace Global

    Namespace Eros.Saguna.Common.WebAPIModel.Models

        Public Partial Class ContactConnectionModel
            '''<Summary>
            '''Connection Id (if applicable)
            '''</Summary>
            <ApiMember(DataType:="Guid?", Description:="Connection Id (if applicable)", Name:="ConnectionId")>
            Public Overridable Property ConnectionId As Guid?

            '''<Summary>
            '''Connection Request Id (if applicable)
            '''</Summary>
            <ApiMember(DataType:="Guid?", Description:="Connection Request Id (if applicable)", Name:="ConnectionRequestId")>
            Public Overridable Property ConnectionRequestId As Guid?

            '''<Summary>
            '''Details of the contact
            '''</Summary>
            <ApiMember(DataType:="ContactSummaryModel", Description:="Details of the contact", IsRequired:=true, Name:="Contact")>
            Public Overridable Property Contact As ContactSummaryModel

            '''<Summary>
            '''Contact's role Id in the connection
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Contact's role Id in the connection", IsRequired:=true, Name:="ContactRoleId")>
            Public Overridable Property ContactRoleId As Guid

            '''<Summary>
            '''Contact's role name in the connection
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Contact's role name in the connection", Name:="ContactRoleName")>
            Public Overridable Property ContactRoleName As String

            '''<Summary>
            '''Requestor Contact Id
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Requestor Contact Id", IsRequired:=true, Name:="RequestorContactId")>
            Public Overridable Property RequestorContactId As Guid

            '''<Summary>
            '''Requestor Contact Name
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Requestor Contact Name", Name:="RequestorContactName")>
            Public Overridable Property RequestorContactName As String

            '''<Summary>
            '''Requestor contact's role Id in the connection
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Requestor contact's role Id in the connection", IsRequired:=true, Name:="RequestorRoleId")>
            Public Overridable Property RequestorRoleId As Guid

            '''<Summary>
            '''Requestor's role name in the connection
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Requestor's role name in the connection", Name:="RequestorRoleName")>
            Public Overridable Property RequestorRoleName As String

            '''<Summary>
            '''Primary role in the connection to display
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Primary role in the connection to display", Name:="PrimaryRoleName")>
            Public Overridable Property PrimaryRoleName As String

            '''<Summary>
            '''Connection Status Id
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Connection Status Id", IsRequired:=true, Name:="ConnectionStatusId")>
            Public Overridable Property ConnectionStatusId As Guid

            '''<Summary>
            '''Connection Status Name
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Connection Status Name", Name:="ConnectionStatusName")>
            Public Overridable Property ConnectionStatusName As String

            '''<Summary>
            '''Is this a pending connection request?
            '''</Summary>
            <ApiMember(DataType:="bool", Description:="Is this a pending connection request?", Name:="IsConnectionRequest")>
            Public Overridable Property IsConnectionRequest As Boolean

            '''<Summary>
            '''Is this an incoming connection request?
            '''</Summary>
            <ApiMember(DataType:="bool", Description:="Is this an incoming connection request?", Name:="IsIncoming")>
            Public Overridable Property IsIncoming As Boolean

            Public Overridable Property FromDate As Date?
            '''<Summary>
            '''Details of the contact suggesting this connection
            '''</Summary>
            <ApiMember(DataType:="ContactSummaryModel", Description:="Details of the contact suggesting this connection", IsRequired:=true, Name:="SuggesterContact")>
            Public Overridable Property SuggesterContact As ContactSummaryModel

            '''<Summary>
            '''Can this connection be cancelled?
            '''</Summary>
            <ApiMember(DataType:="bool", Description:="Can this connection be cancelled?", Name:="AllowCancel")>
            Public Overridable Property AllowCancel As Boolean

            '''<Summary>
            '''Can this connection be removed?
            '''</Summary>
            <ApiMember(DataType:="bool", Description:="Can this connection be removed?", Name:="AllowRemove")>
            Public Overridable Property AllowRemove As Boolean
        End Class

        Public Partial Class ContactSummaryModel
            '''<Summary>
            '''Contact linked to the profile
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Contact linked to the profile", Name:="ContactId")>
            Public Overridable Property ContactId As Guid

            '''<Summary>
            '''Full name of the contact linked to the profile
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Full name of the contact linked to the profile", Name:="ContactFullName")>
            Public Overridable Property ContactFullName As String

            '''<Summary>
            '''Email Address of the contact linked to the profile
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Email Address of the contact linked to the profile", Name:="EmailAddress")>
            Public Overridable Property EmailAddress As String

            '''<Summary>
            '''Mobile Number of the contact linked to the profile
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Mobile Number of the contact linked to the profile", Name:="MobileNumber")>
            Public Overridable Property MobileNumber As String

            '''<Summary>
            '''Primary Phone Number of the contact linked to the profile
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Primary Phone Number of the contact linked to the profile", Name:="PhoneNumber")>
            Public Overridable Property PhoneNumber As String

            '''<Summary>
            '''Type of contact (person, organisation etc.) linked to the profile
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Type of contact (person, organisation etc.) linked to the profile", Name:="ContactTypeId")>
            Public Overridable Property ContactTypeId As Guid

            '''<Summary>
            '''Profile photo of contact linked to the profile
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Profile photo of contact linked to the profile", Name:="ProfilePhotoUrl")>
            Public Overridable Property ProfilePhotoUrl As String

            '''<Summary>
            '''Thumbnail photo of contact linked to the profile
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Thumbnail photo of contact linked to the profile", Name:="ProfilePhotoThumbnailUrl")>
            Public Overridable Property ProfilePhotoThumbnailUrl As String

            '''<Summary>
            '''Profile description
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Profile description", Name:="Description")>
            Public Overridable Property Description As String

            '''<Summary>
            '''Employment Industry
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Employment Industry", Name:="EmploymentIndustry")>
            Public Overridable Property EmploymentIndustry As String

            '''<Summary>
            '''Employment Role
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Employment Role", Name:="EmploymentRole")>
            Public Overridable Property EmploymentRole As String

            '''<Summary>
            '''Areas of Work
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Areas of Work", Name:="EmploymentGeographicArea")>
            Public Overridable Property EmploymentGeographicArea As String

            '''<Summary>
            '''Timezone Name
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Timezone Name", Name:="TimezoneName", ParameterType:="query")>
            Public Overridable Property TimezoneName As String

            '''<Summary>
            '''The primary address of the contact
            '''</Summary>
            <ApiMember(DataType:="string", Description:="The primary address of the contact", Name:="PrimaryAddress", ParameterType:="query")>
            Public Overridable Property PrimaryAddress As String

            '''<Summary>
            '''Have all connections to the contact been removed?
            '''</Summary>
            <ApiMember(DataType:="bool", Description:="Have all connections to the contact been removed?", Name:="IsRemovedContact")>
            Public Overridable Property IsRemovedContact As Boolean
        End Class

        Public Partial Class PagedModel
            '''<Summary>
            '''Page Number to retrieve
            '''</Summary>
            <ApiMember(DataType:="int", Description:="Page Number to retrieve", Name:="PageNumber")>
            Public Overridable Property PageNumber As Integer

            '''<Summary>
            '''Number of records to retrieve
            '''</Summary>
            <ApiMember(DataType:="int", Description:="Number of records to retrieve", Name:="PageSize")>
            Public Overridable Property PageSize As Integer

            '''<Summary>
            '''Index of field to sort results by
            '''</Summary>
            <ApiMember(DataType:="int", Description:="Index of field to sort results by", Name:="SortIndex")>
            Public Overridable Property SortIndex As Integer

            '''<Summary>
            '''Sort Order - Ascending or Descending
            '''</Summary>
            <ApiMember(DataType:="int", Description:="Sort Order - Ascending or Descending", Name:="SortOrder")>
            Public Overridable Property SortOrder As SortOrder
        End Class

        Public Enum SortOrder
            Ascending
            Descending
        End Enum
    End Namespace

    Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel

        '''<Summary>
        '''Get connections to the specified contact for the requestor contact
        '''</Summary>
        <Api(Description:="Get connections to the specified contact for the requestor contact")>
        Public Partial Class GetConnectionsToContact
            Inherits PagedModel
            '''<Summary>
            '''Contact Id to get connections for
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Contact Id to get connections for", IsRequired:=true, Name:="ContactId")>
            Public Overridable Property ContactId As Guid

            '''<Summary>
            '''Type of the contact to get connections for (i.e. Real/ virtual Person/ Organisation)
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Type of the contact to get connections for (i.e. Real/ virtual Person/ Organisation)", IsRequired:=true, Name:="ContactTypeId")>
            Public Overridable Property ContactTypeId As Guid

            '''<Summary>
            '''Contact Id requesting the details - Current user or licensee
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Contact Id requesting the details - Current user or licensee", IsRequired:=true, Name:="RequestorContactId")>
            Public Overridable Property RequestorContactId As Guid

            '''<Summary>
            '''Return all connections or paged results?
            '''</Summary>
            <ApiMember(Description:="Return all connections or paged results?", Name:="IsPagedMode")>
            Public Overridable Property IsPagedMode As Boolean

            '''<Summary>
            '''Option to return removed connections
            '''</Summary>
            <ApiMember(Description:="Option to return removed connections", Name:="IncludeRemoved")>
            Public Overridable Property IncludeRemoved As Boolean
        End Class

        <ApiResponse(Description:="Connections to the specified contact for the requestor contact")>
        Public Partial Class GetConnectionsToContactResponse
            Public Overridable Property Connections As List(Of ContactConnectionModel)
            Public Overridable Property TotalConnections As Integer
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

VB.NET GetConnectionsToContact DTOs

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

HTTP + OTHER

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

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

{"ContactId":"00000000-0000-0000-0000-000000000000","ContactTypeId":"00000000-0000-0000-0000-000000000000","RequestorContactId":"00000000-0000-0000-0000-000000000000","IsPagedMode":false,"IncludeRemoved":false,"PageNumber":0,"PageSize":0,"SortIndex":0,"SortOrder":"Ascending"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Connections":[{"ConnectionId":"00000000000000000000000000000000","ConnectionRequestId":"00000000000000000000000000000000","Contact":{"ContactId":"00000000-0000-0000-0000-000000000000","ContactFullName":"String","EmailAddress":"String","MobileNumber":"String","PhoneNumber":"String","ContactTypeId":"00000000-0000-0000-0000-000000000000","ProfilePhotoUrl":"String","ProfilePhotoThumbnailUrl":"String","Description":"String","EmploymentIndustry":"String","EmploymentRole":"String","EmploymentGeographicArea":"String","TimezoneName":"String","PrimaryAddress":"String","IsRemovedContact":false},"ContactRoleId":"00000000-0000-0000-0000-000000000000","ContactRoleName":"String","RequestorContactId":"00000000-0000-0000-0000-000000000000","RequestorContactName":"String","RequestorRoleId":"00000000-0000-0000-0000-000000000000","RequestorRoleName":"String","PrimaryRoleName":"String","ConnectionStatusId":"00000000-0000-0000-0000-000000000000","ConnectionStatusName":"String","IsConnectionRequest":false,"IsIncoming":false,"FromDate":"0001-01-01T00:00:00.0000000","SuggesterContact":{"ContactId":"00000000-0000-0000-0000-000000000000","ContactFullName":"String","EmailAddress":"String","MobileNumber":"String","PhoneNumber":"String","ContactTypeId":"00000000-0000-0000-0000-000000000000","ProfilePhotoUrl":"String","ProfilePhotoThumbnailUrl":"String","Description":"String","EmploymentIndustry":"String","EmploymentRole":"String","EmploymentGeographicArea":"String","TimezoneName":"String","PrimaryAddress":"String","IsRemovedContact":false},"AllowCancel":false,"AllowRemove":false}],"TotalConnections":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}