Allow users to confirm that the order has been received, and update the order status to completed.
Precautions
- This interface uses the POST method and requires data to be submitted in application/ format
- Provide the order ID as an identifier to confirm the receipt.
- Only logged-in users can call this interface
- The order must be in the 'shipped' status to confirm the receipt.
- After confirming the receipt, the order status will become 'Completed'
Request address
{域名地址}/api/order/finish
Description:{域名地址}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/order/finish
Request syntax
POST {域名地址}/api/order/finish
Content-Type: application/json
Request header
This interface requires user login authentication, please refer toCommon Request Headers (Common Request Headers).
Request Parameters
| Field Name | Type | Required | Description |
|---|---|---|---|
| order_id | string | Yes | Order ID |
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
POST /api/order/finish HTTP/1.1
Host: www.anqicms.com
Content-Type: application/json
{
"order_id": "202211232209080046"
}
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 |
| 4001 | Order does not exist |
| 4002 | The order status does not allow confirmation of receipt |
| 4003 | The order has been confirmed as received |