Needio.Services

<back to all web services

GetChatMessageListRequest

Requires Authentication
The following routes are available for this service:
All Verbs/Chat/GetChatMessages/
GetChatMessageListRequest Parameters:
NameParameterData TypeRequiredDescription
ChatIdquerystringNo
StartSeqIdqueryintNo
EndSeqIdqueryintNo
PagequeryintNo
CountqueryintNo
ReadYnqueryboolNo
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
startformDateTimeNo
DeviceUUIDformstringNo
GetChatMessageListResponse Parameters:
NameParameterData TypeRequiredDescription
ChatformChatSessionNo
MessagesformList<ChatMessage>No
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
ResultformboolNo
ResMessageformstringNo
ErrorformErrorNo
PageInfoformBasePageInfoNo
Error Parameters:
NameParameterData TypeRequiredDescription
ErrorYnformboolNo
ErrorCodeformstringNo
ErrorDescriptionformstringNo
BasePageInfo Parameters:
NameParameterData TypeRequiredDescription
TotalRecordCountformintNo
TotalPageCountformintNo
CurrentPageformintNo
ChatSession Parameters:
NameParameterData TypeRequiredDescription
IdformObjectIdNo
StoreIdformint?No
StoreMediaIdformint?No
MediaFileNameformstringNo
SalerIdformint?No
BuyerIdformint?No
SalerDescformstringNo
BuyerDescformstringNo
StartDateformDateTimeNo
LastMessageDateformDateTimeNo
LastSeqIdformintNo
CpSeqIdformintNo
MessageCountformintNo
StatusformChatStatusesNo
ChatTypeformChatTypesNo
UsersformList<ChatUser>No
LastMessageformstringNo
BGColorformstringNo
BasketIdformintNo
ChatStatuses Enum:
NameValue
Active1
WaitForSalerAction2
WaitForBuyerAction3
WaitForAdminAction4
WaitForRateAction5
WaitForShipAction6
Completed10
Archived11
Deleted99
ChatTypes Enum:
NameValue
Sale1
P2P2
ChatUser Parameters:
NameParameterData TypeRequiredDescription
UserIdformintNo
UserNameformstringNo
AvatarformstringNo
LastReadSeqIdformintNo
ActiveYnformintNo
ChatMessage Parameters:
NameParameterData TypeRequiredDescription
IdformObjectIdNo
ChatIdformObjectIdNo
SeqIdformintNo
SenderIdformintNo
StoreIdformint?No
BuyerIdformint?No
BuyerNameformstringNo
ReceiverIdformint?No
DateformDateTimeNo
TypeformMessageTypesNo
TextformstringNo
MediaformChatMediaNo
LocationformGeoLocationNo
Location2formGeoLocationNo
RefNoformstringNo
MessageTypes Enum:
NameValue
Text1
Media2
Location3
Basket4
PaymentRequest11
Payment12
Approve21
Review22
Auto101
Cargo102
ChatMedia Parameters:
NameParameterData TypeRequiredDescription
IdformObjectIdNo
MediaTypeformMediaTypesNo
FileNameformstringNo
SourceformstringNo
MediaMimeformstringNo
UrlformstringNo
MediaTypes Enum:
NameValue
icon0
Image1
Video2
Youtube3
Pdf8
File9
Custom10
GeoLocation Parameters:
NameParameterData TypeRequiredDescription
LonformstringNo
LatformstringNo
GeoAddressformstringNo
IsDeletedformboolNo
GetChatMessageListResponse Parameters:
NameParameterData TypeRequiredDescription
ChatformChatSessionNo
MessagesformList<ChatMessage>No

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 /Chat/GetChatMessages/ HTTP/1.1 
Host: baseservices2.needion.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ChatId: String,
	StartSeqId: 0,
	EndSeqId: 0,
	Page: 0,
	Count: 0,
	ReadYn: False,
	start: 2020-09-26T10:19:08.5876474+03:00,
	DeviceUUID: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Chat: 
	{
		Id: 000000000000000000000000,
		StoreId: 0,
		StoreMediaId: 0,
		MediaFileName: String,
		SalerId: 0,
		BuyerId: 0,
		SalerDesc: String,
		BuyerDesc: String,
		StartDate: 0001-01-01,
		LastMessageDate: 0001-01-01,
		LastSeqId: 0,
		CpSeqId: 0,
		MessageCount: 0,
		Status: 1,
		ChatType: 1,
		Users: 
		[
			{
				UserId: 0,
				UserName: String,
				Avatar: String,
				LastReadSeqId: 0,
				ActiveYn: 0
			}
		],
		LastMessage: String,
		BGColor: String,
		BasketId: 0
	},
	Messages: 
	[
		{
			Id: 000000000000000000000000,
			ChatId: 000000000000000000000000,
			SeqId: 0,
			SenderId: 0,
			StoreId: 0,
			BuyerId: 0,
			BuyerName: String,
			ReceiverId: 0,
			Date: 0001-01-01,
			Type: 1,
			Text: String,
			Media: 
			{
				Id: 000000000000000000000000,
				MediaType: 0,
				FileName: String,
				Source: String,
				MediaMime: String,
				Url: String
			},
			Location: 
			{
				Lon: String,
				Lat: String,
				GeoAddress: String,
				IsDeleted: False
			},
			Location2: 
			{
				Lon: String,
				Lat: String,
				GeoAddress: String,
				IsDeleted: False
			},
			RefNo: String
		}
	],
	Result: False,
	ResMessage: String,
	Error: 
	{
		ErrorYn: False,
		ErrorCode: String,
		ErrorDescription: String
	},
	PageInfo: 
	{
		TotalRecordCount: 0,
		TotalPageCount: 0,
		CurrentPage: 0
	}
}