Lingxing
切换旧版

添加 / 编辑产品分类

POST/erp/sc/routing/storage/category/set

支持添加/编辑本地产品分类

接口信息

API Path请求协议请求方式令牌桶容量
/erp/sc/routing/storage/category/setHTTPSPOST1

请求参数

dataarray<object>必填
请求数据
隐藏子属性
idinteger
为空时新增,不为空时编辑,查询本地产品分类列表对应cid字段
parent_cidinteger
父级分类id
titlestring必填
分类名称
category_codestring必填
分类简码

请求示例

{
    "data": [
        {
            "id":1,
            "parent_cid":0,
            "title": "衣服",
            "category_code": "Bo135152"
        }
    ]
}

返回结果

Json Object

codeinteger必填
状态码,0 成功
示例 0
messagestring必填
返回信息
示例 success
error_detailsarray<any>必填
错误信息
request_idstring必填
请求链路id
response_timestring必填
响应时间
示例 2021-01-11 14:49:12
dataarray<object>必填
成功的数据
隐藏子属性
idstring必填
分类id
示例 3
titlestring必填
分类名称
示例 衣服

返回成功示例

{
    "code": 0,
    "message": "success",
    "error_details": [],
    "request_id": "71936B27-D0AE-8436-7F4F-62BEC7201AAE",
    "response_time": "2021-11-11 18:21:45",
    "data": [
        {
            "title": "华为2",
            "parent_cid": "",
            "id": "41"
        }
    ],
    "total": 1
}

返回失败示例

{
    "code": 1000,
    "message": "业务处理失败",
    "error_details": [
        {
            "params": {
                "id": "112",
                "parent_cid": ""
            },
            "message": "错误:未找到对应的分类"
        }
    ],
    "request_id": "B7527DF4-4518-3EA4-DC53-8FBECA93571B",
    "response_time": "2021-11-11 18:22:57",
    "data": [],
    "total": 0
}