Trendsic Platform Service

<back to all web services

CustomerLinkListRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/customerlink/resource/{ResourceType}/{ResourceUid}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CustomerLink:
    customer_link_id: int = 0
    customer_link_u_i_d: Optional[str] = None
    token_hash: Optional[str] = None
    resource_type: Optional[str] = None
    resource_uid: Optional[str] = None
    sensitivity_tier: Optional[str] = None
    require_otp: bool = False
    otp_channel: Optional[str] = None
    delivery_channels: Optional[str] = None
    recipient_contact_id: Optional[int] = None
    recipient_email: Optional[str] = None
    recipient_phone: Optional[str] = None
    sms_consent_snapshot: bool = False
    created_by_user_id: Optional[str] = None
    created_by_agent_id: Optional[int] = None
    created_at_utc: datetime.datetime = datetime.datetime(1, 1, 1)
    expires_at_utc: Optional[datetime.datetime] = None
    max_views: Optional[int] = None
    view_count: int = 0
    revoked_at_utc: Optional[datetime.datetime] = None
    revoked_by_user_id: Optional[str] = None
    tenant_id: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CustomerLinkExtended(CustomerLink):
    recipient_display_name: Optional[str] = None
    recipient_type: Optional[str] = None
    status: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CustomerLinkListResponse:
    response_status: Optional[ResponseStatus] = None
    links: List[CustomerLinkExtended] = field(default_factory=list)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CustomerLinkListRequest:
    resource_type: Optional[str] = None
    resource_uid: Optional[str] = None

Python CustomerLinkListRequest 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.

GET /v1/customerlink/resource/{ResourceType}/{ResourceUid} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
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
		}
	},
	Links: 
	[
		{
			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
		}
	]
}