菜单-Url选择器

菜单 - 获取菜单链接类型列表

接口信息

  • 接口地址: {your-site-url}/api/skill/menu/get-item-types
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: GET
  • 说明: 此接口用于获取菜单子项可选的链接类型列表。创建/编辑菜单子项时,用于下拉选择链接类型。

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)

请求参数 (Query String)

字段 类型 必填 说明
theme_identity string 当前模版的唯一标识 key。可通过 获取店铺基本信息 获取

请求示例

cURL

curl --location --request GET '{your-site-url}/api/skill/menu/get-item-types?theme_identity=new_default_theme_b2b' \
--header 'skill-access-token: {your-skill-access-token}'

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": [
        {
            "text": "首页",
            "url": "/",
            "code": 1
        },
        {
            "text": "商品专辑页",
            "url": "/collections/",
            "code": 2
        },
        {
            "text": "商品专辑页(所有商品)",
            "url": "/collections/all",
            "code": 10
        },
        {
            "text": "专辑列表页(指定专辑)",
            "url": "/collections",
            "code": 12
        },
        {
            "text": "商品详情页",
            "url": "/products/",
            "code": 3
        },
        {
            "text": "商品评论页",
            "url": "/review/all",
            "code": 11
        },
        {
            "text": "博客专辑页",
            "url": "/blogs/",
            "code": 4
        },
        {
            "text": "博客文章页",
            "url": "/blog/",
            "code": 5
        },
        {
            "text": "自定义页面",
            "url": "/pages/",
            "code": 6
        },
        {
            "text": "查询订单",
            "url": "/account/order-query",
            "code": 7
        },
        {
            "text": "Contacts",
            "url": "/contacts",
            "code": 9
        },
        {
            "text": "自定义URL",
            "code": 8,
            "url": ""
        }
    ],
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data Array[Object] 链接类型列表

data 子项字段

字段 类型 说明
code int 类型值,即菜单子项的 url_type
text string 类型显示名称
url string 类型对应的 URL 前缀或完整 URL

url_type 类型枚举

code text url 说明
1 首页 / 网站首页
2 商品专辑页 /collections/{handle} 需选择具体专辑
3 商品详情页 /products/{handle} 需选择具体商品
4 博客专辑页 /blogs/{handle} 需选择具体博客专辑
5 博客文章页 /blog/{handle} 需选择具体文章
6 自定义页面 /pages/{handle} 需选择具体页面
7 查询订单 /account/order-query 固定页面
8 自定义URL (手动输入) 可输入任意 URL
9 Contacts /contacts 联系我们
10 商品专辑页(所有商品) /collections/all 展示所有商品
11 商品评论页 /review/all 所有评论
12 专辑列表页(指定专辑) /collections 专辑列表入口

注意事项

  1. theme_identity 为当前模版标识,不同模版可能支持不同的链接类型
  2. code 对应菜单子项的 url_type 字段
  3. 类型 179101112 为固定链接,选择后无需指定具体对象
  4. 类型 23456 为指定实体链接,选择后需通过其他 API 获取可选实体列表
  5. 类型 8 为自定义 URL,url 需用户手动输入
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-06-04 21:57:28

results matching ""

    No results matching ""