Get distribution staff statistics interface

Get the distributor's statistics information, including withdrawable commission, withdrawn commission, unsettled commission and team size.

Points to note

  • This interface uses the GET method
  • The user needs to log in for verification (the current user must be a distributor)
  • No request parameters required
  • Returns the comprehensive statistics of the current distributor
  • Includes financial statistics and team statistics information

Request address

{域名地址}/api/retailer/statistics

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

Request Syntax

GET {域名地址}/api/retailer/statistics

Request Headers

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

Request parameters

None

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 statistics information object

Data result parameter

Field name Type Description
can_withdraw_amount int Available Withdrawal Commission Amount (Unit: Cents)
paid_withdraw_amount int Withdrawn commission amount (in cents)
unfinished_withdraw_amount int Unsettled commission amount (in cents)
member_count int team_size

Usage Example

Request example

GET /api/retailer/statistics HTTP/1.1
Host: www.anqicms.com

Response Example

{
  "code": 0,
  "msg": "",
  "data": {
    "can_withdraw_amount": 150000,
    "paid_withdraw_amount": 50000,
    "unfinished_withdraw_amount": 30000,
    "member_count": 25
  }
}

error code

Error code Description
0 OK
-1 Error, the reason is indicated in msg
1001 Not logged in
1002 Unauthorized (the current user is not a distributor)
200 API request OK