Platform API

<back to all web services

AddContactRole

Add a custom role for the licensee

Requires Authentication
The following routes are available for this service:
POST/api/roles
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 ListItemFilterModel
            Public Overridable Property ListItemFilterId As Guid
            Public Overridable Property FilterName As String
            Public Overridable Property ListId As Guid
            Public Overridable Property ListItemId As Guid
            Public Overridable Property ListItemIsInFilter As Boolean
        End Class

        Public Partial Class RoleDetailsModel
            '''<Summary>
            '''Role Id
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Role Id", Name:="RoleId")>
            Public Overridable Property RoleId As Guid

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

            '''<Summary>
            '''Role Connection Definition Id
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Role Connection Definition Id", Name:="RoleConnectionDefinitionId")>
            Public Overridable Property RoleConnectionDefinitionId As Guid

            '''<Summary>
            '''Contact Types the Role applies to
            '''</Summary>
            <ApiMember(DataType:="List", Description:="Contact Types the Role applies to", Name:="ContactTypes")>
            Public Overridable Property ContactTypes As List(Of Guid)

            '''<Summary>
            '''Does the role require contacts to accept it?
            '''</Summary>
            <ApiMember(DataType:="bool", Description:="Does the role require contacts to accept it?", Name:="RequireContactsToAccept")>
            Public Overridable Property RequireContactsToAccept As Boolean

            '''<Summary>
            '''Filters linked to the custom role.
            '''</Summary>
            <ApiMember(DataType:="List", Description:="Filters linked to the custom role.", Name:="ListItemFilters")>
            Public Overridable Property ListItemFilters As List(Of ListItemFilterModel)
        End Class
    End Namespace

    Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel

        '''<Summary>
        '''Add a custom role for the licensee
        '''</Summary>
        <Api(Description:="Add a custom role for the licensee")>
        Public Partial Class AddContactRole
            '''<Summary>
            '''Details of the Contact Role to be Added.
            '''</Summary>
            <ApiMember(DataType:="RoleDetailsModel", Description:="Details of the Contact Role to be Added.", IsRequired:=true, Name:="RoleDetails", ParameterType:="query")>
            Public Overridable Property RoleDetails As RoleDetailsModel
        End Class
    End Namespace
End Namespace

VB.NET AddContactRole DTOs

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

HTTP + CSV

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

POST /api/roles HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"RoleDetails":{"RoleId":"00000000-0000-0000-0000-000000000000","RoleName":"String","RoleConnectionDefinitionId":"00000000-0000-0000-0000-000000000000","ContactTypes":["00000000-0000-0000-0000-000000000000"],"RequireContactsToAccept":false,"ListItemFilters":[{"ListItemFilterId":"00000000-0000-0000-0000-000000000000","FilterName":"String","ListId":"00000000-0000-0000-0000-000000000000","ListItemId":"00000000-0000-0000-0000-000000000000","ListItemIsInFilter":false}]}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}