Update Communication Custom Order Interface

Update the basic information of the communication customization order, including the title, content, and additional order information.

Precautions

  • This interface uses the POST method and requires data to be submitted in application/ format
  • Access requires user login
  • 只能更新属于当前用户的订单
  • 订单ID为必填参数,用于指定要更新的订单

Request address

{域名地址}/api/communication/order/update

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

Request syntax

POST {域名地址}/api/communication/order/update
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
id integer Yes Communication Order ID
Title string No Order Title
content string No Order Content
order_extra object No Order Additional Information

order_extra parameter

order_extraIs a key-value pair object, the key name is the field name, and the key value is the field value, used to pass additional information about the order.

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

请求示例(更新订单标题和内容)

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

{
  "id": 123,
  "title": "更新后的定制网站主题",
  "content": "需要定制一个响应式的外贸网站主题,包含多语言功能和支付接口",
  "order_extra": {
    "delivery_time": "2023-12-31",
    "requirement": "需要支持中英文切换和在线支付"
  }
}

Request example (only update additional order information)

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

{
  "id": 123,
  "order_extra": {
    "budget": "10000-20000",
    "maintenance_required": "是"
  }
}

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