**版本：202701**

# 查询菜单导航列表

**GET** `/openapi/2027-01/menus`

返回店铺的菜单（导航）列表，支持按 ids 过滤、隐藏禁用项。

## 请求

**Query参数**

- `ids` string[]

  可选，按菜单 id 过滤，如 `?ids=header&ids=1790649397502042737`
- `hide_disabled` boolean

  为 true 时隐藏禁用的菜单项
- `page` int32

  页码
- `page_size` int32

  每页条数，默认 100

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `menus` object[]

    菜单列表

    *   Array \[

    - `id` string

      菜单 id；内置菜单为 `header`、`footer`
    - `title` string

      菜单名称
    - `category` int32

      菜单分类：

      *   `1`：顶部导航菜单
      *   `2`：页尾菜单
      *   `3`：自定义菜单
    - `children` object[]

      全部菜单项的扁平列表，按展示顺序排列；通过 `pid` 还原层级

      *   Array \[

      - `id` int64

        菜单项 id
      - `title` string

        菜单项名称
      - `origin_type` int32

        链接类型的数字编码，与 `type` 一一对应（如 `-1` 外部链接、`0` 无跳转、`1` 商品、`2` 专辑、`3` 页面、`15` 首页）
      - `type` string

        链接类型，如 `home`、`product`、`collection`、`page`、`article`、`blog`、`web`；`0` 表示无跳转
      - `source_id` string

        链接到的资源 id（商品、专辑、页面等）
      - `url` string

        链接地址
      - `pid` int64

        父菜单项 id；顶层菜单项为 `0`
      - `status` int32

        菜单项状态
      - `disabled` int32

        是否禁用：`1` 禁用，`0` 启用
      - `target` string

        链接打开方式，如 `_blank` 为新窗口打开
      - `url_obj` object

        链接对象

        - `type` string

          链接类型，取值同菜单项的 `type`
        - `source_id` string

          链接到的资源 id
        - `url` string

          链接地址
        - `title` string

          链接资源的标题；菜单列表中不返回
      - `expanded` boolean

        编辑器中是否展开；菜单列表中恒为 `false`
      *   \]
    *   \]
  - `total` int32

    菜单总数
  - `page` int32

    当前页码
  - `limit` int32

    每页条数
  - `has_more` boolean

    是否还有下一页

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "menus": [
      {
        "id": "string",
        "title": "string",
        "category": 0,
        "children": [
          {
            "id": 0,
            "title": "string",
            "origin_type": 0,
            "type": "string",
            "source_id": "string",
            "url": "string",
            "pid": 0,
            "status": 0,
            "disabled": 0,
            "target": "string",
            "url_obj": {
              "type": "string",
              "source_id": "string",
              "url": "string",
              "title": "string"
            },
            "expanded": true
          }
        ]
      }
    ],
    "total": 0,
    "page": 0,
    "limit": 0,
    "has_more": true
  }
}
```
