Appearance
Get IM Messages ​
Retrieve instant messages with a specific buyer, with pagination support.
Basic Information ​
| Property | Value |
|---|---|
| Method | POST |
| Path | /seller/im/msg |
| Authentication | Bearer Token |
| Content-Type | application/json |
Request Headers ​
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer <accessToken> |
Request Body Parameters ​
| Parameter | Type | Required | Description |
|---|---|---|---|
buyerId | integer | Yes | Buyer ID (can be null to fetch all) |
minTime | integer | Yes | Minimum message time (UTC timestamp in seconds) |
maxTime | integer | Yes | Maximum message time (UTC timestamp in seconds). When fetching next page, set to lastMsgTime of previous response |
lastMsgKey | string | No | MsgKey of the last message from previous fetch (required for pagination) |
Request Example ​
http
POST /merchant-api/seller/im/msg HTTP/1.1
Host: paas-gateway.imetastore.io
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
"buyerId": 1907369850568257537,
"minTime": 1734400000,
"maxTime": 1734500000
}Response Parameters ​
| Parameter | Type | Description |
|---|---|---|
data.msgCnt | integer | Number of messages returned |
data.complete | integer | 1 = all messages fetched; 0 = more remain |
data.lastMsgTime | integer | Timestamp of last message (milliseconds) |
data.lastMsgKey | string | MsgKey for fetching next page |
data.msgList | array | Message list |
data.msgList[].fromAccount | string | Sender account |
data.msgList[].toAccount | string | Receiver account |
data.msgList[].msgTimestamp | integer | Message timestamp |
data.msgList[].msgDateTime | string | Message datetime |
data.msgList[].msgSeq | integer | Message sequence number |
data.msgList[].msgRandom | integer | Message random number |
data.msgList[].msgBody | array | Message body list |
data.msgList[].msgBody[].msgType | string | Message type |
data.msgList[].msgBody[].msgContent | string | Message content |
Success Response ​
json
{
"code": "0000",
"msg": "Success",
"time": "2025-12-17T13:44:16.000Z",
"data": {
"msgCnt": 2,
"complete": 1,
"lastMsgTime": 1734443056000,
"lastMsgKey": "msg-key-abc123",
"msgList": [
{
"fromAccount": "seller_001",
"toAccount": "1907369850568257537",
"msgTimestamp": 1734443056,
"msgDateTime": "2025-12-17 14:30:56",
"msgSeq": 1,
"msgRandom": 123456789,
"msgBody": [
{
"msgType": "TIMTextElem",
"msgContent": "{\"text\":\"Hello! Your order has been delivered.\"}"
}
]
}
]
}
}