Platform Subscription API

<back to all web services

SaveContactRole

Requires Authentication
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.ServiceModelSubscription
Imports Eros.Saguna.Common.Library.ValidationEngine

Namespace Global

    Namespace Eros.Saguna.Common.Library.ValidationEngine

        Public Partial Class RuleValidationResult
            '''<Summary>
            '''Validation/Error message details
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Validation/Error message details", Name:="Message", ParameterType:="body")>
            Public Overridable Property Message As String

            '''<Summary>
            '''Summary/label of validation/error
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Summary/label of validation/error", Name:="Key", ParameterType:="body")>
            Public Overridable Property Key As String

            '''<Summary>
            '''Key/code representing validation/error
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Key/code representing validation/error", Name:="ErrorCode", ParameterType:="body")>
            Public Overridable Property ErrorCode As String
        End Class

        Public Partial Class ValidationErrorList
            '''<Summary>
            '''List of any validation/errors occuring during a method call
            '''</Summary>
            <ApiMember(DataType:="List<RuleValidationResult>", Description:="List of any validation/errors occuring during a method call", Name:="ValidationErrors", ParameterType:="body")>
            Public Overridable Property ValidationErrors As List(Of RuleValidationResult)
        End Class
    End Namespace

    Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModelSubscription

        Public Partial Class SaveContactRole
            Inherits ValidationErrorList
            Implements ISubscription
            '''<Summary>
            '''Guid representing the external systems data source information.
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Guid representing the external systems data source information.", IsRequired:=true, Name:="SuiteDataSourceInstanceId", ParameterType:="body")>
            Public Overridable Property SuiteDataSourceInstanceId As Guid Implements ISubscription.SuiteDataSourceInstanceId

            '''<Summary>
            '''The unique key that represents the contact role on the external system.
            '''</Summary>
            <ApiMember(DataType:="string", Description:="The unique key that represents the contact role on the external system.", IsRequired:=true, Name:="AlternateKey", ParameterType:="body")>
            Public Overridable Property AlternateKey As String Implements ISubscription.AlternateKey

            '''<Summary>
            '''Guid of the contact role object within PSTPF.  If ObjectId is known, the external system may pass this instead of the alternate key.
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Guid of the contact role object within PSTPF.  If ObjectId is known, the external system may pass this instead of the alternate key.", Name:="ObjectId", ParameterType:="body")>
            Public Overridable Property ObjectId As Guid Implements ISubscription.ObjectId

            '''<Summary>
            '''Object containing all details of the contact role to be inserted or updated.
            '''</Summary>
            <ApiMember(DataType:="SubscriptionContactRoleModel", Description:="Object containing all details of the contact role to be inserted or updated.", IsRequired:=true, Name:="ContactRole", ParameterType:="body")>
            Public Overridable Property ContactRole As SubscriptionContactRoleModel
        End Class

        Public Partial Class SubscriptionContactRoleModel
            '''<Summary>
            '''Name of the role.
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Name of the role.", Name:="RoleName", ParameterType:="body")>
            Public Overridable Property RoleName As String

            '''<Summary>
            '''Short version of the role name.
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Short version of the role name.", Name:="RoleShortName", ParameterType:="body")>
            Public Overridable Property RoleShortName As String

            '''<Summary>
            '''Description of the role purpose.
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Description of the role purpose.", Name:="RoleDescription", ParameterType:="body")>
            Public Overridable Property RoleDescription As String

            '''<Summary>
            '''If true, the role will be pending for a contact until they accept it.
            '''</Summary>
            <ApiMember(DataType:="bool", Description:="If true, the role will be pending for a contact until they accept it.", Name:="RequireContactsToAccept", ParameterType:="body")>
            Public Overridable Property RequireContactsToAccept As Boolean

            '''<Summary>
            '''Contact Types that may have this role.
            '''</Summary>
            <ApiMember(DataType:="List<Guid>", Description:="Contact Types that may have this role.", Name:="ContactTypes", ParameterType:="body")>
            Public Overridable Property ContactTypes As List(Of Guid)

            '''<Summary>
            '''Role Filters this role should be added to.
            '''</Summary>
            <ApiMember(DataType:="List<Guid>", Description:="Role Filters this role should be added to.", Name:="ListItemFilters", ParameterType:="body")>
            Public Overridable Property ListItemFilters As List(Of Guid)
        End Class
    End Namespace
End Namespace

VB.NET SaveContactRole 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 /csv/reply/SaveContactRole HTTP/1.1 
Host: production-eros-platform-apisubscription.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"AlternateKey":"String","ContactRole":{"RoleName":"String","RoleShortName":"String","RoleDescription":"String","RequireContactsToAccept":false,"ContactTypes":["00000000-0000-0000-0000-000000000000"],"ListItemFilters":["00000000-0000-0000-0000-000000000000"]},"ValidationErrors":[{"Message":"String","Key":"String","ErrorCode":"String"}]}
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"}}