# Get order details

# Dxplaination of Interface Call Request

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

# Example of request parameters

{
    "order_id":32423523451235145
}

# Examples of back-up

{
    "errcode": 0,
    "errmsg": "ok",
    "order": {
        "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
    }
}

# Dxplaination of request parameters

参数 type Is it compulsory? Introductions
order_id number yes Order ID, which can be obtained from the Get Orders list

# Dxplaination of callback parameters

parameter type Introductions
errcode number Error code
errmsg string Error message
order object Order Order structure

# Order

Field Name type Introductions
create_time string Creation time, format yyyy-MM-dd HH: mm: ss
update_time string Update time, format yyyy-MM-dd HH: mm: ss
order_id number order number
status number Product status, enumeration values see OrderStatus
openid string User's openid for logistics assistant interface
order_type number Order type, enumeration values see OrderType
order_detail object OrderDetail Order details
aftersale_detail object AfterSaleDetail After sales information
ext_info ExtInfo Additional information

# OrderDetail

Field Name type Introductions
product_infos array ProductInfo List of Products
price_info object PriceInfo Price Information
pay_info object PayInfo Payment Information
delivery_info object DeliveryInfo Shipping Information
coupon_info object CouponInfo Offer information
couponcode_info object CouponCodeInfo Sales voucher information

# AttrInfo

Field Name type Introductions
attr_key string Attribute keys (for attribute customization)
attr_value string Attribute values (for attribute customization)

# ProductInfo

Field Name type Introductions
product_id number Commodity spuid
out_product_id string External goodspuid
sku_id number Product skuid
out_sku_id string External product skuid
thumb_img string SCU diagram
sku_cnt number Number of sku
sale_price number Sale price (in units of cents)
title string Item Title
sku_attrs array AttrInfo sku attribute
on_aftersale_sku_cnt number Number of SKUs in the aftermarket / refund process
finish_aftersale_sku_cnt number Number of SKUs completed after sale / refund
sku_code string Product Codes
market_price number Market price (in units of cents)

# PayInfo

Field Name type Introductions
pay_method string Payment method, currently only "WeChat payment"
prepay_id string Prepaid id
prepay_time string Prepaid time, format yyyy-MM-dd HH: mm: ss
pay_time string Payment time, format yyyy-MM-dd HH: mm: ss
transaction_id string Payment Order Number

# PriceInfo

Field Name type Introductions
product_price number Total price of commodities, in units
order_price number Order Amount, in units
freight number Shipping costs, in units
discounted_price number Amount of concession, in units
is_discounted bool Are there any offers?
original_order_price number Original order price, in units
estimate_product_price number Product estimate price, in units
change_down_price number The amount decreased after the price change, in units
change_freight number Shipping charges after conversion price, in units
is_change_freight bool Whether or not to modify shipping costs
buyer_insurance_price number Buyer freight insurance, divided units

# CouponInfo

Field Name type Introductions
coupon_id array number Coupon id list

# DeliveryInfo

Field Name type Introductions
address_info object AddressInfo Address Information
delivery_method string Delivery methods are currently only "express"
express_fee object DeliveryExpressFee Shipping Information
delivery_product_info array DeliveryProductInfo Shipping logistics information
ship_done_time number Shipment completion time, second time stamp
insurance_info object InsuranceInfo Freight insurance information
deliver_type string Delivery method, enumeration values see DeliveryType
offline_delivery_time number Offline delivery time, second-rate timestamp
offline_pickup_time number Offline pick-up time, second-rate timestamp
pickup_address object AddressInfo Self-delivering address

# DeliveryExpressFee

Field Name type Introductions
shipping_method string Delivery mode, enumeration values see ShippingMethod

# DeliveryProductInfo

Field Name type Introductions
waybill_id string Tracking number
delivery_id string Courier companies code
product_infos array FreightProductInfo Item information in the package
delivery_name string Name of the courier company
delivery_time number Shipping time, second-rate timestamp
deliver_type string Delivery method, enumeration values see DeliveryType
delivery_address object AddressInfo Shipping Address

# FreightProductInfo

Field Name type Introductions
product_id number Product ID
sku_id number sku_id
product_cnt number Quantity of goods

# InsuranceInfo

Field Name type Introductions
type string Freight Risk Type, enumerated values see InsuranceType
insurance_price number Freight insurance prices, in units

# AddressInfo

Field Name type Introductions
user_name string Name of the recipient
postal_code string postal code
province_name string province
city_name string city
county_name string Districts and Counties
detail_info string Detailed address
national_code string Shipping Address Country Code
tel_number string The consignee's mobile phone number
house_number string House number

# CouponCodeInfo

Field Name type Introductions
start_time number When a coupon begins to take effect, a second time stamp
end_time number The expiration time of the coupon, a second time stamp
verify_type number How to write off, 0 - You can write off every day 1 - Holidays are not available
phone_number string Buyer contact details
verifier_nickname string Cancellation Person WeChat nickname (this field is available only for cancelled orders)
verify_time number Write-off time (only those orders that have been written off have this field)

# AfterSaleDetail

Field Name type Introductions
on_aftersale_order_cnt number Number of sales orders in the process of sales
aftersale_order_list array AfterSaleOrderInfo List of sales orders

# AfterSaleOrderInfo

Field Name type Introductions
aftersale_order_id number Aftermarket Single ID
status number AfterSaleStatus, see for the enumeration value.

# ExtInfo

Field Name type Introductions
customer_notes string User Notes
merchant_notes string Merchant Notes

# Enumeration - ShippingMethod

枚举值 describe
"ShippingMethod_Express" express delivery
"ShippingMethod_SameCity" Same-day delivery
"ShippingMethod_Pickup" Bring your own.

# Enumeration - OrderStatus

枚举值 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 Unpaid users actively cancel or overtime unpaid orders automatically cancel

# Enumeration - OrderType

枚举值 describe
0 Ordinary Orders
1 Self-Delivery Orders
2 Payment Code Orders
3 Group Orders
4 Cancellation of coupon orders
5 Same City Delivery Orders
6 Group buying + canceled coupon orders
99 Shipping orders cannot be carried out, etc.

# Enumeration - InsuranceType

枚举值 describe
"InsuranceSourceType_None" No freight insurance
"InsuranceSourceType_Buyer" Buyer's version of freight insurance
"InsuranceSourceType_Seller" Seller's version of shipping insurance

# Enumeration - DeliveryType

枚举值 describe
"DELIVERY_TYPE_OPTIONAL_EXPRESS" Send a Courier
"DELIVERY_TYPE_ORDER_ONLINE" Order a courier online
"DELIVERY_TYPE_NO_EXPRESS" No courier required

# Return code

返回码 Error Type
-1 System exceptions
-2 Token too long
48001 Do not have permission to call this api, please check whether the relevant permissions have been opened
100002 The order does not exist, please check that the order number and token are correct
9401020 The parameter is incorrect.