Trendsic Platform Service

<back to all web services

CustomerLinkCreateRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/customerlink
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal

Namespace Global

    Namespace CRM.AgencyPlatform.API.Internal

        Public Partial Class CustomerLink
            Public Overridable Property CustomerLinkId As Integer
            Public Overridable Property CustomerLinkUID As Guid
            Public Overridable Property TokenHash As String
            Public Overridable Property ResourceType As String
            Public Overridable Property ResourceUid As Guid
            Public Overridable Property SensitivityTier As String
            Public Overridable Property RequireOtp As Boolean
            Public Overridable Property OtpChannel As String
            Public Overridable Property DeliveryChannels As String
            Public Overridable Property RecipientContactId As Integer?
            Public Overridable Property RecipientEmail As String
            Public Overridable Property RecipientPhone As String
            Public Overridable Property SmsConsentSnapshot As Boolean
            Public Overridable Property CreatedByUserId As Guid
            Public Overridable Property CreatedByAgentId As Integer?
            Public Overridable Property CreatedAtUtc As Date
            Public Overridable Property ExpiresAtUtc As Date?
            Public Overridable Property MaxViews As Integer?
            Public Overridable Property ViewCount As Integer
            Public Overridable Property RevokedAtUtc As Date?
            Public Overridable Property RevokedByUserId As Guid?
            Public Overridable Property TenantId As Guid
        End Class

        Public Partial Class CustomerLinkCreateRequest
            Public Overridable Property ResourceType As String
            Public Overridable Property ResourceUid As Guid
            Public Overridable Property RecipientContactId As Integer?
            Public Overridable Property RecipientEmail As String
            Public Overridable Property RecipientPhone As String
            Public Overridable Property DeliverEmail As Boolean
            Public Overridable Property DeliverSms As Boolean
            Public Overridable Property ExpiresInHours As Integer?
            Public Overridable Property MaxViews As Integer?
        End Class

        Public Partial Class CustomerLinkCreateResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property Link As CustomerLinkExtended
            Public Overridable Property PortalUrl As String
            Public Overridable Property DeliveryErrors As List(Of String) = New List(Of String)
        End Class

        Public Partial Class CustomerLinkExtended
            Inherits CustomerLink
            Public Overridable Property RecipientDisplayName As String
            Public Overridable Property RecipientType As String
            Public Overridable Property Status As String
        End Class
    End Namespace
End Namespace

VB.NET CustomerLinkCreateRequest DTOs

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

HTTP + JSV

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

POST /v1/customerlink HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ResourceType: String,
	ResourceUid: 00000000000000000000000000000000,
	RecipientContactId: 0,
	RecipientEmail: String,
	RecipientPhone: String,
	DeliverEmail: False,
	DeliverSms: False,
	ExpiresInHours: 0,
	MaxViews: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Link: 
	{
		RecipientDisplayName: String,
		RecipientType: String,
		Status: String,
		CustomerLinkId: 0,
		CustomerLinkUID: 00000000000000000000000000000000,
		TokenHash: String,
		ResourceType: String,
		ResourceUid: 00000000000000000000000000000000,
		SensitivityTier: String,
		RequireOtp: False,
		OtpChannel: String,
		DeliveryChannels: String,
		RecipientContactId: 0,
		RecipientEmail: String,
		RecipientPhone: String,
		SmsConsentSnapshot: False,
		CreatedByUserId: 00000000000000000000000000000000,
		CreatedByAgentId: 0,
		CreatedAtUtc: 0001-01-01,
		ExpiresAtUtc: 0001-01-01,
		MaxViews: 0,
		ViewCount: 0,
		RevokedAtUtc: 0001-01-01,
		RevokedByUserId: 00000000000000000000000000000000,
		TenantId: 00000000000000000000000000000000
	},
	PortalUrl: String,
	DeliveryErrors: 
	[
		String
	]
}