Trendsic Platform Service

<back to all web services

CustomerThreadRequest

The following routes are available for this service:
GET/v1/c/thread/{Kind}/{RefId}
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class CustomerThreadRequest
{
    open var Kind:String? = null
    open var RefId:Int? = null
}

open class CustomerThreadResponse
{
    open var Threads:ArrayList<JobThreadView> = ArrayList<JobThreadView>()
    open var ProblemReasons:ArrayList<ProblemReasonView> = ArrayList<ProblemReasonView>()
    open var Message:String? = null
    open var ResponseStatus:ResponseStatus? = null
}

open class JobThreadView
{
    open var Id:Int? = null
    open var Kind:String? = null
    open var RefId:Int? = null
    open var RefCode:String? = null
    open var WorkerContactId:Int? = null
    open var Who:String? = null
    open var Closed:Boolean? = null
    open var ClosesLocal:String? = null
    open var Unread:Int? = null
    open var Note:String? = null
    open var QuickReplies:ArrayList<String> = ArrayList<String>()
    open var Messages:ArrayList<JobThreadMessageView> = ArrayList<JobThreadMessageView>()
}

open class JobThreadMessageView
{
    open var Id:Int? = null
    open var Party:String? = null
    open var Mine:Boolean? = null
    open var Who:String? = null
    open var Body:String? = null
    open var ViaVoice:Boolean? = null
    open var IsStatusChip:Boolean? = null
    open var ChipKey:String? = null
    open var SentUtc:Date? = null
    open var SentLocal:String? = null
    open var Seen:Boolean? = null
}

open class ProblemReasonView
{
    open var Key:String? = null
    open var Label:String? = null
}

Kotlin CustomerThreadRequest 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/c/thread/{Kind}/{RefId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Threads: 
	[
		{
			Id: 0,
			Kind: String,
			RefId: 0,
			RefCode: String,
			WorkerContactId: 0,
			Who: String,
			Closed: False,
			ClosesLocal: String,
			Unread: 0,
			Note: String,
			QuickReplies: 
			[
				String
			],
			Messages: 
			[
				{
					Id: 0,
					Party: String,
					Mine: False,
					Who: String,
					Body: String,
					ViaVoice: False,
					IsStatusChip: False,
					ChipKey: String,
					SentUtc: 0001-01-01,
					SentLocal: String,
					Seen: False
				}
			]
		}
	],
	ProblemReasons: 
	[
		{
			Key: String,
			Label: String
		}
	],
	Message: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}