Trendsic Platform Service

<back to all web services

CustomerThreadPostRequest

The following routes are available for this service:
POST/v1/c/thread/{Kind}/{RefId}
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 CustomerThreadPostRequest
            Public Overridable Property Kind As String
            Public Overridable Property RefId As Integer
            Public Overridable Property WorkerContactId As Integer
            Public Overridable Property Body As String
        End Class

        Public Partial Class CustomerThreadResponse
            Public Overridable Property Threads As List(Of JobThreadView) = New List(Of JobThreadView)
            Public Overridable Property ProblemReasons As List(Of ProblemReasonView) = New List(Of ProblemReasonView)
            Public Overridable Property Message As String
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        Public Partial Class JobThreadMessageView
            Public Overridable Property Id As Integer
            Public Overridable Property Party As String
            Public Overridable Property Mine As Boolean
            Public Overridable Property Who As String
            Public Overridable Property Body As String
            Public Overridable Property ViaVoice As Boolean
            Public Overridable Property IsStatusChip As Boolean
            Public Overridable Property ChipKey As String
            Public Overridable Property SentUtc As Date
            Public Overridable Property SentLocal As String
            Public Overridable Property Seen As Boolean
        End Class

        Public Partial Class JobThreadView
            Public Overridable Property Id As Integer
            Public Overridable Property Kind As String
            Public Overridable Property RefId As Integer
            Public Overridable Property RefCode As String
            Public Overridable Property WorkerContactId As Integer
            Public Overridable Property Who As String
            Public Overridable Property Closed As Boolean
            Public Overridable Property ClosesLocal As String
            Public Overridable Property Unread As Integer
            Public Overridable Property Note As String
            Public Overridable Property QuickReplies As List(Of String) = New List(Of String)
            Public Overridable Property Messages As List(Of JobThreadMessageView) = New List(Of JobThreadMessageView)
        End Class

        Public Partial Class ProblemReasonView
            Public Overridable Property Key As String
            Public Overridable Property Label As String
        End Class
    End Namespace
End Namespace

VB.NET CustomerThreadPostRequest DTOs

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

HTTP + OTHER

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

POST /v1/c/thread/{Kind}/{RefId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Kind":"String","RefId":0,"WorkerContactId":0,"Body":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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-01T00:00:00.0000000","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"}}}