# Get orders from partner stores

If Weixin Mini Program becomes a co-account of Weixin Store and enters the WeChat store through the Mini Program, and after successfully placing an order, you can use this interface to obtain orders from the Mini Program as a sales channel for the co-account in the store. Note that the order_id is not the order id of the store side, it needs to be obtained through cooperative account store order notification event

# Dxplaination of Interface Call Request

http请求方式:POST
https://api.weixin.qq.com/channels/ec/cooperation/order/get?access_token=ACCESS_TOKEN

# Example of request parameters

{
    "shop_appid": "SHOP_APPID",
    "order_id": "coiqBw3B************************************************************TdtdzIpQ"
}

# Dxplaination of request parameters

参数 type Is it compulsory? Introductions
shop_appid string yes Store AppID, obtained by the callback event
order_id string yes The order id, obtained by the callback event, note that it is not the order id of the store, obtained by the cooperative account store order notification event

# Examples of back-up

{
    "order": {
        "openid": "OPENID",
        "order_detail": {
            "product_infos": [
                {
                    "product_id": 234245,
                    "sku_id": 23424,
                    "sku_cnt": 10,
                    "title": "健身环",
                    "thumb_img": "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ",
                    "sale_price": 2000,
                    "market_price": 2000,
                    "sku_attrs": [
                        {
                            "attr_key": "产地",
                            "attr_value": "四川成都"
                        },
                        {
                            "attr_key": "材质",
                            "attr_value": "玻璃"
                        },
                        {
                            "attr_key": "适用人群",
                            "attr_value": "青年;中年"
                        },
                        {
                            "attr_key": "数量",
                            "attr_value": "33"
                        },
                        {
                            "attr_key": "精度",
                            "attr_value": "3.001"
                        },
                        {
                            "attr_key": "重量",
                            "attr_value": "38 mg"
                        },
                        {
                            "attr_key": "毛重",
                            "attr_value": "380 kg"
                        }
                    ]
                }
            ],
            "price_info": {
                "product_price": 20000,
                "order_price": 10500,
                "freight": 500,
                "discounted_price": 10000,
                "is_discounted": true
            }
        }
    }
}

# Dxplaination of callback parameters

参数 type Introductions
errcode string Error code
errmsg string Error message
order object Order information, see the Order structure below

# Structures

# Order

Order structure

Field Name type Introductions
status number Shop order status, you can refer to OrderStatus
openid string Buyer ID
unionid string The buyer's unique identifier on the open platform. If the current Weixin Store is bound to the WeChat open platform account, the order generated after the binding is successful will be returned, as described in the UnionID mechanism
order_detail object OrderDetail Order details, specific structure, please refer to OrderDetail

# OrderDetail

Order details

Field Name type Introductions
product_infos array ProductInfo List of goods, specific structure, please refer to ProductInfo
price_info object PriceInfo Price information, specific structure, please refer to PriceInfo

# ProductInfo

List of Products

Field Name type Introductions
product_id number Commodity spuid
sku_id number Product skuid
thumb_img string SCU diagram
sku_cnt number Number of sku
sale_price number The unit price of sale is in units,
title string Item Title
sku_code string Product Codes
market_price number Market unit price, in units
sku_attrs array AtrrInfo sku attribute
real_price number Sku paid total price, taking the smaller of estimate_price and change_price
is_discounted bool Is there a merchant offer amount, not required, defaults to false
estimate_price number Total SKU price after using all offers, not required, required when there is a discount amount
is_change_price bool Has the price been modified, not required, defaults to false
change_price number The total price of sku after changing the price, not required, is_change_price is true

# PriceInfo

Price Information

Field Name type describe
product_price number Total price of commodities, in units
order_price number Amount paid by the user, in unitsorder_price=original_order_price-discounted_price-finder_discounted_price-deduction_price-change_down_price
freight number Shipping costs, in units
discounted_price number Amount of merchant offers, in units, not required. Return when there is a merchant offer
is_discounted bool Are there any merchant coupon offers?
original_order_price number Order original price, units are points, original_order_price = product_price + freight
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
use_deduction bool Did you use your membership points to deduct?
deduction_price number Amount of credit for membership points, in units
merchant_receieve_price number The amount received by the merchant is in unitsmerchant_receieve_price=original_order_price-discounted_price-deduction_price-change_down_price
merchant_discounted_price number Merchant discount amount, units are points, meaning the same as discounted_price, required
finder_discounted_price number Amount of rewards for the winners, in units