1.添加套餐/修改套餐

接口

POST https://open.jisuapp.cn/business/Shop/AddGoods

请求参数说明

Content-Type: application/x-www-form-urlencoded

参数 类型 必填 说明
access_token String Y 用户授权的唯一票据
data_id int N 商品id,若修改则传此值
form_data array Y 商品信息
form_data.title String Y 商品名称
form_data.type String N 商品类型 0->实物类型
form_data.detail_type String N 商品详情样式 0->标准(默认)1->样式二 2->样式三
form_data.category array N 选择分类
form_data.cover String Y 商品主图
form_data.virtual_price String N 虚拟价格
form_data.price String Y 价格
form_data.stock String Y 库存
form_data.status String Y 上架状态 0->上架 1->仓库中(定时上架)
form_data.sell_time DateTime N 定时上架时间
form_data.scan_code String N 扫码购编码(单个设置,多规格不传)
form_data.supplier String N 供应商名称
form_data.share_title String N 分享标题
form_data.share_img String N 分享图片
form_data.code String N 商品检索编码
form_data.description String Y 商品描述
form_data.pick_up_type array N 配送方式 1快递 2同城 3上门自提 4点餐
form_data.box_fee decimal(2) N 餐盒费(点餐)
form_data.corner_mark int N 是否开启商品角标模式 0否 1新品 2HOT 3NEW 4爆款 5自定义
form_data.corner_position int N 角标样式位置 0商品图片 1商品标题
form_data.corner_url string N 角标图片地址(对于新品~爆款,都有固定传参,详见下)
form_data.recommend_type string N 推荐位类型 1商品
form_data.recommend_id array N 推荐位商品ID数组
form_data.region_id string N 城市定位ID
form_data.delivery_id string N 补充信息模板ID
form_data.img_urls array N 轮播图
form_data.model array N 商品规格信息 详情见示例
form_data.model_items array N 商品规格组合起来的规格商品的信息 详情见示例
form_data.is_package_goods int N 是否是套餐商品 0 否 1是

请求参数示例 角标固定图片: 新品: http://img.weiye.me/zcimgdir/album/file_5abcc24c1b487.png HOT: http://img.weiye.me/zcimgdir/album/file_5abcc280400f8.png NEW: http://img.weiye.me/zcimgdir/album/file_5abcc2a102f9d.png 爆款: http://img.weiye.me/zcimgdir/album/file_5abcc2cb81e21.png

规格对应有尺码,颜色,口味,容量,套餐,种类,尺寸,重量,型号,款式9种。id对应1-9。 规格最多只能选择三种。

下面给出form_data.model和form_data.model_items的请求示例。

{
"form_data":
{
    "model":
    {
         "1":{
                "name":"尺码""id":1,
                "subModelId":
                {
                    "0":30,//从30开始往上递增,model_items的key使用subModelId的值以逗号分隔组合起来作为key,详情见示例
                    "1":31,
                },
                "subModelName":
                {
                    "0":40,
                    "1":41,
                },
            },
         "2":{
                "name":"颜色""id":2,
                "subModelId":
                {
                    "0":32,
                    "1":33,
                },
                "subModelName":
                {
                    "0":红,
                    "1":黑,
                },
            },
         "3":{
                "name":"口味""id":3,
                "subModelId":
                {
                    "0":34,
                    "1":35,
                },
                "subModelName":
                {
                    "0":酸,
                    "1":甜,
                },
            },
    },

    "model_items":
    {
         "30,32,34"://以每个规格中subModelId的值组合起来,以逗号分隔
            {
                "img_url":"http://img.zhichiwangluo.com/zcimgdir/album/file_5adda075a34e8.jpg""price":100.00,//销售价
                "stock":20,//库存
                "virtual_price":100.00,//虚拟价格
                "scan_code":"43543",//商品编码
            },
         "30,32,35":
            {
                "img_url":"http://img.zhichiwangluo.com/zcimgdir/album/file_5adda075a34e8.jpg""price":100.00,
                "stock":20,
                "virtual_price":100.00,
                "scan_code":"43543",
            },
         "30,33,34":
            {
                "img_url":"http://img.zhichiwangluo.com/zcimgdir/album/file_5adda075a34e8.jpg""price":100.00,
                "stock":20,
                "virtual_price":100.00,
                "scan_code":"43543",
            },
         "30,33,35":
            {
                "img_url":"http://img.zhichiwangluo.com/zcimgdir/album/file_5adda075a34e8.jpg""price":100.00,
                "stock":20,
                "virtual_price":100.00,
                "scan_code":"43543",
            },
         "31,32,34":
            {
                "img_url":"http://img.zhichiwangluo.com/zcimgdir/album/file_5adda075a34e8.jpg""price":100.00,
                "stock":20,
                "virtual_price":100.00,
                "scan_code":"43543",
            },
         "31,32,35":
            {
                "img_url":"http://img.zhichiwangluo.com/zcimgdir/album/file_5adda075a34e8.jpg""price":100.00,
                "stock":20,
                "virtual_price":100.00,
                "scan_code":"43543",
            },
         "31,33,34":
            {
                "img_url":"http://img.zhichiwangluo.com/zcimgdir/album/file_5adda075a34e8.jpg""price":100.00,
                "stock":20,
                "virtual_price":100.00,
                "scan_code":"43543",
            },
         "31,33,35":
            {
                "img_url":"http://img.zhichiwangluo.com/zcimgdir/album/file_5adda075a34e8.jpg""price":100.00,
                "stock":20,
                "virtual_price":100.00,
                "scan_code":"43543",
            },
    }
}
}

返回参数

参数 类型 说明
status int 状态码 0成功 1失败
data string 说明

参数返回示例

{
    "status": 0,
    "data": {
        "description": "<p>344334</p>",
        "model": {
            "1": {
                "name": "尺码",
                "id": "1",
                "subModelId": [
                    30
                ],
                "subModelName": [
                    "大"
                ]
            }
        },
        "img_urls": null,
        "model_num": null,
        "commodity_code": null,
        "delivery_set": null,
        "distribution_set": null,
        "type": 0,
        "delivery_id": "",
        "region_id": 0,
        "country_region_id": null,
        "code": "",
        "transactionSecurity": [
            {
                "name": "企业认证",
                "checked": "false",
                "disabled": "false"
            },
            {
                "name": "担保交易",
                "checked": "false",
                "disabled": "false"
            },
            {
                "name": "线下门店",
                "checked": "false",
                "disabled": "false"
            },
            {
                "name": "包邮",
                "checked": "false",
                "disabled": "false"
            },
            {
                "name": "旗舰店认证",
                "checked": "false",
                "disabled": "false"
            },
            {
                "name": "专卖店认证",
                "checked": "false",
                "disabled": "false"
            },
            {
                "name": "直营店认证",
                "checked": "false",
                "disabled": "false"
            }
        ],
        "share_title": "",
        "corner_mark": "0",
        "corner_url": null,
        "corner_position": "0",
        "detail_type": 0,
        "video_id": null,
        "subarea": "",
        "video_img": "",
        "vip_level_condition": null,
        "vip_card_condition": null,
        "paid_vip_level_condition": null,
        "paid_vip_card_condition": null,
        "recommend_type": 0,
        "recommend_id": null,
        "recommend_title": null,
        "recommend_cond_set": null,
        "supplier": "",
        "share_img": "",
        "revert_stock_status": null,
        "box_fee": 0,
        "alias": "",
        "attributes": null,
        "receipt_group_id": [],
        "is_package_goods": 0,
        "tags": null,
        "simple_description": "",
        "app_shop_apply_type": 0,
        "is_app_shop_goods": 0,
        "take_off": 0,
        "is_schedule_onsale": 0,
        "period_set": null,
        "service": null,
        "recommend_group": [],
        "limit": null,
        "after_buy_x_days": null,
        "after_buy_continued_x_days": null,
        "valid_date_array": null,
        "readme": "",
        "vip_card_shop_type": null,
        "auto_carousel": 2,
        "is_sendable": 0,
        "pick_up_type": [
            "1"
        ],
        "self_delivery_location": 0,
        "goods_weight": "0.000",
        "benefit_config": {
            "not_use_coupon": 0,
            "not_use_paid_vip": 0,
            "not_use_common_vip": 0,
            "not_use_benefit_day_vip": 0,
            "not_use_common_appshop_vip": 0,
            "not_use_paid_appshop_vip": 0,
            "not_use_benefit_day_appshop_vip": 0,
            "not_use_integral": 0,
            "not_use_appointment_card": 0
        },
        "page_config": null,
        "valid_date_type": 0,
        "start_date_time": 0,
        "end_date_time": 0,
        "is_virtual_goods": 0,
        "region_name": [],
        "worker_id": [],
        "elem_id": [],
        "is_pick_up_offline": 0,
        "is_presell_goods": 0,
        "presell_activity_id": 0,
        "cate_p_id": "",
        "is_vip_goods": 0,
        "vip_activity_id": 0,
        "is_gift_goods": 0,
        "is_package_combo_goods": 0,
        "package_combo_ids": [],
        "shopping_way": 0,
        "id": "10005038",             //商品ID
        "app_id": "bX131b1X0h",
        "title": "343443",
        "cover": "https://img.zhichiwangluo.com/zcimgdir/thumb/t_15724016485db8f1f03536b.jpg",
        "price": "1.00",
        "sale_price": "0.00",
        "category": [
            "总店商品"
        ],
        "sales": "0",
        "is_recommend": "0",
        "stock": "1000",
        "weight": "0",
        "goods_type": "0",
        "max_can_use_integral": "0",
        "integral": "-1",
        "mass": "",
        "volume": "",
        "express_rule_id": "0",
        "is_seckill": "2",
        "seckill_status": "2",
        "virtual_price": "1.00",
        "add_time": "1577169011",
        "update_time": "2021.01.07",
        "viewed_count": "0",
        "sell_time": "",
        "status": "0",
        "supply_type": "0",
        "category_id": [
            "49130"
        ],
        "is_favorite": 0,
        "goods_price": "1.00",
        "model_items": [
            {
                "id": "594534",
                "goods_id": "10005038",
                "model": "30",
                "price": "1.00",
                "stock": "1000",
                "commodity_code": null,
                "add_time": "1610010498",
                "sales": "0",
                "seckill_stock": "0",
                "seckill_price": "0.00",
                "seckill_sales": "0",
                "img_url": "",
                "virtual_price": "1.00",
                "no_discount": "0",
                "min_sales_nums": "100",
                "discount_stock": "0",
                "code": ""
            }
        ],
        "min_price": "1.00",
        "max_price": "1.00",
        "max_virtual_price": "1.00",
        "min_virtual_price": "1.00",
        "model_items_object": {         //商品规格
            "594534": {
                "id": "594534",  
                "goods_id": "10005038",
                "model": "30",
                "price": "1.00",
                "stock": "1000",
                "commodity_code": null,
                "add_time": "1610010498",
                "sales": "0",
                "seckill_stock": "0",
                "seckill_price": "0.00",
                "seckill_sales": "0",
                "img_url": "",
                "virtual_price": "1.00",
                "no_discount": "0",
                "min_sales_nums": "100",
                "discount_stock": "0",
                "code": "",
                "model_name": "大"    //商品规格名
            }
        },
        "min_sales_nums": "100",
        "app_name": "alex-1",
        "goods_express_data": {
            "express_fee": 0,
            "express_fee_sort": [
                0
            ]
        },
        "express_fee": "包邮",
        "poster_css": 1,
        "server_time": 1610013647,
        "recommend_info": []
    }
}

results matching ""

    No results matching ""