1. 代理近期销售
接口地址: /merchantapi/order/risk/childOrderList
请求方式: POST
请求参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| shop_name | string | 否 | 店铺名称 |
| user_id | int | 否 | 用户 ID |
| type | string | 否 | 搜索字段:trade_no=订单编号、goods_name=商品名称、buyer_username=买家用户名 |
| keywords | string | 否 | 搜索关键词,与 type 配合使用 |
| status | int | 否 | 订单状态:0=未支付、1=已支付、2=已关闭、3=已退款 |
| date_range | array | 否 | 创建日期范围,格式:[开始日期, 结束日期] |
| page | int | 否 | 页码 |
| limit | int | 否 | 每页数量 |
响应示例:
json
{
"code": 1,
"msg": "获取成功",
"data": {
"list": [
{
"id": 10,
"user_id": 1001, // 用户ID
"buyer_user_id": 1002, // 买家用户ID
"goods_id": 2, // 商品ID
"trade_no": "Q251122b91424", // 订单号
"goods_name": "1000的商品1", // 商品名称
"quantity": 1, // 商品数量
"goods_price": "20.000", // 商品价格
"goods_cost_price": "18.000", // 商品成本价
"total_price": "21.000", // 总价格
"total_cost_price": "18.000", // 总成本价
"fee": "1.000", // 手续费
"total_product_price": "20.000", // 总商品价格
"finally_money": "2.0000", // 最终卖出收益
"sendout": 1, // 是否发货
"status": 1, // 订单状态: 0=未支付 1=已支付 2=已取消 3=已退款
"is_freeze": 0, // 是否冻结
"create_at": "2025-11-22 16:27:09", // 创建时间
"success_at": "2025-11-22 16:27:11", // 成功时间
"create_ip": "185.206.249.117", // 创建IP
"is_proxy": 1, // 是否代理: 0=否 1=是
"parent_user_id": 1000, // 父级用户ID
"source_user_id": 1000, // 源用户ID
"parent_goods_id": 1, // 父级商品ID
"source_goods_id": 1, // 源商品ID
"source": 2, // 来源: 1对接码订单 2=货源大厅订单
"take_status_text": "已取", // 取卡状态(未取/已取部分/已取)
"category_name": "代理商品分类", // 实际售出商品分类名称
"seller_username": "test1001", // 卖家用户名(代理商)
"seller_shop_name": "1001店铺", // 卖家店铺名
"sourceGoods": {
// 源商品信息
},
"my_goods_name": "1000的商品1", // 我的商品名称
"buyer_username": "test1002", // 买家用户名
"proxy_type": "其他", // 代理类型
"profit": "18.000", // 我的利润
"can_view_card": 1, // 当前商户是否可查看卡密:0否 1是
"is_source_owner": 1, // 当前商户是否为货源方:0否 1是
"my_role": "source", // 当前商户角色:source源头货源商/parent直接上级
"complaint_id": 12, // 关联投诉 ID;没有投诉时为 0
"complaint_status": 2, // 投诉状态;没有投诉时为 null
"complaint_status_text": "平台介入中" // 投诉状态文案;没有投诉时为空字符串
}
],
"total": 10
}
}补充字段说明:
| 字段名 | 说明 |
|---|---|
| take_status_text | 取卡状态:未取、已取部分、已取 |
| category_name | 实际售出商品分类名称 |
| can_view_card | 是否允许当前商户调用 /merchantapi/order/order/card 查看卡密:0=否,1=是 |
| is_source_owner | 当前商户是否为货源方:0=否,1=是;当前商户是 source_user_id 时为货源方 |
| my_role | 当前商户在订单中的角色:source=源头货源商,parent=直接上级 |
| card_view_at | 下级销售者首次查看卡密时间;为 null 时表示尚未查看 |
| complaint_id | 关联投诉 ID;没有投诉时为 0 |
| complaint_status | 投诉状态:0=待商户处理、1=等待买家申请平台介入、2=平台介入中、3=已完结、-1=历史兼容的已完结;没有投诉时为 null |
| complaint_status_text | 投诉状态显示文案;没有投诉时为空字符串 |
注意:
- 该接口只返回与当前商户有关的下级代理订单,条件为
is_proxy=1且当前商户是source_user_id或parent_user_id。 - 从该列表进入订单详情时,统一调用
/merchantapi/order/order/detail,传id或trade_no。 - 上级可在订单详情中直接查看卡密;
card_view_at用于显示下级是否已查看以及首次查看时间。