开发指南 官网
API 2.0 > 3.5 商品加料 > 3.5.1 获取加料列表

3.5.1 获取加料列表

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:获取当前门店下所有的商品加料列表

请求地址

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

公共参数

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

请求参数

参数 参数类型 是否必填 默认值 描述
sale_type int 售卖类型:0 不限制 1-堂食 2-外卖 3-堂食和外卖
page int 第几页
page_size int 每页多少条
multi_store_id int 门店 ID, 店铺级别传0

响应参数

参数 参数类型 描述
status bool 请求成功或者失败
code int 成功/错误编码
message string 成功/错误描述
data array
 ├total int 总条数
 ├current_page int 当前页码
 ├last_page int 总页数
 ├item_list array
  ├0 array
   ├id int 加料 ID
   ├name string 加料名称
   ├goods_use_count int 正在使用这个加料 的商品的数量
   ├code string 加料编码
   ├material_details array
    ├0 array
     ├id int id
     ├multi_store_id int 门店 ID
     ├material_id int 加料 ID
     ├type int 销售渠道: 1堂食 2外卖
     ├price float 价格
     ├status int 是否启用: 1启用 0不启用
     ├material_detail_stock array
      ├id int id
      ├multi_store_id int 门店 ID
      ├type int 销售渠道: 1堂食 2外卖
      ├stock int 库存
      ├sale_stock int 加料剩余库存
      ├sale_num int 加料销量

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "goods.material-list",
    "Params": {
        "sale_type": "",
        "page": "",
        "page_size": "",
        "multi_store_id": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "total": "",
        "current_page": "",
        "last_page": "",
        "item_list": [
            {
                "id": "",
                "name": "",
                "goods_use_count": "",
                "code": "",
                "material_details": [
                    {
                        "id": "",
                        "multi_store_id": "",
                        "material_id": "",
                        "type": "",
                        "price": "",
                        "status": "",
                        "material_detail_stock": {
                            "id": "",
                            "multi_store_id": "",
                            "type": "",
                            "stock": "",
                            "sale_stock": "",
                            "sale_num": ""
                        }
                    }
                ]
            }
        ]
    }
}

异常示例

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

错误码

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

免费升级

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

免费专业培训

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

7×24小时服务支持

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

 

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