Platform API

<back to all web services

GetPagedContactsInRole

Requires Authentication
The following routes are available for this service:
All Verbs/api/contacts/paged/{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.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

        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

        Public Partial Class GetPagedContactsInRole
            Inherits PagedModel
            '''<Summary>
            '''Get contacts connected to the current licensee in the specified role
            '''</Summary>
            <ApiMember(Description:="Get contacts connected to the current licensee in the specified role", Name:="RoleId")>
            Public Overridable Property RoleId As Guid

            '''<Summary>
            '''Get contacts of the specified type
            '''</Summary>
            <ApiMember(Description:="Get contacts of the specified type", Name:="ContactTypes")>
            Public Overridable Property ContactTypes As List(Of Guid)

            '''<Summary>
            '''Contact statuses to search for, i.e. Real and/or Virtual
            '''</Summary>
            <ApiMember(DataType:="List<Guid>", Description:="Contact statuses to search for, i.e. Real and/or Virtual", IsRequired:=true, Name:="Statuses")>
            Public Overridable Property Statuses As List(Of Guid) = New List(Of Guid)

            '''<Summary>
            '''Text to filter contacts on. searches for a contact with matches to the string.
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Text to filter contacts on. searches for a contact with matches to the string.", Name:="SearchText")>
            Public Overridable Property SearchText As String

            '''<Summary>
            '''If you want just bare-bones contact info set this to false, if not specified it defaults to true.
            '''</Summary>
            <ApiMember(DataType:="bool?", Description:="If you want just bare-bones contact info set this to false, if not specified it defaults to true.", Name:="IncludeDetails")>
            Public Overridable Property IncludeDetails As Boolean?
        End Class

        <ApiResponse(Description:="Contacts connected to contact by criteria, returning minimal number of columns, and response status")>
        Public Partial Class GetSlimContactsResponse
            Public Overridable Property Contacts As List(Of ContactSummaryModel)
            Public Overridable Property TotalContacts As Integer
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

VB.NET GetPagedContactsInRole DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /api/contacts/paged/{RoleId} HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"RoleId":"00000000-0000-0000-0000-000000000000","ContactTypes":["00000000-0000-0000-0000-000000000000"],"Statuses":["00000000-0000-0000-0000-000000000000"],"SearchText":"String","IncludeDetails":false,"PageNumber":0,"PageSize":0,"SortIndex":0,"SortOrder":"Ascending"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Contacts":[{"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}],"TotalContacts":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}