开发指南 官网
API 2.0 > 3.1 商品 > 3.1.10 创建/更新会员价

3.1.10 创建/更新会员价

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:批量添加和更新商品会员价

请求地址

请求方式 版本信息 请求地址
POST V2 http://openapi.zvcms.com/api/v2

公共参数

参数 参数类型 是否必填 默认值 描述
OpenId string 密钥Id
GrantCode string 授权code
Token string 签名,参考《数字签名sign》
Timestamp string 当前时间戳
Nonce string 随机正整数
Action string goods.price-create 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
discount_type int 餐饮:优惠方式: 1折扣 2比例减价 3指定价格 | 零售:打折卡类型 1表示折扣卡 2表示付费会员卡
discount_method int 打折方式 1表示减价 2表示指定价 3表示折扣
discount_goods_info array
 ├0 array
  ├entity_id int 商品的实体id
  ├goods_id int 商品的id
  ├sales_price Money(元) 商品规格会员价
  ├values array
   ├0 array
    ├level int 规格商品等级 (付费会员卡默认填0)
    ├discount string 规格商品折扣值
multi_store_ids array 不参与商品会员价的门店[1,2]
type int 批量添加和更新的时候标识 传值1

响应参数

参数 参数类型 描述

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "goods.price-create",
    "Params": {
        "discount_type": "",
        "discount_method": "",
        "discount_goods_info": [
            {
                "entity_id": "",
                "goods_id": "",
                "sales_price": "",
                "values": [
                    {
                        "level": "",
                        "discount": ""
                    }
                ]
            }
        ],
        "multi_store_ids": "[1,2]",
        "type": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": []
}

异常示例

{
    "status": true,
    "code": "异常编码,根据不同的业务返回编码",
    "message": "异常说明:查询的信息不存在"
}

错误码

{
    "status": false,
    "code": "系统错误编码:详见全局返回编码",
    "message": "系统错误说明"
}

请求地址

请求方式 版本信息 请求地址
POST V2 http://openapi.zvcms.com/api/v2

公共参数

参数 参数类型 是否必填 默认值 描述
OpenId string 密钥Id
GrantCode string 授权code
Token string 签名,参考《数字签名sign》
Timestamp string 当前时间戳
Nonce string 随机正整数
Action string goods.price-create 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
discount_type int 餐饮:优惠方式: 1折扣 2比例减价 3指定价格 | 零售:打折卡类型 1表示折扣卡 2表示付费会员卡
entities array
 ├0 array
  ├goods_id int goods_id
  ├goods_sku_id string 实体id
  ├sell_discount Money(元) 堂食优惠价格
  ├out_sell_discount Money(元) 外卖优惠价格
  ├sell_price Money(元) 门店商品实体价格1.00
  ├out_sell_price Money(元) 门店外卖商品实体价格1.00
  ├store_sell_price Money(元) 店铺商品实体价格
  ├store_out_sell_price Money(元) 店铺外卖商品实体价格
multi_store_ids array
 ├123 array 门店id数组 如果没有门店 传 [0]

响应参数

参数 参数类型 描述
id int 用以查看同步进度记录(无实际意义,可忽略)

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "goods.price-create",
    "Params": {
        "discount_type": "",
        "entities": [
            {
                "goods_id": "123",
                "goods_sku_id": "4cd68af7ffcd68b6",
                "sell_discount": "0.1",
                "out_sell_discount": "0.2",
                "sell_price": "1.00",
                "out_sell_price": "1.00",
                "store_sell_price": "1.00",
                "store_out_sell_price": "1.00"
            }
        ],
        "multi_store_ids": {
            "123": "0"
        }
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "id": ""
    }
}

异常示例

{
    "status": true,
    "code": "异常编码,根据不同的业务返回编码",
    "message": "异常说明:查询的信息不存在"
}

错误码

{
    "status": false,
    "code": "系统错误编码:详见全局返回编码",
    "message": "系统错误说明"
}

免费升级

营销功能、插件持续每月更新开发升级

免费专业培训

每月建站、微信营销、电商等互联网增值培训

7×24小时服务支持

400电话、QQ、微信、在线等多渠道售后支持

 

安徽智迈科技股份有限公司 版权所有 Copyright 2009-2018 皖公网安备 34019202000074号 增值电信业务经营许可证:皖B2-20170075