Get Conversation Messages
Function
Get List of Messages of conversation with platform.
藉由平台獲取單一對話內訊息列表。
URL
GET <<api_domain>>/v1/conversations/:conversationId/messages
Request parameters
Parameter | Type | Description | Example |
---|---|---|---|
conversationId *required | String | Conversation ID 對話 ID | 622090c66775a37b9fa60799 |
platform *require | String | Platform, only support shop_messages and order_messages 獲取平台,目前僅支援網店訊息及訂單訊息 | platform=shop_messages |
limit | Integer | Numbers of Messages Limit 顯示 n 筆資料 (Default: 24) | limit=24 |
start | String | Messages Start From 訊息起始時間 | 2022-08-23T07:57:01.134Z |
end | String | Messages End Before 訊息結束時間 | 2022-08-23T07:57:01.134Z |
Response fields
Field | Type | Description | Example |
---|---|---|---|
limit | Integer | Numbers of Messages Limit 顯示 n 筆資料 (Default: 24) | 24 |
total | Integer | Total Messages 總筆數 | 4 |
items | Array | Array of Messages 對話訊息列表資訊 | Please check below |
Items entity (shop_messages)
Field | Type | Description | Example |
---|---|---|---|
id | String | Message ID | 58d25b6201cda3475300002b |
platform | String | Platform | shop_messages |
message | Hash | Message Contentsender_id: Sender ID sender_type: Sender Type acting_sender_id: Performer ID is_sent_by_merchant: Is Sent by Merchant attachment: Image Info content: Text Content | {"sender_id": "600d71329888be544e4f27fb", "sender_type": "User", "created_at": "2021-01-24T13:12:26.282Z", "acting_sender_id": null, "is_sent_by_merchant": false, "attachment": { "image_url": "s3_url", "type": "image"}, "content": { "text": "shoplineapp.com"} } |
Items entity (order_messages)
Field | Type | Description | Example |
---|---|---|---|
id | String | Message ID | 58d25b6201cda3475300002b |
type | String | Type | note message |
platform | String | Platform | order_messages |
message | Hash | Message Contentsender_id : Sender IDsender_type : Sender Type (e.g., User , Merchant ,Bot )acting_sender_id : Performer IDis_sent_by_merchant : Is Sent by Merchantattachment : Image Infocontent : Text Content | {"sender_id": "5ff6d89e36b0092881082d70", "sender_type": "User", "created_at": "2021-01-21T04:28:50.656Z", "acting_sender_id": "5ff6d89e36b0092881082d70", "is_sent_by_merchant": false, "content": {"text": "YA"}, "attachment": { "image_url":"s3_url", "type": "image"} } |
Response Example
{
"total": 4,
"limit": 2,
"items": [
{
"id": "600d7164b98742004640e533",
"platform": "shop_messages",
"message": {
"sender_id": "5e6b6e242c389a0016d21048",
"sender_type": "User",
"created_at": "2021-01-24T13:08:52.613Z",
"acting_sender_id": "58ef246969702d5afd040000",
"is_sent_by_merchant": true,
"attachment": {
"image_url": "https://img-shoplineapp-com.s3.amazonaws.com/media/image_clips/600d7162e598300047ef0526/original.png?1611493730",
"type": "image"
}
}
},
{
"id": "600d714ab98742004640e532",
"platform": "shop_messages",
"message": {
"sender_id": "5e6b6e242c389a0016d21048",
"sender_type": "User",
"created_at": "2021-01-24T13:08:26.416Z",
"acting_sender_id": "58ef246969702d5afd040000",
"is_sent_by_merchant": true,
"content": {
"text": "[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]"
}
}
}
]
}
{
"total": 1,
"limit": 1,
"items": [
{
"id": "6009030217690700468512ec",
"type": "message",
"platform": "order_messages",
"message": {
"sender_id": "5ff6d89e36b0092881082d70",
"sender_type": "User",
"created_at": "2021-01-21T04:28:50.656Z",
"acting_sender_id": "5ff6d89e36b0092881082d70",
"is_sent_by_merchant": false,
"content": {
"text": "YA"
},
"attachment": {
"image_url": "https://img-shoplineapp-com.s3.amazonaws.com/media/image_clips/600902fb17690700468512eb/original.?1611203323",
"type": "image"
}
}
}
]
}
Updated 2 days ago