开发指南 官网
API 2.0 > 3.1 商品 > 3.1.11 会员价详情

3.1.11 会员价详情

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:根据商品ID获取商品会员价基本信息

请求地址

请求方式 版本信息 请求地址
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-detail 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
goods_ids array 商品的id
type int 如果是批量设置会员价 传type为2 如果是单个设置type传1
discount_type int 传递折扣卡类型,得到对应的 配置规格,目前统一传1 (1表示折扣卡 2表示付费会员卡)

响应参数

参数 参数类型 描述
goods array
 ├0 array
  ├id int 商品的id
  ├name string 商品的名称
  ├sell_price Money(元) 商品的零售价
  ├use_spec int 商品是否使用规格
  ├product_no string 商品的条码
  ├spec array
   ├0 array
    ├id int 商品的规格id
    ├name string 商品的规格名称
    ├value array
     ├id int 商品的规格值id
     ├name string 商品的规格值
  ├created_at TimeStamp 商品创建时间
  ├updated_at TimeStamp 商品的更新时间
  ├cost_price Money(元) 商品的成本价
  ├stock int 商品的库存
  ├occupying_stock int 商品的占用库存
  ├entities array
   ├0 array
    ├id int 商品的规格id
    ├product_no string 商品的条码
    ├market_price Money(元) 商品规格的市场价
    ├sell_price Money(元) 商品规格的零售价
    ├img string 商品规格图片
    ├name string 商品规格的名称
    ├tag_name string 产品标签
    ├spec_value array
     ├NIKE string 规格名称
    ├spec_id array
     ├19 Int 规格id
  ├member_ship_price array
   ├0 array
    ├id Int 会员卡折扣id
    ├goods_id Int 会员卡折扣商品id
    ├entity_id Int 会员折扣规格id
    ├discount_type Int 会员折扣类型 1表示普通会员卡折扣 2表示 付费会员卡折扣
    ├discount_method Int 会员卡折扣方式 1表示减价 2表示指定价 3表示折扣
    ├discount_value array
     ├one_level Int 具体折扣值(不同等级)(等级1)
     ├two_level Int 具体折扣值(不同等级)(如果是付费会员 没有多等级,为唯一值
  ├no_participate_multi_store array
   ├0 array
    ├id Int 没有参与会员价的门店(多商品设置会员价没有此信息)
    ├multi_store_id Int 没有参与会员价的门店id(多商品设置会员价没有此信息)
    ├goods_id Int 某门店没有参与某商品会员价的商品id(多商品设置会员价没有此信息)

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "goods.price-detail",
    "Params": {
        "goods_ids": "",
        "type": "",
        "discount_type": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "goods": [
            {
                "id": "",
                "name": "",
                "sell_price": "",
                "use_spec": "",
                "product_no": "",
                "spec": [
                    {
                        "id": "",
                        "name": "",
                        "value": {
                            "id": "",
                            "name": ""
                        }
                    }
                ],
                "created_at": "",
                "updated_at": "",
                "cost_price": "",
                "stock": "",
                "occupying_stock": "",
                "entities": [
                    {
                        "id": "",
                        "product_no": "",
                        "market_price": "",
                        "sell_price": "",
                        "img": "",
                        "name": "",
                        "tag_name": "",
                        "spec_value": {
                            "NIKE": ""
                        },
                        "spec_id": {
                            "19": ""
                        }
                    }
                ],
                "member_ship_price": [
                    {
                        "id": "",
                        "goods_id": "",
                        "entity_id": "",
                        "discount_type": "",
                        "discount_method": "",
                        "discount_value": {
                            "one_level": "",
                            "two_level": ""
                        }
                    }
                ],
                "no_participate_multi_store": [
                    {
                        "id": "",
                        "multi_store_id": "",
                        "goods_id": ""
                    }
                ]
            }
        ]
    }
}

异常示例

{
    "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 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述

响应参数

参数 参数类型 描述
goods_info array
 ├0 array
  ├discount_type int 优惠方式: 1折扣 2比例减价 3指定价格
  ├multi_store_ids array
   ├1234 array 门店id数组
  ├entities array
   ├0 array
    ├goods_id int 商品id
    ├goods_name string 商品名称
    ├goods_sku_id String 商品实体id
    ├sell_discount Money(元) 堂食折扣
    ├out_sell_discount Money(元) 外卖折扣
    ├sell_price Money(元) 实体堂食原价
    ├out_sell_price Money(元) 实体外卖原价

请求示例

[] 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "goods_info": [
            {
                "discount_type": "",
                "multi_store_ids": {
                    "1234": ""
                },
                "entities": [
                    {
                        "goods_id": "2133",
                        "goods_name": "商品名称",
                        "goods_sku_id": "08d14d71c61db18e",
                        "sell_discount": "1.00",
                        "out_sell_discount": "1.00",
                        "sell_price": "1.00",
                        "out_sell_price": "1.00"
                    }
                ]
            }
        ]
    }
}

异常示例

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

错误码

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

免费升级

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

免费专业培训

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

7×24小时服务支持

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

 

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