GET
/api/v1/customer/messages/{id}/view
This API method will return the thread messages of a message group, with customizable pagination results.
Request Parameters
Parameter | Value / Type | Required |
|---|---|---|
page | INTEGER (Default: 1) | false |
per_page | INTEGER (Default: 50) | false |
include_group | BOOLEAN (Default: false) | false |
platform | STRING | false |
Sample Response
{
"status": true,
"count": 2,
"pages": 1,
"items": [
{
"id": "BRjOndDLzWqeVr18yv6p",
"group_id": "5pYWkXQBmN2moZJaqx3D",
"customer_id": "bZ6xBGP2mdPm3R8VX17L",
"body": "Hey dude. Nothing much and you?",
"platform_name": null,
"created_at": "2018-08-09 08:52:05",
"is_blocked": true
},
{
"id": "XNgWDZr9E5pzAd04V5Mn",
"group_id": "5pYWkXQBmN2moZJaqx3D",
"customer_id": "LZWBJx0PmYkEwjGdr2vO",
"body": "Hey man! How ya been?",
"platform_name": null,
"created_at": "2018-08-08 08:51:45",
"is_blocked": false
}
],
"group": {
"group_id": "5pYWkXQBmN2moZJaqx3D",
"group_name": "Diane, John, 1 Blocked User",
"group_image": null,
"last_message": "Hey dude. Nothing much and you?",
"last_message_time": "2018-08-09 08:52:05",
"initial_customer_id": "LZWBJx0PmYkEwjGdr2vO",
"initial_customer_name": "Steve Phillips",
"initial_customer_avatar": "http:\/\/controlcenter.ftx\/customer\/images\/default-avatars\/6?v=1531318162",
"last_customer": "bZ6xBGP2mdPm3R8VX17L",
"last_customer_name": "Devin Martinolich",
"last_customer_avatar": "http:\/\/controlcenter.ftx\/customer\/images\/default-avatars\/4?v=1513629663",
"read_status": 1,
"notifications_disabled": 1,
"group_members": [
{
"id": "LZWBJx0PmYkEwjGdr2vO",
"name": "Steve Phillips",
"avatar": "http:\/\/controlcenter.ftx\/customer\/images\/default-avatars\/6?v=1531318162",
"customer_description": "",
"friend_status": -1,
"total_balance": 0,
"is_blocked": false
},
{
"id": "bZ6xBGP2mdPm3R8VX17L",
"is_blocked": true
},
{
"id": "nK8oWGj0zxqELP1A53ak",
"name": "Diane Phillips",
"avatar": "http:\/\/controlcenter.ftx\/customer\/images\/default-avatars\/4?v=1513880339",
"customer_description": "",
"friend_status": -1,
"total_balance": 0,
"is_blocked": false
},
{
"id": "QD59AxOJm2MenXb14Pw7",
"name": "John Murdock",
"avatar": "http:\/\/controlcenter.ftx\/customer\/images\/avatar\/QD59AxOJm2MenXb14Pw7\/thumb_small?v=1517056469",
"customer_description": "",
"friend_status": -1,
"total_balance": 0,
"is_blocked": false
}
]
}
}{
"status": false,
"errorCode": "NO_ITEMS",
"message": "There are no messages available in this group"
}{
"status": false,
"message": "Message group could not be found"
}{
"status": false,
"message": "You are not part of this chat group"
}