Update communication customized order interface

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

Points to note

  • The API uses the POST method and requires data to be submitted in application/ format
  • Access requires user login
  • Can only update orders belonging to the current user
  • Order ID is a required parameter, used to specify the order to be updated

Request address

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

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

Request Syntax

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

Request Headers

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

Request parameters

Field name Type Required Description
id int Is Communication order ID
Title string No Order Title
content string No Order Content
order_extra object No additional_order_information

order_extra parameter

order_extraIs a key-value pair object, the key name is the field name, the key value is the field value, used to pass extra information for the order.

Response header

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

Return parameters

Field name Type Description
code int Error code
msg string Error description

Usage Example

Request example (update order title and content)

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 Not authorized
200 API request OK