# 获取-二级商品分类

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/category/sub:
    get:
      summary: 获取-二级商品分类
      deprecated: false
      description: 获取-二级商品分类
      tags:
        - 商品分类
        - AJAX编程/其他接口
      parameters:
        - name: id
          in: query
          description: 顶级分类id
          required: true
          example: '1005000'
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: 响应消息
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        title: 顶级分类id
                      name:
                        type: string
                        title: 顶级分类名字
                      picture:
                        type: string
                        title: 顶级分类图片
                      children:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              title: 二级分类id
                            name:
                              type: string
                              title: 二级分类名字
                            picture:
                              type: string
                              title: 二级分类图片
                          required:
                            - id
                            - name
                            - picture
                          x-apifox-orders:
                            - id
                            - name
                            - picture
                        title: 顶级分类下属二级分类数组
                    required:
                      - id
                      - name
                      - picture
                      - children
                    x-apifox-orders:
                      - id
                      - name
                      - picture
                      - children
                    title: 响应数据
                required:
                  - message
                  - data
                x-apifox-orders:
                  - message
                  - data
              example:
                message: 获取子级分类成功
                data:
                  id: '1005000'
                  name: 居家
                  picture: >-
                    http://yjy-xiaotuxian-dev.oss-cn-beijing.aliyuncs.com/picture/2021-05-06/201516e3-25d0-48f5-bcee-7f0cafb14176.png
                  children:
                    - id: '1005009'
                      name: 茶咖酒具
                      picture: >-
                        https://yanxuan.nosdn.127.net/3102b963e7a3c74b9d2ae90e4380da65.png?quality=95&imageView
                    - id: '1007000'
                      name: 水具杯壶
                      picture: >-
                        https://yanxuan.nosdn.127.net/45b50d5f8afbd6fdef97314647dcb7db.png?quality=95&imageView
                    - id: '1017000'
                      name: 宠物食品
                      picture: >-
                        https://yanxuan.nosdn.127.net/b42a85ef15f856081ea9f49e5f6893e2.png?quality=95&imageView
                    - id: '109248004'
                      name: 宠物用品
                      picture: >-
                        https://yanxuan.nosdn.127.net/e766b09029ca00680d1e651b5cdc42bd.png?quality=95&imageView
          headers: {}
          x-apifox-name: 成功
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: 响应消息
                    description: 请检查network和文档要求的参数名和值是否携带
                  data:
                    type: object
                    properties: {}
                    x-apifox-orders: []
                    title: 响应结果
                required:
                  - message
                  - data
                x-apifox-orders:
                  - message
                  - data
              example:
                code: 400001
                message: 校验失败:请检查必填项字段:id
                data: {}
          headers: {}
          x-apifox-name: 请求参数缺失_AJAX
      security: []
      x-apifox-folder: 商品分类
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/1937884/apis/api-49760206-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
