获取订单详情

接口调用请求说明

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

请求参数示例

{
    "order_id":32423523451235145
}

回包示例

{
    "errcode": 0,
    "errmsg":"ok",
    "order": 
    {
        "order_id": 12123121332
        "out_order_id": "faefawefweafawe",
        "status": 20,
        "craete_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": "红蓝主机"
                       }
                    ],
                    "slae_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":
            {
                "delivery_method": "快递",
                "delivery_time": "2020-03-25 16:05:25",
                "delivery_product_info":
                {
                    "waybill_id": "134654612313",
                    "delivery_id": "STO",
                    "product_infos":
                    [
                        {
                            "product_id": 234245,
                            "sku_id":23424,
                            "product_cnt":1
                        }
                    ]
                }
                "address_info":
                {
                    "user_name":"陈先生",
                    "postal_code": "2435245",
                    "province_name": "广东",
                    "city_name": "广州",
                    "county_name": "海珠区",
                    "detail_info": "大塘",
                    "national_code": "234234",
                    "tel_number": "24534252"
                },
                "express_fee":
                [
                    {
                        "shipping_method": "ShippingMethod_Express",
                        "distance":0,
                    }
                ],
                "offline_delivery_time":0,
                "offline_pickup_time":0,
                "ship_done_time":"1620738080"
            }
        },
        "aftersale_detail": 
        {
            "aftersale_order_list": [
                {
                    "aftersale_order_id": 1234
                }
            ],
            "on_aftersale_order_cnt": 1
        },
        "openid": "xxxxx",
        "ext_info":
        {
            "customer_notes": "发顺丰",
            "merchant_notes": "库存不足,取消"
        }
    }  
}

请求参数说明

参数 类型 是否必填 说明
order_id number 订单ID,可从获取订单列表中获得

回包参数说明

参数 类型 说明
errcode number 错误码
errmsg string 错误信息
order.order_id number 订单ID
order.out_order_id string 外部订单id
order.status number 商品状态
order.create_time string 创建时间
order.update_time string 更新时间
order.order_detail.product_infos[].product_id number 小商店内部商品ID
order.order_detail.product_infos[].sku_id number 小商店内部skuID
order.order_detail.product_infos[].thumb_img string sku小图
order.order_detail.product_infos[].sku_cnt number sku数量
order.order_detail.product_infos[].on_aftersale_sku_cnt number 正在售后/退款流程中的sku数量
order.order_detail.product_infos[].finish_aftersale_sku_cnt number 完成售后/退款的sku数量
order.order_detail.product_infos[].sale_price number 售卖价格(单位:分)
order.order_detail.product_infos[].sku_attrs[].attr_key string 属性键key(属性自定义用)
order.order_detail.product_infos[].sku_attrs[].attr_value string 属性值(属性自定义用)
order.order_detail.pay_info.pay_method string 支付方式(目前只有"微信支付")
order.order_detail.pay_info.prepay_id string 预支付ID
order.order_detail.pay_info.transaction_id string 支付订单号
order.order_detail.pay_info.prepay_time string 预付款时间
order.order_detail.pay_info.pay_time string 付款时间
order.order_detail.price_info.product_price number 商品金额(单位:分)
order.order_detail.price_info.order_price number 订单金额(单位:分)
order.order_detail.price_info.freight number 运费(单位:分)
order.order_detail.price_info.discounted_price number 优惠金额(单位:分)
order.order_detail.price_info.is_discounted bool 是否有优惠(false:无优惠/true:有优惠)
order.order_detail.delivery_info.delivery_method string 快递方式(目前只有"快递")
order.order_detail.delivery_info.delivery_time string 发货时间
order.order_detail.delivery_info.delivery_product_info.waybill_id string 快递单号
order.order_detail.delivery_info.delivery_product_info.delivery_id string 快递公司编号
order.order_detail.delivery_info.delivery_product_info.product_infos[].product_id number 已发货商品小商店内部商品ID
order.order_detail.delivery_info.delivery_product_info.product_infos[].sku_id number 已发货商品小商店内部skuID
order.order_detail.delivery_info.delivery_product_info.product_infos[].product_cnt number 已发货商品数量
order.order_detail.delivery_info.address_info.username string 收货人姓名
order.order_detail.delivery_info.address_info.postal_code string 邮编
order.order_detail.delivery_info.address_info.province_name string 国标收货地址第一级地址
order.order_detail.delivery_info.address_info.city_name string 国标收货地址第二级地址
order.order_detail.delivery_info.address_info.county_name string 国标收货地址第三级地址
order.order_detail.delivery_info.address_info.detail_info string 详细收货地址信息
order.order_detail.delivery_info.address_info.national_code string 收货地址国家码
order.order_detail.delivery_info.address_info.tel_number string 收货人手机号码
order.order_detail.delivery_info.express_fee.shipping_method string 配送方式
order.order_detail.delivery_info.pickup_address.province_name string 自提地址国标第一级地址(自提订单才有该信息)
order.order_detail.delivery_info.pickup_address.city_name string 自提地址国标第二级地址(自提订单才有该信息)
order.order_detail.delivery_info.pickup_address.county_name string 自提地址国标第三级地址(自提订单才有该信息)
order.order_detail.delivery_info.pickup_address.detail_info string 自提地址详细信息(自提订单才有该信息)
order.order_detail.delivery_info.pickup_address.house_number string 自提地址门牌号(自提订单才有该信息,可能为空)
order.order_detail.delivery_info.pickup_address.tel_number string 自提商家联系号码(自提订单才有该信息)
order.order_detail.delivery_info.express_fee.distance number 线下自提,同城配送距离
order.order_detail.delivery_info.offline_delivery_time number 线下配送时间
order.order_detail.delivery_info.offline_pickup_time number 线下自提时间
order.order_detail.delivery_info.ship_done_time number 配送完成时间
order.aftersale_detail.aftersale_order_list[].aftersale_order_id number 售后单ID(售后接口开放后可用于查询)
order.aftersale_detail.on_aftersale_order_cnt number 正在售后流程的售后单数
order.openid string 用户的openid,用于物流助手接口
order.ext_info.customer_notes string 用户备注
order.ext_info.merchant_notes string 商家备注

枚举-shipping_method

枚举值 描述
"ShippingMethod_Express" 快递
"ShippingMethod_SameCity" 同城配送
"ShippingMethod_Pickup" 自提

枚举-status

枚举值 描述
10 待付款
15 拼团活动 支付成功 等待成团中
16 支付成功 等待商家接单中 (同城配送, 线下自提)
17 支付成功待核销
20 待发货
21 部分发货
30 待收货
100 完成
200 全部商品售后之后,订单取消
250 用户主动取消或待付款超时取消

返回码

返回码 错误类型
-1 系统异常
-2 token太长
9401020 参数有误