Get Conversations
Function
Get Conversations with platform.
藉由平台獲取對話列表。
URL
GET <<api_domain>>/v1/conversations
Request parameters
Parameter | Type | Description | Example |
---|---|---|---|
platform *required | String | Platform, only support shop_messages and order_messages 獲取平台,目前僅支援網店訊息及訂單訊息 | platform=shop_messages |
customer_id | String | Customer ID ID | 622090c67895b5731f2c53c5 |
page | Integer | Page Number 頁數(第n頁) (Default: 1) | page=1 |
per_page | Integer | Numbers of Products per page 每頁顯示 n 筆資料 (Default: 24) - *It's suggested to set per_page number to 50 建議 per_page 至多設定50 | per_page=24 |
Response fields
Field | Type | Description | Example |
---|---|---|---|
pagination | Pagination | Pagination 頁面資訊 | Please check the link on the left |
items | Array | Array of Conversations 對話列表資訊 | Shown below |
Items entity (shop_messages)
Field | Type | Description | Example |
---|---|---|---|
id | String | Conversation ID | 622090c66775a37b9fa60799 |
type | String | Conversation Platform | shop_messages |
customer_id | String | Customer ID | 622090c67895b5731f2c53c5 |
last_message | Hash | Last Message Info | { id: '600ac08191f6530044eaad8a', sender_id: '622090c67895b5731f2c53c5', sender_type: 'User', created_at: '2021-01-25T09:39:35.167Z', value: '對話內容', type: 'image' } |
Items entity (order_messages)
Field | Type | Description | Example |
---|---|---|---|
id | String | Conversation ID | 622090c66775a37b9fa60799 |
type | String | Conversation Platform | order_messages |
customer_id | String | Customer ID | 622090c67895b5731f2c53c5 |
order_number | String | Order Number | 2019052707260498 |
system_order_number | String | System Order Number | 2019052707260498 |
merchant_order_number | String | Merchant Order Number Depending on rollout_key | null |
order_id | String | Order ID | 5d8c8b3be388095d25acbc89 |
last_message | Hash | Last Message Info | { id: '600ac08191f6530044eaad8a', sender_id: '622090c67895b5731f2c53c5', sender_type: 'User', created_at: '2021-01-25T09:39:35.167Z', value: '對話內容', type: 'text' } |
Response Example
{
"pagination": {
"current_page": 1,
"per_page": 24,
"total_count": 8,
"total_pages": 1
},
"items": [
{
"id": "622090c66775a37b9fa60799",
"type": "shop_messages",
"customer_id": "622090c67895b5731f2c53c5",
"last_message": {
"id": "622090c66775a37b9fa6079b",
"sender_id": "622090c67895b5731f2c53c5",
"sender_type": "User",
"created_at": "2022-03-03T09:56:22.559Z",
"value": "你好",
"type": "text"
}
},
{
"id": "600d713291f6530044eab0d5",
"type": "shop_messages",
"customer_id": "600d71329888be544e4f27fb",
"last_message": {
"id": "600d723a91f6530044eab0d9",
"sender_id": "600d71329888be544e4f27fb",
"sender_type": "User",
"created_at": "2021-01-24T13:12:26.282Z",
"value": null,
"type": "image"
}
}
]
}
{
"pagination": {
"current_page": 1,
"per_page": 5,
"total_count": 115,
"total_pages": 23
},
"items": [
{
"id": "600f6e0d8e9f8a1afe47c51b",
"type": "order_messages",
"customer_id": "600f6e0bbd33f1064c090c97",
"order_number": null,
"system_order_number": null,
"merchant_order_number": null,
"order_id": "600f6e0d8e9f8a1afe47c51b",
"last_message": {
"id": "600f6e458e9f8a1afe47c526",
"sender_id": "600f6e0bbd33f1064c090c97",
"sender_type": "User",
"created_at": "2021-01-26T01:20:05.801Z",
"value": "Hi",
"type": "text"
}
}
]
}
Updated 11 months ago