# 查询订单明细

# 1. 根据订单ID查询订单详情

# 接口说明

支持联盟开发者根据订单ID查询订单详情

# 请求地址

POST https://api.weixin.qq.com/union/promoter/order/info?access_token=ACCESS_TOKEN

# 请求参数

属性 类型 默认值 必填 说明
access_token string 接口调用凭证
orderIdList Array.<string> 订单 id 列表

# 返回值

属性 类型 说明
errcode number 错误码
errmsg string 错误信息
orderList Array.<Object> 订单列表

orderList 的结构

属性 类型 说明
orderId string 订单ID
payTime number 支付时间戳,单位为s
confirmReceiptTime number 确认收货时间戳,单位为s,没有时为0
shopName string 店铺名称
shopAppid string 店铺 Appid
productList Array.<Object> 商品列表
customizeInfo string 自定义信息
customUserId string 自定义用户参数
userNickName string 用户昵称

productList 的结构

属性 类型 说明
productId string 商品SPU ID
skuId string sku ID
title string 商品名称
thumbImg string 商品缩略图 url
price string 商品成交总价,前带单位 ¥
productCnt number 成交数量
ratio number 分佣比例,单位为万分之一
commissionStatus string 分佣状态
commissionStatusUpdateTime string 分佣状态更新时间戳,单位为s
profitShardingSucTime string 结算时间,当分佣状态为已结算才有值,单位为s
commission string 分佣金额,前带单位 ¥
estimatedCommission number 预估分佣金额,单位为分
categoryStr string 类目名称,多个用英文逗号分隔
promotionInfo <Object> 推广信息

promotionInfo 的结构

属性 类型 说明
promotionSourcePid string 推广位 id
promotionSourceName string 推广位名称

# 返回数据示例

{
    "errcode": 0,
    "errmsg": "ok",
    "orderList": [
        {
            "orderId": "1952315038682581",
            "payTime": 1612355317,
            "shopName": "xxx小商店",
            "productList": [
                {
                    "productId": "4085505",
                    "title": "身体护理",
                    "thumbImg": "https://snsdy.tc.qq.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥0.20",
                    "ratio": 9000,
                    "commissionStatus": "SETTLEMENT_CANCELED",
                    "commission": "¥0",
                    "categoryStr": "11",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5E4_3XcsaMicK_E2gNyvBfM_1290469201",
                        "promotionSourceName": "xxx"
                    },
                    "customizeInfo": "customizeInfo"
                }
            ]
        }
    ]
}

# 错误码

说明
200002 未传入 orderIdList 或 orderIdList 超过上限 200

# 2. 根据订单支付时间、订单分佣状态拉取订单详情

# 接口说明

查询、筛选订单列表

# 请求地址

GET https://api.weixin.qq.com/union/promoter/order/search?access_token=ACCESS_TOKEN

# 请求参数

属性 类型 默认值 必填 说明
access_token string 接口调用凭证
page number 1 页码,起始为 1
pageSize number 10 分页大小,最大 200
startTimestamp string 起始时间戳,单位为秒
endTimestamp string 结束时间戳,单位为秒
commissionStatus string 分佣状态
sortByCommissionUpdateTime string 0 是否按照分佣状态更新时间排序和筛选订单,1:是,0:否
startCommissionUpdateTime string 分佣状态更新时间起始时间戳,单位为秒
endCommissionUpdateTime string 分佣状态更新时间结束时间戳,单位为秒

# GET 数据示例

{
  "page": 1
}

commissionStatus 的枚举

类型 说明
SETTLEMENT_PENDING string 待结算
SETTLEMENT_SUCCESS string 已结算
SETTLEMENT_CANCELED string 取消结算

# 返回值

属性 类型 说明
errcode number 错误码
errmsg string 错误信息
orderList Array.<Object> 订单列表
pageSize number 分页大小
totalNum number 订单总数

orderList 的结构

属性 类型 说明
orderId string 订单ID
payTime number 支付时间戳,单位为s
confirmReceiptTime number 确认收货时间戳,单位为s,没有时为0
shopName string 店铺名称
shopAppid string 店铺 Appid
productList Array.<Object> 商品列表
customizeInfo string 自定义信息
customUserId string 自定义用户参数
userNickName string 用户昵称

productList 的结构

属性 类型 说明
productId string 商品SPU ID
skuId string sku ID
title string 商品名称
thumbImg string 商品缩略图 url
price string 商品成交总价,前带单位 ¥
productCnt number 成交数量
ratio number 分佣比例,单位为万分之一
commissionStatus string 分佣状态
commissionStatusUpdateTime string 分佣状态更新时间戳,单位为s
profitShardingSucTime string 结算时间,当分佣状态为已结算才有值,单位为s
commission string 分佣金额,前带单位 ¥
estimatedCommission number 预估分佣金额,单位为分
categoryStr string 类目名称,多个用英文逗号分隔
promotionInfo <Object> 推广信息
customizeInfo string 自定义信息

promotionInfo 的结构

属性 类型 说明
promotionSourcePid string 推广位 id
promotionSourceName string 推广位名称

# 返回数据示例

{
    "errcode": 0,
    "errmsg": "ok",
    "orderList": [
        {
            "orderId": "1952315038682581",
            "payTime": 1612355317,
            "shopName": "xxx小商店",
            "productList": [
                {
                    "productId": "4085505",
                    "title": "身体护理",
                    "thumbImg": "https://snsdy.tc.qq.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥0.20",
                    "ratio": 9000,
                    "commissionStatus": "SETTLEMENT_CANCELED",
                    "commission": "¥0",
                    "categoryStr": "11",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5E4_3XcsaMicK_E2gNyvBfM_1290469201",
                        "promotionSourceName": "xxx"
                    },
                    "customizeInfo": "customizeInfo"
                }
            ]
        },
        {
            "orderId": "1952881854014581",
            "payTime": 1612354844,
            "shopName": "xxx小商店",
            "productList": [
                {
                    "productId": "4085505",
                    "title": "身体护理",
                    "thumbImg": "https://snsdy.tc.qq.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥0.20",
                    "ratio": 9000,
                    "commissionStatus": "SETTLEMENT_PENDING",
                    "commission": "-",
                    "categoryStr": "11",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5E4_3XcsaMicK_E2gNyvBfM_1290469201",
                        "promotionSourceName": "xxx"
                    }
                }
            ]
        },
        {
            "orderId": "1540485153563887",
            "payTime": 1612346038,
            "shopName": "xxx",
            "productList": [
                {
                    "productId": "6363741",
                    "title": "美工刀",
                    "thumbImg": "https://store.mp.video.tencent-cloud.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥1.00",
                    "ratio": 500,
                    "commissionStatus": "SETTLEMENT_PENDING",
                    "commission": "-",
                    "categoryStr": "美工刀",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5NJAsZ4TN0eNVDN5J_1KUOs_1497740816",
                        "promotionSourceName": "xxx"
                    }
                }
            ]
        },
        {
            "orderId": "1140092624903333",
            "payTime": 1612345602,
            "shopName": "xxx",
            "productList": [
                {
                    "productId": "6363741",
                    "title": "美工刀",
                    "thumbImg": "https://store.mp.video.tencent-cloud.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥1.00",
                    "ratio": 500,
                    "commissionStatus": "SETTLEMENT_PENDING",
                    "commission": "-",
                    "categoryStr": "美工刀",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5NJAsZ4TN0eNVDN5J_1KUOs_1497740816",
                        "promotionSourceName": "xxx"
                    }
                }
            ]
        },
        {
            "orderId": "1952328751053581",
            "payTime": 1612333478,
            "shopName": "xxx小商店",
            "productList": [
                {
                    "productId": "4085505",
                    "title": "身体护理",
                    "thumbImg": "https://snsdy.tc.qq.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥0.20",
                    "ratio": 9000,
                    "commissionStatus": "SETTLEMENT_PENDING",
                    "commission": "-",
                    "categoryStr": "11",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5E4_3XcsaMicK_E2gNyvBfM_1290469201",
                        "promotionSourceName": "xxx"
                    }
                }
            ]
        },
        {
            "orderId": "1952872372026581",
            "payTime": 1612233926,
            "shopName": "xxx小商店",
            "productList": [
                {
                    "productId": "4085505",
                    "title": "身体护理",
                    "thumbImg": "https://snsdy.tc.qq.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥0.20",
                    "ratio": 9000,
                    "commissionStatus": "SETTLEMENT_PENDING",
                    "commission": "-",
                    "categoryStr": "11",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5E4_3XcsaMicK_E2gNyvBfM_1290469201",
                        "promotionSourceName": "xxx"
                    }
                }
            ]
        },
        {
            "orderId": "1508732341607753",
            "payTime": 1612233673,
            "shopName": "xxx小商店",
            "productList": [
                {
                    "productId": "4085505",
                    "title": "身体护理",
                    "thumbImg": "https://snsdy.tc.qq.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥0.20",
                    "ratio": 9000,
                    "commissionStatus": "SETTLEMENT_PENDING",
                    "commission": "-",
                    "categoryStr": "11",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5E4_3XcsaMicK_E2gNyvBfM_1290469201",
                        "promotionSourceName": "xxx"
                    }
                }
            ]
        },
        {
            "orderId": "1976456848299426",
            "payTime": 1611893169,
            "shopName": "xxx小商店",
            "productList": [
                {
                    "productId": "5622638",
                    "title": "垃圾袋",
                    "thumbImg": "https://snsdy.tc.qq.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥9.90",
                    "ratio": 200,
                    "commissionStatus": "SETTLEMENT_PENDING",
                    "commission": "-",
                    "categoryStr": "黑色",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5NJAsZ4TN0eNVDN5J_1KUOs_1497740816",
                        "promotionSourceName": "xxx"
                    }
                }
            ]
        },
        {
            "orderId": "1508676280185753",
            "payTime": 1611578393,
            "shopName": "xxx小商店",
            "productList": [
                {
                    "productId": "12432937",
                    "title": "收纳盒",
                    "thumbImg": "https://store.mp.video.tencent-cloud.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥1.00",
                    "ratio": 8000,
                    "commissionStatus": "SETTLEMENT_PENDING",
                    "commission": "-",
                    "categoryStr": "1",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5E4_3XcsaMicK_E2gNyvBfM_1290469201",
                        "promotionSourceName": "xxx"
                    }
                }
            ]
        },
        {
            "orderId": "1508813362517753",
            "payTime": 1611576663,
            "shopName": "xxx小商店",
            "productList": [
                {
                    "productId": "12432937",
                    "title": "收纳盒",
                    "thumbImg": "https://store.mp.video.tencent-cloud.com/161/20304/snscosdownload/SZ/reserved/xxx",
                    "price": "¥1.00",
                    "ratio": 8000,
                    "commissionStatus": "SETTLEMENT_PENDING",
                    "commission": "-",
                    "categoryStr": "1",
                    "promotionInfo": {
                        "promotionSourcePid": "oqt8u5E4_3XcsaMicK_E2gNyvBfM_1290469201",
                        "promotionSourceName": "xxx"
                    }
                }
            ]
        }
    ],
    "pageSize": 10,
    "totalNum": 133
}