| All Verbs | /api/searchcontactsforroles |
|---|
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 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
End Namespace
Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel
'''<Summary>
'''Search contacts by Name or Email Address, by Role Groups, or by Roles
'''</Summary>
<Api(Description:="Search contacts by Name or Email Address, by Role Groups, or by Roles")>
Public Partial Class SearchContactsForRole
'''<Summary>
'''Search type: by Name or Email Address, by Role Groups, or by Roles
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Search type: by Name or Email Address, by Role Groups, or by Roles", IsRequired:=true, Name:="SearchBy")>
Public Overridable Property SearchBy As Guid
'''<Summary>
'''Roles that contacts are connected to.
'''</Summary>
<ApiMember(DataType:="List<Guid>", Description:="Roles that contacts are connected to.", Name:="Roles")>
Public Overridable Property Roles As List(Of Guid)
'''<Summary>
'''Role Groups that contacts are connected to.
'''</Summary>
<ApiMember(DataType:="List<Guid>", Description:="Role Groups that contacts are connected to.", Name:="RoleGroups")>
Public Overridable Property RoleGroups As List(Of Guid)
'''<Summary>
'''For Search by Name or Email Address, filters contact results by this text value.
'''</Summary>
<ApiMember(DataType:="string", Description:="For Search by Name or Email Address, filters contact results by this text value.", Name:="SearchText")>
Public Overridable Property SearchText As String
'''<Summary>
'''Excludes contacts already connected to this role.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Excludes contacts already connected to this role.", Name:="ExcludeRole")>
Public Overridable Property ExcludeRole As Guid
'''<Summary>
'''Filters contact results by contact type(s) provided, e.g. Real Persons, Organisations etc. Defaults to real person.
'''</Summary>
<ApiMember(DataType:="List<Guid>", Description:="Filters contact results by contact type(s) provided, e.g. Real Persons, Organisations etc. Defaults to real person.", Name:="ContactTypes")>
Public Overridable Property ContactTypes As List(Of Guid)
'''<Summary>
'''Determines whether the contact details (Email, mobile number etc.) to be returned.
'''</Summary>
<ApiMember(DataType:="Bool", Description:="Determines whether the contact details (Email, mobile number etc.) to be returned.", Name:="IncludeDetails")>
Public Overridable Property IncludeDetails As Boolean
End Class
Public Partial Class SearchContactsForRoleResponse
Public Overridable Property Contacts As List(Of ContactSummaryModel)
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET SearchContactsForRole DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/searchcontactsforroles HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Roles:
[
00000000-0000-0000-0000-000000000000
],
RoleGroups:
[
00000000-0000-0000-0000-000000000000
],
SearchText: String,
ContactTypes:
[
00000000-0000-0000-0000-000000000000
],
IncludeDetails: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Contacts:
[
{
ContactFullName: String,
EmailAddress: String,
MobileNumber: String,
PhoneNumber: String,
ProfilePhotoUrl: String,
ProfilePhotoThumbnailUrl: String,
Description: String,
EmploymentIndustry: String,
EmploymentRole: String,
EmploymentGeographicArea: String,
TimezoneName: String,
PrimaryAddress: String,
IsRemovedContact: False
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}