Field Squared API Services

<back to all web services

Conversation

The following routes are available for this service:
GET,POST/{Workspace}/Conversation
GET/{Workspace}/Conversation/{ObjectId}
GET/{Workspace}/Conversation/Search/{MemberId}
GET/{Workspace}/Conversation/Search/{SearchType}/{SearchText}
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Field2Office.API.Model.Messaging

Namespace Global

    Namespace Field2Office.API.Model.Messaging

        Public Partial Class Conversation
            Public Sub New()
                Members = New List(Of String)
                Events = New List(Of ConversationEvent)
            End Sub

            Public Overridable Property ObjectId As String
            Public Overridable Property Workspace As String
            Public Overridable Property TeamId As String
            Public Overridable Property Members As List(Of String)
            Public Overridable Property Events As List(Of ConversationEvent)
            Public Overridable Property Unread As Long
            Public Overridable Property MemberId As String
            Public Overridable Property SearchType As String
            Public Overridable Property SearchText As String
        End Class

        Public Partial Class ConversationEvent
            Public Overridable Property ObjectId As String
            Public Overridable Property Workspace As String
            Public Overridable Property [Date] As String
            Public Overridable Property ConversationId As String
            Public Overridable Property UserId As String
            Public Overridable Property Text As String
            Public Overridable Property ThumbnailId As String
            Public Overridable Property IsLink As Boolean
        End Class
    End Namespace
End Namespace

VB.NET Conversation 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 /{Workspace}/Conversation HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ObjectId: String,
	Workspace: String,
	TeamId: String,
	Members: 
	[
		String
	],
	Events: 
	[
		{
			ObjectId: String,
			Workspace: String,
			Date: String,
			ConversationId: String,
			UserId: String,
			Text: String,
			ThumbnailId: String,
			IsLink: False
		}
	],
	Unread: 0,
	MemberId: String,
	SearchType: String,
	SearchText: String
}