Create Shop Message
Function
To create shop message
建立訊息
URL
POST <<api_domain>>/v1/conversations/message
Request Parameters
Parameter | Type | Description | Example |
---|---|---|---|
sender_id *Required | String | Sender ID 發送者ID | 5ce0d084e388096bdb229a59 |
recipient_id *Required | String | Recipient ID 接收者ID | 5ce0d084e388096bdb229a59 |
text | String | Text 文字內容 | hello |
media_id | String | Media ID 圖片ID | 5ce0d084e388096bdb229a59 |
ref_data.path | String | Path 路徑 用於儲存用戶發送訊息當下的路徑,顯示於訊息中心 | /messages |
ref_data.full_path | String | Full Path 完整路徑 用於儲存用戶發送訊息當下的路徑,顯示於訊息中心 | https://mydomain.com/messages |
Request Example
curl --location --request POST '<<api_domain>>/v1/conversations/message' \
--header 'Authorization: Bearer ${token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"media_id": "64216d1a818ba9004cc4cce7",
"sender_email": "[email protected]",
"sender_id": "60f64c7b262ba6001b9c0463",
"recipient_id": "63e4b7faa7234a05c9626520",
"ref_data": {
"path": "/",
"full_path": "/"
}
}'
Response Body
{
"id": "6421755e203c0e44f88f3ed5",
"platform": "shop_messages",
"message": {
"sender_id": "60f64c7b262ba6001b9c0463",
"created_at": "2023-03-27T10:52:14.101Z",
"acting_sender_id": "625ce9457b7d28003882d517",
"is_sent_by_merchant": true,
"attachment": {
"image_url": "https://img-shoplineapp-com.s3.amazonaws.com/media/image_clips/64216d1a818ba9004cc4cce7/original.jpeg?1679912218",
"type": "image"
}
}
}
Updated about 1 month ago