| All Verbs | /api/connections/{ContactId}/role/{RoleId} |
|---|
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.Causal.Common.Entity
Namespace Global
Namespace Eros.Causal.Common.Entity
Public Partial Class GuidLookup
Public Overridable Property LookupId As Guid
Public Overridable Property Value As Guid
End Class
End Namespace
Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel
'''<Summary>
'''Connect two contacts in the specified roles
'''</Summary>
<Api(Description:="Connect two contacts in the specified roles")>
Public Partial Class AddConnectionsInRole
'''<Summary>
'''Create a connection from this contact to the specified list of contacts in the specified role.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Create a connection from this contact to the specified list of contacts in the specified role.", IsRequired:=true, Name:="ContactId")>
Public Overridable Property ContactId As Guid
'''<Summary>
'''List of contacts to add to the role, including the type of contact
'''</Summary>
<ApiMember(DataType:="List<GuidLookup>", Description:="List of contacts to add to the role, including the type of contact", IsRequired:=true, Name:="ToContacts")>
Public Overridable Property ToContacts As List(Of GuidLookup) = New List(Of GuidLookup)
'''<Summary>
'''Create a connection between contacts in the specified role.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Create a connection between contacts in the specified role.", IsRequired:=true, Name:="RoleId")>
Public Overridable Property RoleId As Guid
'''<Summary>
'''Send connection emails for auto - accept roles that are being assigned? Note: emails will always be sent if the role requires user acceptance
'''</Summary>
<ApiMember(DataType:="boolean", Description:="Send connection emails for auto - accept roles that are being assigned? Note: emails will always be sent if the role requires user acceptance", IsRequired:=true, Name:="SendConnectionEmails")>
Public Overridable Property SendConnectionEmails As Boolean
End Class
<ApiResponse(Description:="List of roles available for connection from the specified contact for specified contact types")>
Public Partial Class ConnectContactsInRolesResponse
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET AddConnectionsInRole DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/connections/{ContactId}/role/{RoleId} HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ContactId":"00000000-0000-0000-0000-000000000000","ToContacts":[{"LookupId":"00000000-0000-0000-0000-000000000000","Value":"00000000-0000-0000-0000-000000000000"}],"RoleId":"00000000-0000-0000-0000-000000000000","SendConnectionEmails":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}