v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Conversations

Create Order Message

To create an order reply<br>創建訂單留言

post/orders/{id}/messages

Path parameters

idstring required

Order's ID<br>訂單ID

Request body

textstring

The message of the comment<br>該訂單通訊的訊息內容

media_idstring

The id of the media<br>該訂單通訊的媒體id

is_privateboolean

The type of the comment. <br> If true, the message can only be viewed by the shop admin.<br> If false, the message can also be viewed by the customer.<br> 訂單通訊的類型。若為true,則該訂單通訊只能被網店管理查看。<br> 若為false,則顧客也可查看。

send_by'merchant' | 'customer'

The message sender<br>該訂單通訊的發送者

trackable_typestring
trackable_idstring
custom_dataobject

Example request

{
  "text": "Your order will be delivered within a day.",
  "media_id": "612890703dabaa0045eae464",
  "send_by": "merchant",
  "trackable_type": "Order",
  "trackable_id": "6108c0f243cee400443faf4f"
}

Response

Created

idstring

ID of the comment<br>訂單通訊的id

created_atstring

Created Time<br>創建時間

updated_atstring

Updated Time<br>更新時間

textstring

The message of the comment<br>該訂單通訊的訊息內容

owner_idstring

The owner id of the comment<br>該訂單通訊發出者的id

owner_typestring

The owner id of the comment<br>該訂單通訊發出者的類型

trackable_idstring
trackable_typestring
is_privateboolean

The type of the comment. If true, the message can only be viewed by the shop admin.<br> If false, the message can also be viewed by the customer.<br> 訂單通訊的類型。若為true,則該訂單通訊只能被網店管理查看。<br> 若為false,則顧客也可查看。

Example response

{
  "id": "61286ff93dabaa0045eae463",
  "created_at": "2021-08-27T04:54:17.776Z",
  "updated_at": "2021-08-27T04:54:17.776Z",
  "text": "Your order will be delivered within a day.",
  "owner_id": "60c1e0273b33410039018a16",
  "owner_type": "Merchant",
  "trackable_id": "6108c0f243cee400443faf4f",
  "trackable_type": "Order",
  "media": {
    "id": "5f8e5dc08a8bb70a5c9cd93c",
    "alt_translations": {
      "en": "Image ALT",
      "zh-hant": "圖片ALT"
    },
    "images": {
      "original": {
        "width": 800,
        "height": 800,
        "url": "https://img.example.com/media/1234/thumb.jpg"
      }
    }
  }
}