Allow the user to confirm that the order has been received, and update the order status to completed.
Points to note
- The API 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 change to 'Completed'
Request address
{域名地址}/api/order/finish
Description:{域名地址}Replace it with your domain name, such ashttps://en.anqicms.com/api/order/finish
Request Syntax
POST {域名地址}/api/order/finish
Content-Type: application/json
Request Headers
This interface requires user login authentication, please refer toCommon Request Headers (Common Request Headers).
Request parameters
| Field name | Type | Required | Description |
|---|---|---|---|
| order_id | string | Is | Order ID |
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
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 | Not authorized |
| 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 for receipt |