POST api/ChatSocket/WebSocket

WebSocket 參數說明

Request Information

URI Parameters

None.

Body Parameters

WebSocketIn_msg
NameDescriptionTypeAdditional information
type

消息類型(text ,image ,title)text 文本image 圖片title 主題(商品,訂單,其他)staff 客服指派,客服結案

string

None.

content

訊息內容 text:訊息內容image:圖片路徑title:主題訂單編號或商品編號

string

None.

read

是否已讀true / false

boolean

None.

titletype

主題類型(pro,order,other)pro 商品order 訂單other 其他confirm 客服指派assignment 客服結案

string

None.

Request Formats

application/json, text/json

Sample:
{
  "type": "sample string 1",
  "content": "sample string 2",
  "read": true,
  "titletype": "sample string 4"
}

text/html

Sample:
{"type":"sample string 1","content":"sample string 2","read":true,"titletype":"sample string 4"}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

WebSocket 參數說明

WebSocketOut_Output
NameDescriptionTypeAdditional information
MsgStatus

返回類型(Login,Send,Receive) Login 登入Send 發送消息Receive 接收消息

string

None.

Result

返回狀態 (true/false) true 成功 false 失敗

boolean

None.

msg

消息

WebSocketOut_msg

None.

Error

錯誤消息 Result = false 返回

string

None.

NoReadQty

未讀消息數量(MsgStatus=“Receive”才有 )

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "MsgStatus": "sample string 1",
  "Result": true,
  "msg": {
    "SendSn": "sample string 1",
    "SendName": "sample string 2",
    "SendType": "sample string 3",
    "type": "sample string 4",
    "content": "sample string 5",
    "time": "sample string 6",
    "read": true,
    "titletype": "sample string 8",
    "location": {
      "addr": "sample string 1",
      "latitude": 1.0,
      "longitude": 1.0
    },
    "info": {
      "name": "sample string 1",
      "status": "sample string 2",
      "price": "sample string 3"
    }
  },
  "Error": "sample string 3",
  "NoReadQty": 4
}

text/html

Sample:
{"MsgStatus":"sample string 1","Result":true,"msg":{"SendSn":"sample string 1","SendName":"sample string 2","SendType":"sample string 3","type":"sample string 4","content":"sample string 5","time":"sample string 6","read":true,"titletype":"sample string 8","location":{"addr":"sample string 1","latitude":1.0,"longitude":1.0},"info":{"name":"sample string 1","status":"sample string 2","price":"sample string 3"}},"Error":"sample string 3","NoReadQty":4}