salesCategory.md 18.6 KB

销售类目接口服务定义


获取销售类目接口

接口名: /salesCategory/querySCList

入参


属性名称 类型 例子 说明 是否必填
state String 1 状态 1:开启, 0:关闭, 不传值的情况:全件检索

返回

{
    "code": 200,
    "message": "querySCList success",
    "data": {
        "list": [{
            "createTime": "1441117726",
            "icon": "",
            "categoryId": "1",
            "relationParameter": "114,293,116,117,115,119,124,122,131,129,346,133,348,147,149,148,151,231,152,153,196,238,239,240,349,157,342,156,161,300,160,233,341,340,210,339,351,186,235,163,224,322,323,324,325,326,327,328,329,330,331,72,74,75,76,142,77,78,79,80,199,213,217,218,234,303,305,306,307,334,162,316,164,317,295,321,311,357,359,320,195,197,413,130,258,173,227,125,118,121,123,263,260,264,261,352",
            "orderBy": "0",
            "parentId": "0",
            "categoryCode": "1,0,0,0",
            "relationUrl": "",
            "levelNumber": "1",
            "categoryName": "男生",
            "state": "1",
            "items": [{
                "createTime": "1441117792",
                "icon": "http://img11.static.yhbimg.com/taobaocms/2015/09/01/14/01d48022e08742f1c96766caa6484593ce.jpg?imageView/{mode}/w/{width}/h/{height}",
                "categoryId": "5",
                "relationParameter": "114,293,116,117,115,119,124,122,413,258,173,227,125,118,121,123",
                "orderBy": "10",
                "parentId": "1",
                "categoryCode": "1,5,0,0",
                "relationUrl": "",
                "levelNumber": "2",
                "categoryName": "上衣",
                "state": "1",
                "items": [{
                    "relationUrl": "",
                    "createTime": "0",
                    "icon": "",
                    "categoryId": "45",
                    "relationParameter": "114,293",
                    "orderBy": "5",
                    "parentId": "5",
                    "categoryCode": "1,5,45,0",
                    "levelNumber": "3",
                    "categoryName": "T恤",
                    "state": "1"
                }]
            }, {
                "relationUrl": "",
                "createTime": "1441117934",
                "icon": "http://img11.static.yhbimg.com/taobaocms/2015/09/01/14/019b1a20d4cf319e0e8035cacf2d1d231f.jpg?imageView/{mode}/w/{width}/h/{height}",
                "categoryId": "8",
                "relationParameter": "131,129,346,133,348,130,114,293",
                "orderBy": "9",
                "parentId": "1",
                "categoryCode": "1,8,0,0",
                "levelNumber": "2",
                "categoryName": "裤装",
                "state": "1",
                "items": [{
                    "relationUrl": "UP",
                    "createTime": "1441118557",
                    "icon": "",
                    "categoryId": "86",
                    "relationParameter": "131",
                    "orderBy": "3",
                    "parentId": "8",
                    "categoryCode": "1,8,86,0",
                    "levelNumber": "3",
                    "categoryName": "短裤",
                    "state": "1"
                }]
            }, {
                "createTime": "0",
                "icon": "",
                "categoryId": "11",
                "relationParameter": "147,149,148,151,231",
                "orderBy": "8",
                "parentId": "1",
                "categoryCode": "1,11,0,0",
                "relationUrl": "22",
                "levelNumber": "2",
                "categoryName": "鞋靴",
                "state": "1",
                "items": [{
                    "relationUrl": "UP",
                    "createTime": "0",
                    "icon": "",
                    "categoryId": "107",
                    "relationParameter": "147",
                    "orderBy": "0",
                    "parentId": "11",
                    "categoryCode": "1,11,107,0",
                    "levelNumber": "3",
                    "categoryName": "休闲/运动鞋",
                    "state": "1"
                }, {
                    "relationUrl": "UP",
                    "createTime": "0",
                    "icon": "",
                    "categoryId": "113",
                    "relationParameter": "149",
                    "orderBy": "0",
                    "parentId": "11",
                    "categoryCode": "1,11,113,0",
                    "levelNumber": "3",
                    "categoryName": "凉鞋/凉拖",
                    "state": "0"
                }]
            }, {
                "relationUrl": "",
                "createTime": "0",
                "icon": "",
                "categoryId": "14",
                "relationParameter": "152,153,196,238,239,240,349,157,342,156,161,300,160,233,341,340,210,339,351,195,197",
                "orderBy": "11",
                "parentId": "1",
                "categoryCode": "1,17,0,0",
                "levelNumber": "2",
                "categoryName": "包类",
                "state": "0",
                "items": [{
                    "relationUrl": "UP",
                    "createTime": "0",
                    "icon": "",
                    "categoryId": "147",
                    "relationParameter": "238,239,240,349",
                    "orderBy": "12",
                    "parentId": "14",
                    "categoryCode": "1,14,147,0",
                    "levelNumber": "3",
                    "categoryName": "钱包/卡包/手包/钥匙包",
                    "state": "1"
                }]
            }, {
                "createTime": "0",
                "icon": "",
                "categoryId": "17",
                "relationParameter": "186,235,163,224,322,323,324,325,326,327,328,329,330,331,72,74,75,76,142,77,78,79,80,199,213,217,218,234,303,305,306,307,334,162,316,320,164,317,295,321",
                "orderBy": "0",
                "parentId": "1",
                "categoryCode": "1,17,0,0",
                "relationUrl": "SJ",
                "levelNumber": "2",
                "categoryName": "服配",
                "state": "0",
                "items": [{
                    "relationUrl": "",
                    "createTime": "0",
                    "icon": "",
                    "categoryId": "177",
                    "relationParameter": "186,235",
                    "orderBy": "0",
                    "parentId": "17",
                    "categoryCode": "1,17,177,0",
                    "levelNumber": "3",
                    "categoryName": "太阳镜/眼镜",
                    "state": "1"
                }, {
                    "relationUrl": "UP",
                    "createTime": "0",
                    "icon": "",
                    "categoryId": "246",
                    "relationParameter": "163,224,322,323,324,325,326,327,328,329,330,331",
                    "orderBy": "0",
                    "parentId": "17",
                    "categoryCode": "1,17,178,0",
                    "levelNumber": "3",
                    "categoryName": "帽子",
                    "state": "1"
                }]
            }]
        }, {
            "createTime": "1460079347",
            "icon": "",
            "categoryId": "2",
            "relationParameter": "227,173,125,258,121,123,119,124,118,348,122,115,117,346,114,293,131,133,186,235,163,224,322,323,324,325,326,327,328,329,330,331,72,74,75,76,142,77,78,79,80,199,213,217,218,234,303,305,306,307,334,162,316,320,164,317,295,321,147,149,148,151,231,311,364,357,359,116,129,134,135,413,152,153,238,239,240,349,157,342,156,161,300,160,233,341,340,210,339,351,195,196,197,263",
            "orderBy": "1",
            "parentId": "0",
            "categoryCode": "2,0,0,0",
            "relationUrl": "11",
            "levelNumber": "1",
            "categoryName": "女生",
            "state": "1",
            "items": [{
                "createTime": "1460079406",
                "icon": "",
                "categoryId": "31",
                "relationParameter": "134,135",
                "orderBy": "111",
                "parentId": "2",
                "categoryCode": "2,31,0,0",
                "relationUrl": "11",
                "levelNumber": "2",
                "categoryName": "裙装",
                "state": "1"
            }]
        }]
    },
    "md5": "d751713988987e9331980363e24189ce"
}

根据销售类目的id查询销售类目接口

接口名: /salesCategory/querySCById

入参


属性名称 类型 例子 说明 是否必填
categoryId String 59 销售类目id

返回(销售类目id为空的场合)

{
    "code": 400,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "销售类目ID不能为空"
}

返回

{
    "code": 200,
    "data": {
        "categoryCode": "1,5,45,0",
        "categoryId": "45",
        "categoryName": "T恤",
        "createTime": "1441118277",
        "icon": "",
        "levelNumber": "3",
        "orderBy": "5",
        "parentId": "5",
        "parentSC": [
            {
                "categoryCode": "1,0,0,0",
                "categoryId": "1",
                "categoryName": "男生",
                "createTime": "1441117726",
                "icon": "",
                "items": [
                    {
                        "categoryCode": "1,5,0,0",
                        "categoryId": "5",
                        "categoryName": "上衣",
                        "createTime": "1441117792",
                        "icon": "http://img11.static.yhbimg.com/taobaocms/2015/09/01/14/01d48022e08742f1c96766caa6484593ce.jpg?imageView/{mode}/w/{width}/h/{height}",
                        "levelNumber": "2",
                        "orderBy": "10",
                        "parentId": "1",
                        "relationParameter": "114,293,116,117,115,119,124,122,413,258,173,227,125,118,121,123",
                        "relationUrl": "",
                        "state": "0"
                    }
                ],
                "levelNumber": "1",
                "orderBy": "0",
                "parentId": "0",
                "relationParameter": "114,293,116,117,115,119,124,122,131,129,346,133,348,147,149,148,151,231,152,153,196,238,239,240,349,157,342,156,161,300,160,233,341,340,210,339,351,186,235,163,224,322,323,324,325,326,327,328,329,330,331,72,74,75,76,142,77,78,79,80,199,213,217,218,234,303,305,306,307,334,162,316,164,317,295,321,311,357,359,320,195,197,413,130,258,173,227,125,118,121,123,263,260,264,261,352",
                "relationUrl": "",
                "state": "0"
            }
        ],
        "relationParameter": "114,293",
        "relationProductSort": [
            {
                "createTime": 0,
                "gender": 3,
                "id": 1,
                "isHot": "N",
                "items": [
                    {
                        "createTime": 0,
                        "gender": 3,
                        "id": 11,
                        "isHot": "N",
                        "items": [
                            {
                                "createTime": 0,
                                "gender": 3,
                                "id": 114,
                                "isHot": "N",
                                "orderBy": 12,
                                "parentId": 11,
                                "sortCode": "1,11,114",
                                "sortLevel": 3,
                                "sortName": "T恤",
                                "status": 1,
                                "updateTime": 0
                            },
                            {
                                "createTime": 0,
                                "gender": 3,
                                "id": 293,
                                "isHot": "N",
                                "orderBy": 0,
                                "parentId": 11,
                                "sortCode": "1,11,293",
                                "sortInitials": "cxtx",
                                "sortLevel": 3,
                                "sortName": "长袖T恤",
                                "status": 1,
                                "updateTime": 0
                            }
                        ],
                        "orderBy": 8,
                        "parentId": 1,
                        "sortCode": "1,11,0",
                        "sortInitials": "tx",
                        "sortLevel": 2,
                        "sortName": "T恤",
                        "status": 1,
                        "updateTime": 1458048766
                    }
                ],
                "orderBy": 100,
                "parentId": 0,
                "sortCode": "1,0,0",
                "sortInitials": "sy",
                "sortLevel": 1,
                "sortName": "上衣",
                "status": 1,
                "updateTime": 1453802272
            }
        ],
        "relationUrl": "",
        "state": "0"
    },
    "md5": "5336e9aad255923dc684de32719ded0b",
    "message": "querySCById success"
}

添加销售类目接口

接口名: /salesCategory/addSC

入参


属性名称 类型 例子 说明 是否必填
categoryName String 创意家居 销售类目名称
relationParameter String 285,113 关联的物理类目id
relationUrl string 关联url
parentId string 1 父销售类目id
orderBy string 0 排序
icon string 销售类目图标

返回

{
  "code": 200,
  "data": "",
  "md5": "d751713988987e9331980363e24189ce",
  "message": "addSC success."
}

更新销售类目接口

接口名: /salesCategory/updateSC

入参


属性名称 类型 例子 说明 是否必填
categoryId String 4 销售类目id
categoryName String 创意家居 销售类目名称
relationParameter String 285,113 关联的物理类目id
relationUrl string 关联url
parentId String 1 父销售类目id
orderBy String 0 排序
icon string 销售类目图标
status String 0 销售类目状态1:开启 0:关闭

返回

{
  "code": 200,
  "data": "",
  "md5": "d751713988987e9331980363e24189ce",
  "message": "updateSC success."
}

标签接口服务定义


销售类目的标签查询

接口名: /salesCategoryLabel/querySCLabelList

入参


属性名称 类型 例子 说明 是否必填
categoryId String 52 销售类目的id
status String 1 状态 1:开启, 0:关闭

返回(销售类目Id为空的场合)

{
    "code": 400,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "销售类目ID不能为空"
}

返回

{
    "code": 200,
    "data": {
        "list": [
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "260",
                "labelLevel": "1",
                "labelName": "经典款型",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "278",
                "labelLevel": "1",
                "labelName": "版型",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "276",
                "labelLevel": "1",
                "labelName": "衣长",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "274",
                "labelLevel": "1",
                "labelName": "腰型",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "272",
                "labelLevel": "1",
                "labelName": "裤长",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "270",
                "labelLevel": "1",
                "labelName": "袖长",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "268",
                "labelLevel": "1",
                "labelName": "领型",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "266",
                "labelLevel": "1",
                "labelName": "厚度",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "264",
                "labelLevel": "1",
                "labelName": "袖型",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "262",
                "labelLevel": "1",
                "labelName": "面料材质",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            },
            {
                "categoryId": "8",
                "createTime": "1460444986",
                "labelId": "280",
                "labelLevel": "1",
                "labelName": "肩型",
                "orderBy": "0",
                "parentId": "0",
                "status": "1",
                "updateTime": "1460444986"
            }
        ]
    },
    "md5": "9c4312ac1377ff0d4d3cdbfb8e89c621",
    "message": "querySCLabelList success"
}

更新销售类目的标签接口

接口名: /salesCategoryLabel/updateSCLabel

入参

属性名称 类型 例子 说明 是否必填
labelId String 1 标签id
labelName String 袖长 标签名称
categoryId string 关联的销售类目id
parentId string 1 父标签id
orderBy string 0 排序
labelLevel string 1 标签等级
status string 0 销售类目状态1:开启 0:关闭

返回

{
  "code": 200,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "updateSCLabel success."
}

批量添加标签接口

接口名: /salesCategoryLabel/addSCLabel

入参

属性名称 类型 例子 说明 是否必填
labelName String 袖长 标签名称
categoryId string 关联的销售类目id
parentId string 1 父标签id
orderBy string 0 排序
labelLevel string 1 标签等级
status string 0 销售类目状态1:开启 0:关闭

返回

{
  "code": 200,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "addSCLabel success."
}