GET
/affiliate_seller/202412/conversations/messages/list/newest
Get the unread messages from the last minute. You are recommended to use the Webhook, New Message Listener, for the message notification.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”shop_cipher
required
string
Identifies the shop. Obtain it from the Get Authorized Shops API.
Responses
Section titled “Responses”Success
Media typeapplication/json
object
code
Status code; 0 means success.
integer format: int64
message
Success or failure message.
string
request_id
Request log ID.
string
data
object
newest_message_list
The list of unread messages from the last minute.
Array<object>
object
conversation_id
The converastion id to which the message belongs
string
content
Message content as a JSON-serialized string. Parse the string as a JSON object; its shape depends on type:
TEXT:{"content": "simple text"}PRODUCT_CARD:{"product_id": "12345"}TARGET_COLLABORATION_CARD:{"invitation_group_id": "1234"}FREE_SAMPLE_CARD:{"apply_id": "1234"}IMAGE:{"height": "290", "url": "<image URL>", "width": "304"}CRM_TEXT_WITH_IMAGE_CARD:{"title": "abc", "content": "efg", "url": "<image URL>"}CRM_TEXT_WITH_PRODUCTS_CARD:{"title": "abc", "content": "efg", "product_ids": [123, 456, 789, 222]}NOTIFICATIONorSYSTEM:{"content": "notification or system message"}EMOTICONS:{"height": "110", "url": "<image URL>", "width": "110"}
string
type
Message type. Possible values:
- TEXT
- PRODUCT_CARD
- TARGET_COLLABORATION_CARD
- FREE_SAMPLE_CARD
- IMAGE
- CRM_TEXT_WITH_IMAGE_CARD
- CRM_TEXT_WITH_PRODUCTS_CARD
- NOTIFICATION
- EMOTICONS
- SYSTEM
string
sender_id
Sender’s IM id
string
unread_message_count
The number of unread messages of the sender in the conversation.
integer format: int64
Example
{ "code": 0, "data": { "newest_message_list": [ { "conversation_id": "12345", "content": "{\"content\": \"simple text message\"}", "type": "TEXT", "sender_id": "12345678", "unread_message_count": 1 } ] }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}