# Get order list

# Dxplaination of Interface Call Request

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

# Example of request parameters

{
    "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
}

# Examples of back-up

{
    "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
}

# Dxplaination of request parameters

Note that start_create_time & end_create_time and start_update_time & end_update_time fill in at least one pair of parameters

参数 type Is it compulsory? Introductions
start_create_time string No (required when you do not fill in the update time frame) Search start time for order creation time in format yyyyy-MM-dd HH: mm: ss, e.g. 2021-06-08 10000000, not earlier than 1970-01-01 0800000000
end_create_time string No (required when you do not fill in the update time frame) Search end time for order creation time in format yyyyy-MM-dd HH: mm: ss, e.g. 2021-06-08 10000000, not earlier than 1970-01-01 0800000000
start_update_time string No (required when not filled in the creation time frame) Search start time for order update time, format yyyy-MM-dd HH: mm: ss, e.g. 2021-06-08 10000000, not earlier than 1970-01-01 0800000000
end_update_time string No (required when not filled in the creation time frame) Search end time for order update time in format yyyyyyMM-dd HH: mm: ss, e.g. 2021-06-08 1000000000000000000000.00, not earlier than 1970-01-01 080000000000000000.00000000.00
status number yes Order status, enumeration values see RequestOrderStatus
page number yes What Page (Minimum Fill 1)
page_size number yes Number of pages per page (no more than 10,000)
source number no 1: Mini Store, 2: CPS with goods

# Dxplaination of callback parameters

参数 type Introductions
errcode string Error code
errmsg string Error message
orders array Order List of orders, structure defined in Get order details Order
total_num number Total Orders

# Enumeration - RequestOrderStatus

枚举值 describe
10 Payment to be made
15 Group Activity Pay successfully Wait to be in a group
16 The payment was successful waiting for the merchant to take the order (same-town delivery, offline pick-up)
17 The payment was successfully pending write-off
20 To be shipped
21 Part of shipment
30 To be received
100 complete
181 Orders are automatically cancelled and refunded (coupons, group buying, etc.)
190 Vendors cancel orders when the item is oversold
200 Orders are cancelled after all goods are sold.
250 Order cancellation (including cancellation of unpaid users, automatic cancellation of overtime unpaid payments, aftersales cancellation, oversold merchant cancellation, automatic refund cancellation of cancelled coupons or group orders)

# Return code

返回码 Error Type
-1 System exceptions
-2 Token too long
9401020 The parameter is incorrect.
-31042 Scanned too much data, shorten the time frame and try again
-31043 Scanned too much data, shorten the time frame and try again