接口描述:

  • 获取所有子级分类。

请求 URL:

  • http|https://host/api/v1/goods_category/method/get.goods.category.son/

请求方式:

  • GET
  • POST

是否授权:

业务参数:

参数名 类型 是否必须 范围值 默认值 示例值 描述
goods_category_id integer gt[]:0 1 商品分类编号
level integer egt:0 0 商品分类深度
goods_total integer in:0,1 0 1 是否获取关联商品数 0=否 1=是
is_layer integer in:0,1 1 1 是否返回本级分类 0=否 1=是

响应参数:

参数名 类型 是否返回 示例值 描述
status integer 200 状态码
message string success 消息信息
data array [] 返回数组
data 类型 是否返回 示例值 描述
goods_category_id integer 1 商品分类编号
parent_id integer 0 商品分类上级编号
name string 男装、女装 商品分类名称
name_phonetic string n 商品分类名称首拼
alias string 服装 商品分类别名
alias_phonetic string f 商品分类别名首拼
category_pic string //image.jpg 商品分类图片
category_ioc string  商品分类图标
keywords string 关键词 商品分类关键词
description string 描述 商品分类描述
category_type integer 0 商品分类类型(自定义)
sort integer 50 商品分类排序值
is_navi integer 0 是否显示到导航 0=否 1=是
status integer 1 是否显示 0=否 1=是
children_total integer 0 该分类下关联商品的合计
level integer 0 该分类的层级深度

响应示例:

  1. {
  2. "status": 200,
  3. "message": "success",
  4. "data": [
  5. {
  6. "goods_category_id": 1,
  7. "parent_id": 0,
  8. "name": "男装、女装",
  9. "name_phonetic": "n",
  10. "alias": "服装",
  11. "alias_phonetic": "f",
  12. "category_pic": "//image.jpg",
  13. "category_ioc": "",
  14. "keywords": "关键词",
  15. "description": "描述",
  16. "category_type": 0,
  17. "sort": 50,
  18. "is_navi": 0,
  19. "status": 1,
  20. "children_total": 2,
  21. "level": 0
  22. },
  23. {
  24. "goods_category_id": 5,
  25. "parent_id": 1,
  26. "name": "手机通讯",
  27. "name_phonetic": "s",
  28. "alias": "",
  29. "alias_phonetic": "",
  30. "category_pic": "",
  31. "category_ioc": "",
  32. "keywords": "",
  33. "description": "",
  34. "category_type": 0,
  35. "sort": 50,
  36. "is_navi": 0,
  37. "status": 1,
  38. "children_total": 0,
  39. "level": 1
  40. },
  41. {
  42. "goods_category_id": 6,
  43. "parent_id": 1,
  44. "name": "手机",
  45. "name_phonetic": "s",
  46. "alias": "",
  47. "alias_phonetic": "",
  48. "category_pic": "",
  49. "category_ioc": "",
  50. "keywords": "",
  51. "description": "",
  52. "category_type": 0,
  53. "sort": 50,
  54. "is_navi": 0,
  55. "status": 1,
  56. "children_total": 0,
  57. "level": 1
  58. },
  59. {
  60. "goods_category_id": 2,
  61. "parent_id": 0,
  62. "name": "数码产品",
  63. "name_phonetic": "s",
  64. "alias": "3C",
  65. "alias_phonetic": "3",
  66. "category_pic": "//image.jpg",
  67. "category_ioc": "",
  68. "keywords": "关键词",
  69. "description": "描述",
  70. "category_type": 0,
  71. "sort": 50,
  72. "is_navi": 0,
  73. "status": 1,
  74. "children_total": 2,
  75. "level": 0
  76. },
  77. {
  78. "goods_category_id": 7,
  79. "parent_id": 2,
  80. "name": "网络产品",
  81. "name_phonetic": "w",
  82. "alias": "",
  83. "alias_phonetic": "",
  84. "category_pic": "",
  85. "category_ioc": "",
  86. "keywords": "",
  87. "description": "",
  88. "category_type": 0,
  89. "sort": 50,
  90. "is_navi": 0,
  91. "status": 1,
  92. "children_total": 0,
  93. "level": 1
  94. },
  95. {
  96. "goods_category_id": 8,
  97. "parent_id": 2,
  98. "name": "办公设备",
  99. "name_phonetic": "b",
  100. "alias": "",
  101. "alias_phonetic": "",
  102. "category_pic": "",
  103. "category_ioc": "",
  104. "keywords": "",
  105. "description": "",
  106. "category_type": 0,
  107. "sort": 50,
  108. "is_navi": 0,
  109. "status": 1,
  110. "children_total": 0,
  111. "level": 1
  112. }
  113. ]
  114. }

备注:

  1. 响应参数与 获取商品分类列表 相同,区别在于该接口是将goods_category_id中指定的编号的结果进行集合并按顺序返回。
文档更新时间: 2018-06-20 23:51