Get the affiliate earnings list, supporting pagination queries.
Points to note
- This interface uses the GET method
- User login verification required
- Only return the distribution earnings records of the currently logged-in user.
- Support pagination queries, can specify the current page number and the number of items per page
- Contains order amount, commission amount, withdrawal status, and other information
Request address
{域名地址}/api/retailer/commissions
Description:{域名地址}Replace it with your domain name, such ashttps://en.anqicms.com/api/retailer/commissions
Request Syntax
GET {域名地址}/api/retailer/commissions
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 |
|---|---|---|---|
| current | int | No | The current page number, default is 1 |
| pageSize | int | No | Number of items displayed per page, default is 10 |
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 |
| data | object | Distributor income list array |
| Total | int | Total number of records |
data result item parameter
| Field name | Type | Description |
|---|---|---|
| id | int | Income record ID |
| user_id | int | User ID |
| order_id | string | Order Number |
| order_amount | int | Order amount (unit: cents) |
| amount | int | Commission amount (Unit: cents) |
| status | int | Status (0 Pending settlement, 1 Settled, 2 Withdrawn, etc.) |
| withdraw_id | int | Withdrawal ID, 0 indicates not withdrawn |
| remark | string | Note information |
| user_name | string | Username |
| can_withdraw | boolean | whether it can be withdrawn |
| created_time | int | Timestamp of creation |
| updated_time | int | update timestamp |
Usage Example
Request example
GET /api/retailer/commissions?current=1&pageSize=10 HTTP/1.1
Host: www.anqicms.com
Response Example
{
"code": 0,
"msg": "",
"data": [
{
"id": 6,
"created_time": 1671504424,
"updated_time": 1671504424,
"user_id": 1000,
"order_id": "202212201046420050",
"order_amount": 19900,
"amount": 15920,
"status": 0,
"withdraw_id": 0,
"remark": "销售收入",
"user_name": "testuser",
"can_withdraw": false
},
{
"id": 5,
"created_time": 1669618222,
"updated_time": 1669618222,
"user_id": 1000,
"order_id": "202211281446070047",
"order_amount": 19900,
"amount": 15920,
"status": 0,
"withdraw_id": 0,
"remark": "销售收入",
"user_name": "testuser",
"can_withdraw": false
}
],
"total": 2
}
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 |