# 查询团购优惠详情

# 接口调用请求说明

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

# 请求参数示例

{
    "product_id":"15000000134007",
    "data_type":2
}

# 回包示例

{
    "errcode": 0,
    "errmsg": "ok",
    "draft_data": {
        "product_id": "15000000134007",
        "out_product_id": "test1",
        "product_type": 1,
        "product_name": "测试商品改",
        "category_id": "1452",
        "brand_id": "2100000000",
        "head_imgs": [
            "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HA7ukhipcfggnDP8l5EqCwX1YsvxMZwAFvoPNqG-IbU",
            "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HO7eONXc8Y9uLHr0q0Rs6UvJ0iC0oAuQD3whJEA5Sc4",
            "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HKBXBm8pze5WcayaDacjfSveBYQIQzKrVaR3zi2tja4"
        ],
        "verify_page": {
            "appid": "wxca8d4b8e8feedc2a",
            "path": "main/channels/buy/buy.html?productId=123"
        },
        "code_source_type": 1,
        "attr_kv_map": {
            "voucher_amount": "222",
            "use_date_rule": "{\"validate_type\":1,\"use_date\":{\"use_start_date\":\"2023-11-29\",\"use_end_date\":\"2023-12-15\"}}",
            "exclusive_date": "{\"days_of_week\":[]}",
            "settle_type": "2",
            "need_phone_num": "0",
            "bring_out_type": "1",
            "refund_policy": "0",
            "use_time": "{\"use_time_type\":1,\"time_periods\":[]}"
        },
        "skus": [
            {
                "sku_id": "1930992007",
                "sale_price": 123,
                "stock_num": 21
            }
        ],
        "draft_status": 1,
        "audit_result": {
            "audit_status": 0
        }
    }
}


# 请求参数说明

参数名 类型 是否必填 参数描述
product_id string(uint64) 平台生成的id
data_type number 默认取1。1:获取线上数据, 2:获取草稿数据, 3:同时获取线上和草稿数据(注意:上架过的商品才有线上数据)

# 回包参数说明

参数 类型 说明
errcode number 错误码
errmsg string 错误信息
online_data Product 商品线上数据,入参data_type==2时不返回该字段;入参data_type==3且商品从未上架过,不返回该字段
draft_data Product 商品草稿数据,入参data_type==1时不返回该字段