# 获取订单列表

# 接口调用请求说明

http请求方式:POST
https://api.weixin.qq.com/product/order/get_list?access_token=xxxxxxxxx

# 请求参数示例

{
    "start_create_time": "2020-03-25 12:05:25",
    "end_create_time": "2020-04-25 12:05:25",
    "status": 20,
    "page": 1,
    "page_size": 10,
    "source": 1 //选填,默认1
}

# 回包示例

{
    "errcode": 0,
    "errmsg":"ok",
    "orders": 
    [
        {
            "order_id": 12123121332,
            "status": 20,
            "create_time": "2020-03-25 13:05:25",
            "update_time": "2020-03-25 14:05:25",
            "order_detail": {
                "product_infos": 
                [
                    {
                        "product_id": 234245,
                        "sku_id": 23424,
                        "sku_cnt": 10,
                        "on_aftersale_sku_cnt": 10,
                        "finish_aftersale_sku_cnt": 0,
                        "title": "健身环",
                        "thumb_img": "http://img10.360buyimg.com/n1/s450x450_jfs/t1/85865/39/13611/488083/5e590a40E4bdf69c0/55c9bf645ea2b727.jpg",
                        "sku_attrs": 
                        [
                            {
                                "attr_key": "选择颜色",
                                "attr_value": "红蓝主机"
                            }
                        ],
                        "sale_price": 2000,
                        "market_price": 2000
                    },
                    ...
                ],
                "pay_info": {
                    "pay_method": "微信支付",
                    "prepay_id": "42526234625",
                    "transaction_id": "131456479687",
                    "prepay_time": "2020-03-25 14:04:25",
                    "pay_time": "2020-03-25 14:05:25"
                },
                "price_info": {
                    "product_price": 20000,
                    "order_price": 10500,
                    "freight": 500,
                    "discounted_price": 10000,
                    "is_discounted": true
                },
                "delivery_info": {
                    "address_info": {
                        "user_name": "陈先生",
                        "postal_code": "2435245",
                        "province_name": "广东",
                        "city_name": "广州",
                        "county_name": "海珠区",
                        "detail_info": "大塘",
                        "national_code": "234234",
                        "tel_number": "24534252"
                    },
                    "delivery_method": "快递",
                    "express_fee": 
                    [
                        {
                            "shipping_method": "ShippingMethod_Express"
                        }
                    ],
                    "delivery_product_info": 
                    [
                        {
                            "waybill_id": "134654612313",
                            "delivery_id": "STO",
                            "delivery_time": "1620738080",
                            "deliver_type": "DELIVERY_TYPE_OPTIONAL_EXPRESS",
                            "delivery_address": {
                                "user_name": "陈先生",
                                "postal_code": "2435245",
                                "province_name": "广东",
                                "city_name": "广州",
                                "county_name": "海珠区",
                                "detail_info": "大塘",
                                "national_code": "234234",
                                "tel_number": "24534252"
                            },
                            "product_infos": 
                            [
                                {
                                    "product_id": 234245,
                                    "sku_id": 23424,
                                    "product_cnt": 1
                                }
                            ]
                        },
                        ...
                    ],
                    "ship_done_time": "1620738080",
                    "insurance_info": {
                        "type": "InsuranceSourceType_None",
                        "insurance_price": 0
                    },
                    "deliver_type": "DELIVERY_TYPE_OPTIONAL_EXPRESS",
                    "offline_delivery_time": 0,
                    "offline_pickup_time": 0
                }
            },
            "aftersale_detail": {
                "aftersale_order_list": 
                [
                    {
                        "aftersale_order_id": 1234,
                        "status": 13
                    },
                    ...
                ],
                "on_aftersale_order_cnt": 1
            },
            "openid": "oDNt95V1edm_RT8K5GSLW4dQYciE",
            "ext_info": {
                "customer_notes": "发顺丰",
                "merchant_notes": "库存不足,取消"
            },
            "order_type": 0
        }
        ...
    ],
    "total_num": 20
}

# 请求参数说明

注意 start_create_time&end_create_time 和 start_update_time&end_update_time 至少填一对参数

参数 类型 是否必填 说明
start_create_time string 否(未填更新时间范围时必填) 订单创建时间的搜索开始时间,格式yyyy-MM-dd HH:mm:ss,例如2021-06-08 10:00:00,不可早于1970-01-01 08:00:00
end_create_time string 否(未填更新时间范围时必填) 订单创建时间的搜索结束时间,格式yyyy-MM-dd HH:mm:ss,例如2021-06-08 10:00:00,不可早于1970-01-01 08:00:00
start_update_time string 否(未填创建时间范围时必填) 订单更新时间的搜索开始时间,格式yyyy-MM-dd HH:mm:ss,例如2021-06-08 10:00:00,不可早于1970-01-01 08:00:00
end_update_time string 否(未填创建时间范围时必填) 订单更新时间的搜索结束时间,格式yyyy-MM-dd HH:mm:ss,例如2021-06-08 10:00:00,不可早于1970-01-01 08:00:00
status number 订单状态,枚举值见RequestOrderStatus
page number 第几页(最小填1)
page_size number 每页数量(不超过10,000)
source number 1:小商店,2:CPS带货

# 回包参数说明

参数 类型 说明
errcode string 错误码
errmsg string 错误信息
orders array Order 订单列表,结构定义见获取订单详情Order
total_num number 订单总数

# 枚举-RequestOrderStatus

枚举值 描述
10 待付款
15 拼团活动 支付成功 等待成团中
16 支付成功 等待商家接单中 (同城配送, 线下自提)
17 支付成功待核销
20 待发货
21 部分发货
30 待收货
100 完成
181 订单自动取消并退款(核销券、团购等)
190 商品超卖商家取消订单
200 全部商品售后之后,订单取消
250 订单取消(包括未付款用户取消,超时未付款自动取消,售后取消,超卖商家取消,核销券或团购订单自动退款取消等各种取消情况)

# 返回码

返回码 错误类型
-1 系统异常
-2 token太长
9401020 参数有误
-31042 扫描数据过多,请缩短时间范围重试
-31043 扫描数据过多,请缩短时间范围重试