Get distribution staff details interface

Get detailed information of the specified affiliate, including user basic information, distribution status and user group information.

Points to note

  • This interface uses the GET method
  • Provide the retailer ID parameter
  • User login verification required
  • Return the complete user information and group details of the retailer
  • Contains the retailer's cumulative income, invitation code and other information

Request address

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

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

Request Syntax

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

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
retailer_id int Is Distributor 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
data object Distributor detail object

Data result parameter

Field name Type Description
id int User ID
parent_id int Parent User 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
group object User group information

group User group information parameters

Field name Type Description
id int Group ID
Title string Group name
description string Group Introduction
Level int Group Level
price int Group Price (Unit: Cents)
Setting object Group configuration information
status int Group display status
Favorable price int Discount price

Setting group configuration information parameters

Field name Type Description
share_reward int Share Reward Percentage
parent_reward int Parent Reward Percentage
discount int Discount Percentage
expire_day int Number of days valid (0 for no limit)

Usage Example

Request example

GET /api/retailer/info?retailer_id=1000 HTTP/1.1
Host: www.anqicms.com

Response Example

{
  "code": 0,
  "msg": "",
  "data": {
    "id": 1000,
    "created_time": 1669012062,
    "updated_time": 1679536756,
    "parent_id": 0,
    "user_name": "retailer1",
    "real_name": "分销员1",
    "avatar_url": "uploads/202211/21/14f56760596b5328.webp",
    "email": "[email protected]",
    "phone": "13800138000",
    "group_id": 2,
    "status": 1,
    "is_retailer": 1,
    "balance": 150000,
    "total_reward": 500000,
    "invite_code": "retailer123",
    "last_login": 1702912236,
    "expire_time": 1997404800,
    "group": {
      "id": 2,
      "created_time": 0,
      "updated_time": 1696919880,
      "title": "高级分销员",
      "description": "高级分销员特权...",
      "level": 2,
      "status": 1,
      "price": 9900,
      "setting": {
        "share_reward": 25,
        "parent_reward": 5,
        "discount": 90,
        "expire_day": 0
      },
      "favorable_price": 8900
    },
    "full_avatar_url": "https://en.anqicms.com/uploads/202211/21/14f56760596b5328.webp",
    "link": ""
  }
}

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