1. 我的下级分销
接口地址: /merchantapi/distribution/agentrelation/myAgentList
请求方式: POST
请求参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| source | int | 否 | 来源:1=对接码代理,2=货源大厅代理 |
| status | int | 否 | 状态:0=待审核,1=已通过,-1=已拒绝 |
| page | int | 否 | 页码 |
| limit | int | 否 | 每页数量 |
响应示例:
json
{
"code": 1,
"msg": "获取成功",
"data": {
"list": [
{
"id": 1,
"user_id": 200,
"parent_id": 100,
"top_user_id": 100,
"agent_username": "代理商A",
"agent_shop_name": "代理商A的店铺",
"level_name": "金牌代理",
"source": 1,
"status": 1,
"goods_count": 10,
"agent_type": 1,
"agent_text": "直属代理",
"create_time": 1699999999
}
],
"total": 20
}
}字段说明:
agent_type: 代理类型:1=直属代理,2=三级代理agent_text: 代理类型文本goods_count: 对接商品数量source: 来源:1=对接码代理,2=货源大厅代理
2. 审核代理申请
接口地址: /merchantapi/distribution/agentrelation/auditagent
请求方式: POST
请求参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | int | 是 | 代理关系ID |
| status | int | 是 | 审核状态:1=通过,-1=拒绝 |
响应示例:
json
{
"code": 1,
"msg": "审核通过成功"
}业务规则:
- 只能审核直属代理的申请
- 审核通过后发送站内消息通知
- 审核拒绝会下架该代理已对接的所有商品
3. 代理统计信息
接口地址: /merchantapi/distribution/agentrelation/statistics
响应示例:
json
{
"code": 1,
"msg": "获取成功",
"data": {
"total_count": 50,
"bind_code_count": 30,
"supply_hall_count": 20,
"pending_count": 5,
"third_count": 100
}
}字段说明:
total_count: 直属代理总数(已通过)bind_code_count: 对接码代理数量supply_hall_count: 货源大厅代理数量pending_count: 待审核数量third_count: 三级代理数量