Skip to content

订单管理

1. 获取订单列表

接口地址: /merchantapi/order/order/list

请求参数:

参数名类型必填说明
cidint分类 ID
typestring订单类型
keywordsstring关键词搜索(订单号:trade_no/商品名[模糊搜素]:goods_name/买家用户名:buyer_username)
statusint订单状态:0=未支付,1=已支付,2=已关闭,3=已退款
date_rangearray日期范围
order_typestring订单类型筛选 1 自营 2 代理别人的
pageint页码
limitint每页数量

响应示例:

json
{
  "code": 1,
  "msg": "获取成功",
  "data": {
    "list": [
      {
        "id": 6,
        "user_id": 1000, // 卖家用户ID
        "buyer_user_id": 1050, // 买家用户ID
        "goods_id": 1, // 商品ID
        "trade_no": "Q251119886c5d", // 订单号
        "goods_name": "1000的商品1", // 商品名称
        "quantity": 1, // 购买数量
        "goods_price": "15.000", // 商品单价
        "goods_cost_price": "3.000", // 商品成本价
        "total_price": "15.750", // 订单总价
        "total_cost_price": "3.000", // 总成本价
        "fee": "0.750", // 交易手续费
        "total_product_price": "15.000", // 商品总价
        "finally_money": "15.0000", // 最终 卖出者收益
        "sendout": 1, // 已发货数量
        "status": 1, // 订单状态
        "is_freeze": 0, // 是否冻结 -1时为平台冻结(被投诉)
        "create_at": "2025-11-19 01:47:19", // 创建时间
        "success_at": "2025-11-19 01:47:19", // 支付成功时间
        "create_ip": "42.232.200.207", // 创建IP
        "is_proxy": 0, // 是否代理 0自营 1代理别人的
        "parent_user_id": 0, // 上级用户ID
        "source_user_id": 0, // 源头用户ID
        "parent_goods_id": 0, // 上级商品ID
        "source_goods_id": 0, // 源头商品ID
        "source": 0, // 来源 0自己的商品 1从对接码对接 2从货源大厅对接
        "take_status_text": "已取", // 取卡状态(未取/已取部分/已取)
        "category_name": "1000分类1", // 商品分类名称
        "buyer_username": "test1050", // 买家用户名
        "profit": 15 // 订单收益 当前商户后台的收益
      }
    ],
    "total": 100
  }
}

2. 查看订单卡密

接口地址: /merchantapi/order/order/card

请求参数:

参数名类型必填说明
idint订单 ID

响应示例:

json
{
  "code": 1,
  "msg": "获取成功",
  "data": {
    "trade_no": "202312010001",
    "card": [
      {
        "id": 1,
        "number": "1234567890",
        "secret": "abcdefghij",
        "create_time": 1699999999,
        // ...
      }
    ]
  }
}

业务规则:

  • 只能由商品原始所有者支持查看的订单卡密
  • 如果订单未发货,会自动触发发货