Send Communication Custom Order Information Interface

Send a message to the specified communication customization order, used for communication between users and administrators.

Precautions

  • This interface uses the POST method and requires data to be submitted in application/ format
  • Access requires user login
  • Only messages to orders belonging to the current user can be sent
  • Supports multiple message types: text, images, quotes, videos, files, etc.

Request address

{域名地址}/api/communication/message/send

Description:{域名地址}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/communication/message/send

Request syntax

POST {域名地址}/api/communication/message/send
Content-Type: application/json

Request header

This interface also involves common request headers. For more information, please seeCommon Request Headers (Common Request Headers).

Request Parameters

Field Name Type Required Description
comm_order_id integer Yes Communication Order ID
sender_id integer Yes sender_id
sender_name string No Sender Name
Message Type string Yes Message type: text, image, quote, video, file, audio, location, contact, sticker, unknown
content string Yes Message Content

Response Headers

This interface only involves public response headers. More information, please refer toCommon Request Headers (Common Request Headers).

Return parameters

Field Name Type Description
code integer Error code
message string Error Description

Example Usage

Request Example (Send Text Message)

POST /api/communication/message/send HTTP/1.1
Host: www.anqicms.com
Content-Type: application/json

{
  "comm_order_id": 123,
  "sender_id": 1000,
  "sender_name": "testuser",
  "message_type": "text",
  "content": "您好,我想了解这个定制方案的详细信息"
}

Request Example (Send Image Message)

POST /api/communication/message/send HTTP/1.1
Host: www.anqicms.com
Content-Type: application/json

{
  "comm_order_id": 123,
  "sender_id": 1000,
  "sender_name": "testuser",
  "message_type": "image",
  "content": "https://en.anqicms.com/uploads/image.jpg"
}

Response Example

{
  "code": 0,
  "msg": "消息发送成功"
}

Error Code

Error code Description
0 OK
-1 Error, the reason is indicated in msg
1001 Not logged in
1002 Unauthorized
200 API request OK