Page Update API 文档

自定义页面-全量更新

接口信息

  • 接口地址: {your-site-url}/api/skill/page/update
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: POST
  • Content-Type: application/json
  • 说明: 此接口用于更新自定义页面,属于全量更新,需要传入全部属性

认证

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

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

请求参数 (Body - JSON)

字段 类型 必填 说明
id int ✅ 必填 页面 ID
title string ✅ 必填 页面标题
body_html string 选填 页面正文内容(HTML)
handle string 选填 页面 URL handle,如果与已有 handle 冲突会自动追加随机后缀
is_title_show int 选填 前台商城是否显示标题。1 显示标题,2 不显示标题
meta_title string 选填 SEO 标题。非独立编辑模式下从 title 取值即可
meta_keywords string 选填 SEO 关键字
meta_description string 选填 SEO 描述。非独立编辑模式下从 body_html 取值即可
meta_is_edit int 选填 SEO 是否独立编辑。1 独立编辑,2 未独立编辑
translate_type int 选填 翻译方式。1 强制翻译,2 只翻译多语言为空的部分,3 不翻译
template_type string 选填 Mirox 模板布局样式(通过 get-template-types 接口获取可选值)
theme_identity string 选填 主题标识
description_json Array 选填 JSON 描述对象
description_json_status int 选填 description_json 状态
diy_css string 选填 自定义 CSS 样式
remote_id string 选填 远程 ID

请求示例

cURL

curl --location --request POST '{your-site-url}/api/skill/page/update' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "343",
    "title": "About us",
    "handle": "about-us-i0fjsmw3",
    "is_title_show": 1,
    "body_html": "<img src=\"...\" />Welcome to our online store...",
    "meta_is_edit": 1,
    "meta_title": "About us",
    "meta_keywords": "",
    "meta_description": "Welcome to our online store...",
    "translate_type": 3,
    "template_type": "page.about-us",
    "theme_identity": "none",
    "description_json": [],
    "description_json_status": 2,
    "diy_css": "",
    "remote_id": ""
}'

返回结果

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

成功响应

{
    "code": 200,
    "data": {
        "id": 343,
        "shop_id": 15,
        "handle": "about-us-i0fjsmw3",
        "theme_identity": "none",
        "is_title_show": 1,
        "title": "About us",
        "body_html": "<img src=\"...\" />Welcome to our online store...",
        "meta_title": "About us",
        "meta_keywords": "",
        "meta_description": "Welcome to our online store...",
        "meta_is_edit": 1,
        "translate_type": 3,
        "created_at": "2025-04-08 09:34:18",
        "updated_at": "2025-06-24 23:32:52",
        "remote_id": "",
        "description_json_status": 2,
        "description_json": "",
        "diy_css": "",
        "template_type": "page.about-us"
    },
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data.id int 页面 ID
data.shop_id int 店铺 ID
data.handle string 页面 URL handle
data.theme_identity string 主题标识
data.is_title_show int 前台商城是否显示标题。1 显示,2 不显示
data.title string 页面标题
data.body_html string 页面正文内容(HTML)
data.meta_title string SEO 标题
data.meta_keywords string SEO 关键字
data.meta_description string SEO 描述
data.meta_is_edit int SEO 是否独立编辑。1 独立编辑,2 未独立编辑
data.translate_type int 翻译方式
data.template_type string Mirox 模板布局样式
data.description_json_status int description_json 状态
data.description_json Array/string JSON 描述对象
data.diy_css string 自定义 CSS 样式
data.remote_id string 远程 ID
data.created_at string 创建时间
data.updated_at string 更新时间

注意事项

  1. idtitle 为必填
  2. 此接口为全量更新,需要传入页面的全部属性
  3. template_type 的可选值可通过 get-template-types 接口获取(page_type=page
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-05-11 19:41:36

results matching ""

    No results matching ""