Get distribution team list interface

Get the list of sub-team members of the distribution personnel, supporting pagination query.

Points to note

  • This interface uses the GET method
  • The user needs to log in for verification (the current user must be a distributor)
  • Only return the list of members directly under the current user
  • Support pagination queries, can specify the current page number and the number of items per page
  • Return the basic information and distribution status of the team members

Request address

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

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

Request Syntax

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

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 Team member list array
Total int Total number of records

data result item parameter

Field name Type Description
id int User ID
parent_id int Parent user ID (current distributor ID)
user_name string Username
real_name string Real Name
avatar_url string User avatar address
email string Email address
phone string Phone number
group_id int user group ID
is_retailer int Is the retailer (1 is, 0 is not)
balance int User Balance (Unit: Cents)
Total Reward int Distributor Cumulative Earnings (Unit: Cents)
Invite Code string User Invite Code
last login int timestamp of last login
expire time int expiration timestamp
created_time int registration timestamp
updated_time int update timestamp
status int User Display Status

Usage Example

Request example

GET /api/retailer/members?current=1&pageSize=10 HTTP/1.1
Host: www.anqicms.com

Response Example

{
  "code": 0,
  "msg": "",
  "data": [
    {
      "id": 2,
      "created_time": 1665753900,
      "updated_time": 1665753923,
      "parent_id": 1000,
      "user_name": "wangxiaocong",
      "real_name": "",
      "avatar_url": "",
      "email": "",
      "phone": "",
      "group_id": 1,
      "status": 1,
      "is_retailer": 0,
      "balance": 0,
      "total_reward": 0,
      "invite_code": "",
      "last_login": 0,
      "expire_time": 0
    },
    {
      "id": 1,
      "created_time": 1665755500,
      "updated_time": 1665755545,
      "parent_id": 1000,
      "user_name": "wangdacong",
      "real_name": "王小强",
      "avatar_url": "",
      "email": "[email protected]",
      "phone": "13888888888",
      "group_id": 1,
      "status": 1,
      "is_retailer": 1,
      "balance": 0,
      "total_reward": 0,
      "invite_code": "123456",
      "last_login": 0,
      "expire_time": 1667404800
    }
  ],
  "total": 2
}

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