Conversation / Partial download

The conversation api is used for updating the content displayed in a conversation, the conversation downloadpartial action is used for downloading messages from the chat server. On success, it will return the last few messages inside of a conversation and when the user is scrolling up to see more messages, it gets called to download more messages.

Conversation download request

Method: POST
URL: ?srv=chatserver&api=chatconversation
Request headers: Content-Type: application/json
Ozeki-Signature: signature
Ozeki-Station: stationId
Ozeki-User: userId
POST data:
{
  "action": "downloadpartial",
  "conversationid": "8ca16186c36a4e0a1ef2096e6c60b613",
  "instance": "PqjfKSn7V8",
  "lastmessagedate": "2024-03-04 13:46:59",
  "lastmessageid": "3f80d821-e105-4089-95b4-0acf0642a047",
  "lastreportdate": "2024-03-04 13:46:59",
  "lastreportid": "44883772-f561-4e30-9872-04454d6051b0",
  "limit": 50,
  "clientversioncode": 3,
  "timestamp": "2024-03-08 13:56:00"
}

Conversation download response

Response headers Content-Type: application/json
Response data:
{
  "status": "OK",
  "errormessage": "",
  "messages":[{ID: "e64fa984-9b2c-4d32-a965-a1faca1d5b83", Type: "Message", Created: "2024-03-04 13:30:36",…},…],
  "reports": [{ID: "e5f21fe5-55a4-45dc-93cb-fc031a59f468", Type: "delivered", Created: "2024-03-04 13:30:36",…},…]
}

Request parameters

userid: This parameter contains the user id of the user. This field can be calculated by taking the md5 checksum of the user's e-mail address. For example: md5("alice@ozeki.hu") = "aa68d2204cb2bb85f2de3b9aad0d86d7";

timestamp: yyyy-MM-dd hh:mm:ss format, in UTC timezone, it's the client's responsibility to convert it into the local timezone.

More information