开发指南 官网
API 2.0 > 3.4 商品分类 > 3.4.5 更新分类

3.4.5 更新分类

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:根据分类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-category.goods-category-edit 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
id int 分类id
name String 分类名称
parent_id int 父节点id (一级分类为0)
code string 分类编码 (id和code 传其中一个或者都传都可以
sales_channels array
 ├0 int 数组 销售渠道,1:门店,2:网店
 ├1 int 数组 销售渠道,1:门店,2:网店
sort int 排序字段(越小越靠前)1

响应参数

参数 参数类型 描述

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "goods-category.goods-category-edit",
    "Params": {
        "id": "123",
        "name": "分类名称",
        "parent_id": "0",
        "code": "12346tt",
        "sales_channels": [
            "1",
            "2"
        ],
        "sort": "1"
    }
} 

响应示例

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

请求参数

参数 参数类型 是否必填 默认值 描述
group_sign string 分类编码
name string 分类名称
type int 分类类型 1-堂食 2-外卖 3-堂食和外卖(注意:此字段仅在餐饮业务中出现)
show_period string 上架时间 0- 全时段展示 1- 自定义时段(注意:此字段仅在餐饮业务中出现)
begin_date string 自定义时段时 选择时间段 开始日期(注意:此字段仅在餐饮业务中出现)
end_date string 自定义时段时 选择时间段 结束日期(注意:此字段仅在餐饮业务中出现)
weeks string 自定义时段时 星期集合 ["1", "2", "3", "4", "5", "6", "7"](json格式)(注意:此字段仅在餐饮业务中出现)
period array
 ├0 array
  ├time string 售卖时间段集合 [{time: ["00:00:00", "23:59:59"]}, {time: ["00:00:00", "23:59:59"]}, {time: ["00:00:00", "23:59:59"]}](注意:此字段仅在餐饮业务中出现)
pid int 0 父级分类ID 0为顶级(注意:此字段仅在零售业务中出现)
sort int 排序字段(越小越靠前)1

响应参数

参数 参数类型 描述

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "goods-category.goods-category-edit",
    "Params": {
        "group_sign": "10001",
        "name": "名称",
        "type": "3",
        "show_period": "1",
        "begin_date": "2018-09-11",
        "end_date": "2018-10-25",
        "weeks": "[\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"]",
        "period": [
            {
                "time": "[\"00:00:00\", \"23:59:59\"]"
            }
        ],
        "pid": "0",
        "sort": "1"
    }
} 

响应示例

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

请求参数

参数 参数类型 是否必填 默认值 描述
name string 分类名称
pid int 0 父级分类ID 0为顶级(注意:此字段仅在零售业务中出现)
id int 分类id
sort int 排序,数字越小越靠前

响应参数

参数 参数类型 描述

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "goods-category.goods-category-edit",
    "Params": {
        "name": "名称",
        "pid": "0",
        "id": "123",
        "sort": "1"
    }
} 

响应示例

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

请求参数

参数 参数类型 是否必填 默认值 描述
name string 分类名称
pid int 0 父级分类ID 0为顶级(注意:此字段仅在零售业务中出现)
id int 分类id
sort int 排序,数字越小越靠前

响应参数

参数 参数类型 描述

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "goods-category.goods-category-edit",
    "Params": {
        "name": "名称",
        "pid": "0",
        "id": "123",
        "sort": "1"
    }
} 

响应示例

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

异常示例

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

错误码

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

免费升级

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

免费专业培训

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

7×24小时服务支持

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

 

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